Navigation
Artikel
Stuff
RSS Feeds
|
Sourcecodes - PNP4Nagios check_traffic.phpSprachenübersicht/PHP/Nagios Keywords: pnp 4 nagios template check traffic monitoring graphs Dieser Sourcecode dient zur grafischen der Ausgabe von check_traffic_byproc in PNP4Nagios.
check_traffic.php: <?php # # Date: 14.04.2008 # Author: Julian Golderer # Plugin: check_traffic http://www.nagiosexchange.org/cgi-bin/page.cgi?g=Detailed%2F2157.html;d=1 # $opt[1] = "--vertical-label \"Traffic\" -b 1024 --title \"Interface Traffic for $hostname / $servicedesc\" "; $def[1] = "DEF:var1=$rrdfile:$DS[2]:AVERAGE " ; $def[1] .= "DEF:var2=$rrdfile:$DS[1]:AVERAGE " ; $def[1] .= "DEF:dt=$rrdfile:$DS[3]:AVERAGE " ; $def[1] .= "CDEF:cvar1=var1,dt,/ " ; $def[1] .= "CDEF:cvar2=var2,dt,/ " ; $def[1] .= "LINE1:cvar1#003300:\"in\" " ; $def[1] .= "GPRINT:cvar1:LAST:\"%7.2lf %Sb/s last\" " ; $def[1] .= "GPRINT:cvar1:AVERAGE:\"%7.2lf %Sb/s avg\" " ; $def[1] .= "GPRINT:cvar1:MAX:\"%7.2lf %Sb/s max\\n\" " ; $def[1] .= "LINE1:cvar2#00ff00:\"out\" " ; $def[1] .= "GPRINT:cvar2:LAST:\"%7.2lf %Sb/s last\" " ; $def[1] .= "GPRINT:cvar2:AVERAGE:\"%7.2lf %Sb/s avg\" " ; $def[1] .= "GPRINT:cvar2:MAX:\"%7.2lf %Sb/s max\" " ?> Gibt es noch irgendwelche Fragen, oder wollen Sie über den Artikel diskutieren? Sprachenübersicht/PHP/Nagios/PNP4Nagios check_traffic.php |