mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-25 18:38:30 +00:00
Initial version
This commit is contained in:
parent
c7bceeb426
commit
f038b18b35
1 changed files with 36 additions and 0 deletions
36
plugins/other/cacti_rrds
Executable file
36
plugins/other/cacti_rrds
Executable file
|
@ -0,0 +1,36 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Munin script to obtain the number of RRDs processed
|
||||||
|
# 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 RRDs Procesados Time"
|
||||||
|
echo "graph_vlabel Numero de RRDs"
|
||||||
|
echo "rrds.label rrds"
|
||||||
|
echo 'graph_category cacti'
|
||||||
|
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 9 -d":" | awk '{print"rrds.value "$1}'
|
Loading…
Add table
Add a link
Reference in a new issue