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 [2018/02/05 09:07] – [Installation de PNP4Nagios] pteu | ||
---|---|---|---|
Line 1052: | Line 1052: | ||
* Choisir le mode de fonctionnement de pnp4nagios (cf http:// | * Choisir le mode de fonctionnement de pnp4nagios (cf http:// | ||
+ | <WRAP center round info 60%> | ||
+ | Note : ce mode semble buggué sur Debian 9 / Nagios 4.3.4 / PNP 0.6.26, utiliser plutôt d' | ||
+ | </ | ||
* Configurer Nagios pour qu'il fasse appel à PNP4Nagios : | * Configurer Nagios pour qu'il fasse appel à PNP4Nagios : | ||
Line 1085: | Line 1088: | ||
<code bash> | <code bash> | ||
ln -s / | ln -s / | ||
+ | |||
+ | # ou, avec un Nagios/PNP récemment compilée : | ||
+ | cp / | ||
+ | ln -s / | ||
</ | </ | ||
Line 1114: | Line 1121: | ||
<code bash> | <code bash> | ||
vi cgi.cfg | vi cgi.cfg | ||
- | action_url_target=main | + | action_url_target=_self |
</ | </ | ||
Line 1120: | Line 1127: | ||
<code bash> | <code bash> | ||
service nagios3 restart | service nagios3 restart | ||
+ | # OU | ||
+ | systemctl restart nagios | ||
</ | </ | ||
Line 1281: | Line 1290: | ||
$def[1] .= " | $def[1] .= " | ||
$def[1] .= " | $def[1] .= " | ||
+ | |||
+ | # pour afficher le dernier check sur le graphe | ||
+ | if($this-> | ||
+ | $def[1] .= " | ||
+ | } | ||
?> | ?> | ||
</ | </ | ||
Line 1288: | Line 1302: | ||
{{ : | {{ : | ||
+ | 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 1456: | ||
{{ : | {{ : | ||
+ | ====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