mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
a4710dc1a4
cacti -> munin (cacti) [Monitoring the monitoring.. nagios and monit already there. shall we use a new name for the category then?] san -> fs (netapp) san -> cpu (netapp) nfs -> fs
37 lines
849 B
Bash
Executable File
37 lines
849 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Munin script to obtain the poller time
|
|
# by kasandrapadisha@gmail.com
|
|
#
|
|
|
|
#----- Configuration variables
|
|
database="cacti"
|
|
hostname="localhost"
|
|
user="admincacti"
|
|
password="passwdcacti"
|
|
|
|
|
|
#----- Configuration variables
|
|
if [[ $1 != "" ]]; then
|
|
if [[ $1 == "autoconf" ]]; then
|
|
echo "yes"
|
|
exit 0
|
|
fi
|
|
if [[ $1 == "config" ]]; then
|
|
echo "graph_title Poller Time"
|
|
echo "graph_vlabel Time(s)"
|
|
echo "poller_time.label time(s)"
|
|
echo 'graph_category munin'
|
|
exit 0
|
|
fi
|
|
fi
|
|
|
|
salida=`mysql -B -e "SELECT value FROM settings WHERE name='stats_poller' LIMIT 1" -h $hostname --user=$user --password=$password $database`
|
|
|
|
if [[ $? != 0 ]]; then
|
|
echo "No se pudo ejecutar"
|
|
exit 0
|
|
fi
|
|
|
|
echo $salida | cut -f 2 -d":" | awk '{print"poller_time.value "$1}'
|