ganglia 有需要監控二個 source , 一個hadoop 一個solr ..
ganglia 主機設定,改用unicast
1. gmetad.confdata_source "hadoop" 172.1.0.2:8649
data_source "solr" 172.1.0.2:8655
2. 要設定二個 gmond.conf.1 gmond.conf.2 , 開二個gmond 來收metric
cluster {
name = "hadoop"
owner = "unspecified"
latlong = "unspecified"
url = "unspecified"
}
host {
location = "unspecified"
}
udp_send_channel {
host = 172.1.0.2
port = 8649
ttl = 1
}
udp_recv_channel {
port = 8649
bind = 172.1.0.2
}
tcp_accept_channel {
port = 8649
}
cluster {
name = "solr"
owner = "unspecified"
latlong = "unspecified"
url = "unspecified"
}
host {
location = "unspecified"
}
udp_recv_channel {
port = 8655
bind = 172.1.0.2
}
tcp_accept_channel {
port = 8655
}
3. 執行gmond
/usr/sbin/gmond --conf /etc/ganglia/gmond.conf.1
/usr/sbin/gmond --conf /etc/ganglia/gmond.conf.2
name = "solr"
owner = "unspecified"
latlong = "unspecified"
url = "unspecified"
}
host {
location = "unspecified"
}
udp_recv_channel {
port = 8655
bind = 172.1.0.2
}
tcp_accept_channel {
port = 8655
}
3. 執行gmond
/usr/sbin/gmond --conf /etc/ganglia/gmond.conf.1
/usr/sbin/gmond --conf /etc/ganglia/gmond.conf.2
或改daemon 的shell , /etc/init.d/ganglia-monitor
start-stop-daemon --start --quiet --name gmond1 \
--exec $DAEMON -- --pid-file /var/run/$NAME.pid.1 --conf /etc/ganglia/gmond.conf.1
start-stop-daemon --start --quiet --name gmond2 \
--exec $DAEMON -- --pid-file /var/run/$NAME.pid.2 --conf /etc/ganglia/gmond.conf.2
start-stop-daemon --start --quiet --name gmond1 \
--exec $DAEMON -- --pid-file /var/run/$NAME.pid.1 --conf /etc/ganglia/gmond.conf.1
start-stop-daemon --start --quiet --name gmond2 \
--exec $DAEMON -- --pid-file /var/run/$NAME.pid.2 --conf /etc/ganglia/gmond.conf.2