Ganglia

From Alessandro's Wiki

Ganglia:

  • sistema di monitorizzazione a livello cluster e/o GRID

My Ganglia

per far funzionare la bastarda.

  • configurazione:.
elwood:  amd64 3500+, 2GB ram.
 server Ganglia (gmetad)
 client Ganglia (gmond)
zombie: celeron 1700, 1,5GB ram.
 client Ganglia (gmond)
fricco: PIII 1000, 384MB ram.
 client Ganglia (gmond)
  • Nei client:
vi /etc/gmond.conf

imposto:

cluster {
 name = "MyHome"
}
  • Nel Server:
vi /etc/gmetad.conf

imposto datasource, gridname e trusted_hosts :

data_source "MyHome" 10 localhost 10 zombie 10 fricco
gridname "MyHome"
trusted_hosts zombie elwood fricco 192.168.100.24 192.168.100.251 192.168.100.82 192.168.1.251 192.168.1.82 localhost 127.0.0.1
  • Avviare i servizi:

prima di tutto stoppare i gmetad e gmond vari.

/etc/init.d/gmond stop
/etc/init.d/gmetad stop

poi avviare nel seguente ordine: (la sequenza è importante! Ancora non ho ben capito il criterio giusto) Server:

/etc/init.d/gmetad start

Clients (in tutti, meno che quello del server se cel'ha)

/etc/init.d/gmond start

Client del server

/etc/init.d/gmond start
  • se in un host ci sono due interfaccie e voglio usarne solo una per ganglia (in questo caso eth0), devo fare una route.
route add -host 239.2.11.82 dev eth0

Converting rrds to other architectures

  1. create a copy of the whole /var/lib/ganglia/
  2. check for disk space, the xml file might occupy 10 times more the space.
  3. in the source machine, launch the command to generate the files:
IFS="
"
for i in `find -name "*.rrd"`; do rrdtool dump "$i" > "$i.xml"; done
  1. move now to the target server (in my case the x86_64 one)
  2. copy the directory structure from the old server (I did copied it all and then I've deleted the rrd files)
find -name "*.rrd" -exec rm -f {} \;
  • now convert all the xml's to rrd
IFS="
"
for i in `find -name "*.xml"`; do rrdtool restore "$i" "`echo $i |sed s/.xml//g`"; done
  • then delete the xml files:
find -name "*.xml" -exec rm -f {} \;