<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                [TOC] # 安裝和部署 1. 安裝httpd服務與php ~~~ yum install -y httpd php ~~~ 2. 安裝其他依賴 ~~~ yum install -y rrdtool perl-rrdtool rrdtool-devel apr-devel ~~~ 3. 安裝ganglia ~~~ rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm yum install -y ganglia-gmetad ganglia-web ganglia-gmond ~~~ gmetad是主節點,gmond是從節點, 需要監控那個節點,就在哪個節點上啟動gmond,然后他會匯報給gmetad. web是顯示頁面程序 4. 修改配置文件 **安裝目錄說明** * ganglia配置文件目錄:/etc/ganglia * rrd數據庫存放目錄:/var/lib/ganglia/rrds * httpd主站點目錄:/var/www/html * ganglia-web安裝目錄:/usr/share/ganglia * ganglia-web配置目錄:/etc/httpd/conf.d/ganglia.conf 修改httpd主站點目錄下ganglia站點目錄的訪問權限 ~~~ #??將ganglia站點目錄訪問權限改為apache:root,否則會報錯 $??chown?-R?apache:root?/var/www/html/ganglia $??chmod?-R?755?/var/www/html/ganglia # 修改rrd數據庫存放目錄訪問權限 #??將rrd數據庫存放目錄訪問權限改為gmetad:root,否則會報錯 $??chown?-R?gmetad:root?/var/lib/ganglia/rrds ~~~ 修改dwoo下面的權限 ~~~ chmod 777 /var/lib/ganglia/dwoo/compiled chmod 777 /var/lib/ganglia/dwoo/ cache ~~~ **ganglia.conf** ~~~ vim /etc/httpd/conf.d/ganglia.conf ~~~ ~~~ Alias /ganglia /usr/share/ganglia <Location /ganglia> #Order deny,allow #Deny from all Require all granted Allow from all #Allow from 127.0.0.1 #Allow from ::1 #Allow from .example.com </Location> ~~~ **gmetad.conf** ~~~ vim /etc/ganglia/gmetad.conf ~~~ ~~~ #集群名稱和主機地址(注意是所有節點都加上,如master:8649 slave0x:8649) data_source "master" master ~~~ **gmond.conf** ~~~ vim /etc/ganglia/gmond.conf ~~~ 涉及一下部分修改一下 ~~~ cluster { #name是集群的名稱 name = "master" owner = "unspecified" latlong = "unspecified" url = "unspecified" } udp_send_channel { #bind_hostname = yes # Highly recommended, soon to be default. # This option tells gmond to use a source address # that resolves to the machine's hostname. Without # this, the metrics may appear to come from any # interface and the DNS names associated with # those IPs will be used to create the RRDs. #使用廣播的形式發送形式 #mcast_join = 239.2.11.71 #使用單播的形式 host = master port = 8649 ttl = 1 } /* You can specify as many udp_recv_channels as you like as well. */ udp_recv_channel { #使用廣播的形式 #mcast_join = 239.2.11.71 port = 8649 #綁定的地址 bind = master retry_bind = true # Size of the UDP buffer. If you are handling lots of metrics you really # should bump it up to e.g. 10MB or even higher. # buffer = 10485760 } ~~~ 從節點匯報數據的時候是用udp協議的 **啟動ganglia** ~~~ systemctl status httpd systemctl start gmetad systemctl start gmond ~~~ **訪問網頁** `master/ganglia` # 常見問題 主要記錄下自己遇到的問題: `There was an error collecting ganglia data (127.0.0.1:8652): fsockopen error: Connection refused` 發現沒找到什么解決方法,最后想到去看日志…… ~~~ Jan 4 14:23:40 localhost /usr/sbin/gmetad[5524]: Please make sure that /var/lib/ganglia/rrds is owned by ganglia Jan 4 14:30:13 localhost /usr/sbin/gmetad[5579]: Please make sure that /var/lib/ganglia/rrds is owned by ganglia ~~~ 好吧,又是我自己的問題…… 將`/var/lib/ganglia/rrds` 的所有者所屬組改為ganglia后 在訪問就ok了 在gmetad.conf中有這么一段 ~~~ # User gmetad will setuid to (defaults to "nobody") # default: "nobody" setuid_username ganglia # ~~~ 在gmond.conf則有這么一段 ~~~ /* This configuration is as close to 2.5.x default behavior as possible The values closely match ./gmond/metric.h definitions in 2.5.x */ globals { daemonize = yes setuid = yes user = ganglia debug_level = 0 max_udp_msg_len = 1472 ~~~ 上面截取的部分都是默認配置也就是未經過修改的,已經可以明白這個問題了 雖然默認設置的用戶是nobody,但確多了一行`setuid_username ganglia` 覆蓋了默認配置 在按原來的配置設置rrds為nobody顯然是不行的,只需要將`setuid_username ganglia`注釋掉就可以繼續使用原來的方法安裝了。或者rrds為ganglia所有 # 使用 **選擇集群節點** ![](https://box.kancloud.cn/74b246acd44ab537a039f02468437033_233x39.png) ![](https://box.kancloud.cn/1e5acacf49419fe15dd4a0ce13518624_217x33.png) # 操作flume測試監控 修改flume-env.sh配置 ~~~ export JAVA_OPTS="-Dflume.monitoring.type=ganglia -Dflume.monitoring.hosts=192.168.33.80:8649 -Xms100m -Xmx200m" ~~~ 也可以在執行的時候添加參數,那就覆蓋配置文件中的 ~~~ flume-ng agent -c conf -f netcat.conf -n a1 -Dflume.root.logger=INFO,console -Dflume.monitoring.type=ganglia -Dflume.monitoring.hosts=192.168.33.80:8649 ~~~ 然后啟動flume任務 然后在對應節點的監控頁面就可以看到了 **字段含義** ![](https://box.kancloud.cn/8a9a5cce43af302933b421d60bd5601e_846x549.png) 基本上有多少條的統計還有成功多少條統計 | 字段(圖標名稱) | 字段含義 | |---|---| | EventPutAttemptCount | source嘗試寫入channel的事件總數量 | | EventPutSuccessCount | 成功寫入channel且提交的事件總數量 | | EventTakeAttemptCount | sink嘗試從channel拉取事件的總數量。這不意味著每次事件都被返回,因為sink拉取的時候channel可能沒有任何數據 | | EventTakeSuccessCount | sink成功讀取的事件的總數量 | | StartTime | channel啟動的時間(毫秒) | | StopTime | channel停止的時間(毫秒) | | ChannelSize | 目前channel中事件的總數量 | | ChannelFillPercentage | channel占用百分比 | | ChannelCapacity | channel的容量 |
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看