HomePage » Monitoring » MonitoriogCacti
Cacti
Ref: http://www.cacti.net/downloads/docs/html/graph_howto.html#NEW_DEVICERef: $CACTI_HOME/docs/txt/manual.txt
Install
- Download cacti, extract to a location where your web server can serve
- Create the cacti database, import the cacti.sql file
- Create the database user and grant access to the cacti database
- Create a cacti shell user, chown cacti:cacti $CACTI_HOME/log $CACTI_HOME/rra
- Schedule $CACTI_HOME/poller.php to run every 5min
- Run the cacti installer by going to http://server/cacti/install/
- Default password is admin/admin
snmp
Most of it is pretty straight forward. For those who are unfamiliar with snmp, here's what you need to add to /etc/snmp/snmpd.conf# sample configuration for SNMP V3 # create an SNMP V3 user with an authpassphrase and a privacy passphrase ## username authProto authpassphrase privProto privpassphrase ## -------- --------- -------------- --------- -------------- createUser someuser MD5 myauthpass DES myprivpass # Second, map the security name into a group name: ## groupName securityModel securityName ## --------- ------------- ------------ group groupv3 usm someuser # Third, create a view for us to let the group have rights to: ## incl/excl subtree mask ## --------- ------- ---- view all included .iso 80 # Fourth, create the access for that group without context ## context sec.model sec.level prefix read write notif ## ------- --------- --------- ------ ---- ----- ----- access groupv3 "" any auth exact all all all
Then test it with
shell>snmpwalk -v 3 -a MD5 -A myauthpass -x DES -X myprivpass -u someuser -l authpriv localhost interface
sensors
Ref: http://www.rene.bz/2009/04/16/graphing-your-servers-motherboard-temperature-and-fan-rpm-speedssensors.sh
#!/bin/bash
sensors | grep Core | awk '{print $1$2$3}' | tr '\n\+\°' ' ' | sed s/\ C\ //g | sed s/\:\ /\:/g
sensors | grep Core | awk '{print $1$2$3}' | tr '\n\+\°' ' ' | sed s/\ C\ //g | sed s/\:\ /\:/g