Hi Mad, I have checked and tried to changed php template file of " Swap Utilization" but am not able to generate colors in graph as per service status (i.e. Green,Yellow,Red as per service status ). Have attached php file and graph as well for your reference. obviously I have changed hostname in PHP file.
I am not PHP expert to make changes in pnp template. Could you please suggest what changes need to make for the same ? Mohandas Kudva K ASE Tata Consultancy Services Cell:- +91 9619144048 Mailto: mohanda...@tcs.com Website: http://www.tcs.com ____________________________________________ Experience certainty. IT Services Business Solutions Outsourcing ____________________________________________ MAD <sri.lu...@free.fr> 04/09/2009 08:33 PM To mohandas k <mohanda...@tcs.com> cc nagios-users@lists.sourceforge.net Subject Re: [Nagios-users] Pppnp4nagios graph customization I managed to create some templates graphing in different colors according to the threshold defined with your services This will graph in green if the value is under the warning threshold, in yellow if it is between warning and critical threshold and red if it is beyond critical threshold or unknown... I don't know how to do this if the performance and the state are independent (for example if perf are the execution time of the check script...) Marc-André ----- Mail Original ----- De: "mohandas k" <mohanda...@tcs.com> À: nagios-users@lists.sourceforge.net Envoyé: Jeudi 9 Avril 2009 15h30:05 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne Objet: [Nagios-users] Pppnp4nagios graph customization Hi All, We have installed nagios (3.0.5) on Solaris sparc box and configured rrdtool (1.2.19) along with pnp4nagios- npcd (0.4.13) for dashboard/graph. By default we are getting following graph for locolhost free swap. I want to configure following requirements : (1) can we add more variable (i.e say "Total Swap" ) in graph ? (2) Can we create different-different color in graph for different-different status critical-> RED,OK->Green,Warnijng->Yellow ? (3) last question how can we change graph updation time interval (here it's showing as 20 Minutes) however in our service definition,it's 10 Minutes Following is default graph for your better understanding : =====-----=====-----===== Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null ForwardSourceID:NT00000F5E =====-----=====-----===== Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
<<image/gif>>
<?php # # Template for check_swap # Copyright (c) 2006-2008 Joerg Linge (http://www.pnp4nagios.org) # $Id: check_swap.php 367 2008-01-23 18:10:31Z pitchfork $ # # # RRDtool Options $opt[1] = "-X 0 --vertical-label MB -l 0 -u $MAX[1] --title \"Swap Utilization HOST=HOST1 \" "; # # # Graphen Definitions if ($WARN[1] != "") { $warnThresh = $WARN[1]; $def[1] .= "HRULE:$WARN[1]#ffff00 "; } if ($CRIT[1] != "") { $critThresh = $CRIT[1]; $def[1] .= "HRULE:$CRIT[1]#ff0000 "; } if($NAGIOS_SERVICESTATE == "WARNING"){ $couleurEtat = "ffff00"; } if($NAGIOS_SERVICESTATE == "CRITICAL"){ $couleurEtat = "ff0000"; } $def[1] .= "DEF:var1=$rrdfile:$DS[1]:AVERAGE "; $def[1] .= "AREA:var1#c6c6c6:\"Swap used\\n\" "; $def[1] .= "LINE1:var1#003300: "; $def[1] .= "HRULE:$MAX[1]#003300:\"Total Capacity $MAX[1] MB \" "; $def[1] .= "HRULE:$WARN[1]#ffff00:\"Warning on $WARN[1] MB \" "; $def[1] .= "HRULE:$CRIT[1]#ff0000:\"Critical on $CRIT[1] MB \\n\" "; $def[1] .= "GPRINT:var1:LAST:\"%6.2lf MB currently used \\n\" "; ?>
------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com
_______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null