1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

- have some dirs

This commit is contained in:
Steve Schnepp 2012-02-13 18:24:46 +01:00
parent 0b089ea777
commit 08346aac58
687 changed files with 0 additions and 0 deletions

36
plugins/cacti/cacti-host Executable file
View file

@ -0,0 +1,36 @@
#!/bin/bash
#
# Munin script to obtain the number o hosts
# 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 Servidores consultados"
echo "graph_vlabel Numero servidores (s)"
echo "poller_hosts.label hosts(s)"
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 6 -d":" | awk '{print"poller_hosts.value "$1}'

36
plugins/cacti/cacti_poller_time Executable file
View file

@ -0,0 +1,36 @@
#!/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 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 2 -d":" | awk '{print"poller_time.value "$1}'

36
plugins/cacti/cacti_rrds Executable file
View 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}'