informatique:logiciels:nagios
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
informatique:logiciels:nagios [2015/09/14 10:05] – check_snmp --rate pteu | informatique:logiciels:nagios [2016/04/01 07:34] – [Exemple 3] pteu | ||
---|---|---|---|
Line 1281: | Line 1281: | ||
$def[1] .= " | $def[1] .= " | ||
$def[1] .= " | $def[1] .= " | ||
+ | |||
+ | # pour afficher le dernier check sur le graphe | ||
+ | if($this-> | ||
+ | $def[1] .= " | ||
+ | } | ||
?> | ?> | ||
</ | </ | ||
Line 1288: | Line 1293: | ||
{{ : | {{ : | ||
+ | Le même, un peu plus perfectionné : | ||
+ | <code php> | ||
+ | <?php | ||
+ | # Copyright (c) 2006-2010 Joerg Linge (http:// | ||
+ | # Plugin: check_snmp_int.pl (COUNTER) | ||
+ | # modif traffic reseau in/out | ||
+ | |||
+ | $unit = " | ||
+ | |||
+ | $ds_name[1] = " | ||
+ | $opt[1] = " --vertical-label $unit -b 1000 --title \" | ||
+ | $def[1] = rrd:: | ||
+ | $def[1] .= rrd:: | ||
+ | |||
+ | #$def[1] .= " | ||
+ | $def[1] .= rrd:: | ||
+ | $def[1] .= rrd:: | ||
+ | |||
+ | $def[1] .= " | ||
+ | $def[1] .= rrd:: | ||
+ | |||
+ | if($this-> | ||
+ | $def[1] .= " | ||
+ | } | ||
+ | ?> | ||
+ | |||
+ | </ | ||
====Exemple 2 : courbe CPU==== | ====Exemple 2 : courbe CPU==== | ||
Line 1415: | Line 1447: | ||
{{ : | {{ : | ||
+ | ====Exemple 3 : graphique adaptatif==== | ||
+ | |||
+ | Ce template va détecter automatiquement le nombre d' | ||
+ | <code bash> | ||
+ | <?php | ||
+ | $unit = " | ||
+ | |||
+ | # max : 7 entrées | ||
+ | $TAB_COLORS = array('# | ||
+ | $CPT=1; | ||
+ | |||
+ | $ds_name[$CPT] = " | ||
+ | $opt[$CPT] = " --vertical-label $unit -b 1000 --title \" | ||
+ | |||
+ | foreach ($this-> | ||
+ | |||
+ | if ($CPT == " | ||
+ | $def[1] = rrd:: | ||
+ | } | ||
+ | else { | ||
+ | $def[1] .= rrd:: | ||
+ | } | ||
+ | |||
+ | $def[1] .= " | ||
+ | $def[1] .= rrd:: | ||
+ | |||
+ | $CPT++; | ||
+ | } | ||
+ | |||
+ | if($this-> | ||
+ | $def[1] .= " | ||
+ | } | ||
+ | ?> | ||
+ | |||
+ | </ | ||
======Tips====== | ======Tips====== |
informatique/logiciels/nagios.txt · Last modified: 2021/01/15 15:47 by pteu