Projet

Général

Profil

Révision f038b18b

IDf038b18b35e3005ac661bb38efaf9a9d586d5a21
Parent c7bceeb4
Enfant 0767fa14

Ajouté par Kasandra Padisha il y a presque 14 ans

Initial version

Voir les différences:

plugins/other/cacti_rrds
1
#!/bin/bash
2
#
3
# Munin script to obtain the number of RRDs processed
4
#                  by kasandrapadisha@gmail.com
5
#
6

  
7
#----- Configuration variables
8
database="cacti"
9
hostname="localhost"
10
user="admincacti"
11
password="passwdcacti"
12

  
13

  
14
#----- Configuration variables
15
if [[ $1 != "" ]]; then
16
    if [[ $1 == "autoconf" ]]; then
17
        echo "yes"
18
        exit 0
19
    fi
20
    if [[ $1 == "config" ]]; then
21
        echo "graph_title RRDs Procesados Time"
22
        echo "graph_vlabel Numero de RRDs"
23
        echo "rrds.label rrds"
24
        echo 'graph_category cacti'
25
        exit 0
26
    fi
27
fi
28

  
29
salida=`mysql -B -e "SELECT value FROM settings WHERE name='stats_poller' LIMIT 1" -h $hostname --user=$user --password=$password $database`
30

  
31
if [[ $? != 0 ]]; then
32
        echo "No se pudo ejecutar"
33
        exit 0
34
fi
35

  
36
echo $salida | cut -f 9 -d":" | awk '{print"rrds.value "$1}'

Formats disponibles : Unified diff