<tt><font size=3>I have managed to put the text into the graphs ( watermark)
by adding the option directly into the respective php file ( e.g. check_snmp_int.php).
All the php files seem to have already an $opt[1] line which overrides
the general options.</font></tt>
<br>
<br><tt><font size=3>I am still stucked with the PDF background file however.</font></tt>
<br>
<br><tt><font size=3>Thanks once again!</font></tt>
<br>
<br>
<br><tt><font size=3>----------------------------------------------------------------------------</font></tt>
<br><tt><font size=3>I can't say I've ever tried that.  I would think
you need to append to<br>
rather than replace the graph options though, so wouldn't it be ..<br>
<br>
  $conf['graph_opt'] .= " --watermark 'Test'"<br>
<br>
(note the ".=" rather than just "=" and the space added
before --watermark )<br>
<br>
I don't have my Nagios system to hand at the moment so can't take a<br>
look myself.  Remind me on Monday if you're still stuck and I'll have<br>
a play with that myself.<br>
<br>
Another option is to create some graphs outside of PNP altogether (but<br>
using the .rrd databases created by PNP).  See:<br>
<br>
</font></tt><a href=http://oss.oetiker.ch/rrdtool/doc/rrdcgi.en.html target=_new><tt><font size=3 color=blue><u>http://oss.oetiker.ch/rrdtool/doc/rrdcgi.en.html</u></font></tt></a><tt><font size=3><br>
<br>
Again, I can dig out some examples for you if you remind me during the<br>
week (or do a search - I'm sure we've covered this topic before either<br>
here or on the PNP email list some time in the last few months).</font></tt>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">Von:      
 </font><font size=1 face="sans-serif">Radu Popa/Technomatic</font>
<br><font size=1 color=#5f5f5f face="sans-serif">An:      
 </font><font size=1 face="sans-serif">nagios-users@lists.sourceforge.net</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Datum:      
 </font><font size=1 face="sans-serif">07/02/2011 09:36 AM</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Betreff:    
   </font><font size=1 face="sans-serif">Antwort: RE:
MRTG graphs problem - measurement units not taken into consideration</font>
<br>
<hr noshade>
<br>
<br><tt><font size=3>Hello again,</font></tt>
<br>
<br><tt><font size=3>Can you please give some guidelines how to customize
the PNP4Nagios background page? I have tried using the $conf['graph_opt']
= "--watermark 'Test'" option, but it does not take it. Also
modifications done on the background.pdf file are not updated. Already
restarted apache and nagios services. In general I would like to add some
logos and/or text.</font></tt>
<br>
<br><tt><font size=3>Thank you!</font></tt>
<br>
<br><tt><font size=3>On 29 June 2011 13:23,  <Radu.Popa@...>
wrote:<br>
> After adding the -r option it works like a charm!<br>
><br>
> Now in pnp4nagios I can see both values on the same graph: bytes in
and<br>
> bytes out. I see them as two thin lines. Any way to make the lines
thicker<br>
> and change their colour?<br>
<br>
Well done.<br>
<br>
Yes, you can create a custom template.<br>
<br>
Take a look under /usr/local/pnp4nagios/share/templates.dist and find<br>
the file named check_snmp_int.php .  Copy it to the directory<br>
/usr/local/pnp4nagios/share/templates and then edit it to get the<br>
wider line.<br>
<br>
For example the line which reads:<br>
<br>
$def[1] .= "LINE1:var1#003300:\"in  \" " ;<br>
<br>
Change it to read:<br>
<br>
$def[1] .= "LINE3:var1#003300:\"in  \" " ;<br>
<br>
<br>
<br>
You will find documentation on how the LINE instruction works at:<br>
<br>
</font></tt><a href=http://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html target=_new><tt><font size=3 color=blue><u>http://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html</u></font></tt></a><tt><font size=3><br>
<br>
and some general help on PNP templates at:<br>
<br>
</font></tt><a href="http://docs.pnp4nagios.org/pnp-0.6/tpl" target=_new><tt><font size=3 color=blue><u>http://docs.pnp4nagios.org/pnp-0.6/tpl</u></font></tt></a>
<br>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">Von:      
 </font><font size=1 face="sans-serif">Radu Popa/Technomatic</font>
<br><font size=1 color=#5f5f5f face="sans-serif">An:      
 </font><font size=1 face="sans-serif">nagios-users@lists.sourceforge.net</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Datum:      
 </font><font size=1 face="sans-serif">06/29/2011 03:23 PM</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Betreff:    
   </font><font size=1 face="sans-serif">Antwort: RE:
MRTG graphs problem - measurement units not taken into consideration</font>
<br>
<hr noshade>
<br>
<br><font size=2 face="sans-serif">After adding the -r option it works
like a charm!</font>
<br>
<br><font size=2 face="sans-serif">Now in pnp4nagios I can see both values
on the same graph: bytes in and bytes out. I see them as two thin lines.
Any way to make the lines thicker and change their colour?</font>
<br>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">Von:      
 </font><font size=1 face="sans-serif">Radu Popa/Technomatic</font>
<br><font size=1 color=#5f5f5f face="sans-serif">An:      
 </font><font size=1 face="sans-serif">nagios-users@lists.sourceforge.net</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Datum:      
 </font><font size=1 face="sans-serif">06/29/2011 01:45 PM</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Betreff:    
   </font><font size=1 face="sans-serif">Antwort: RE:
MRTG graphs problem - measurement units not taken into consideration</font>
<br>
<hr noshade>
<br>
<br><font size=2 face="sans-serif">Was a typo error of the community string,
after putting "public" instead of "Public" everything
looks cool.</font>
<br>
<br><font size=2 face="sans-serif">Still 1 question:</font>
<br>
<br><font size=2 face="sans-serif">If I try to query interface GigabitEthernet0/2
I get the response:</font>
<br>
<br><font size=2 face="sans-serif">GigabitEthernet0/21:DOWN, GigabitEthernet0/23:DOWN,
GigabitEthernet0/24:UP No usable data on file (40 rows) , GigabitEthernet0/2:UP
No usable data on file (1 rows) , GigabitEthernet0/22:DOWN, GigabitEthernet0/20:UP
No usable data on file (1 rows) : 3 int NOK : CRITICAL</font>
<br>
<br><font size=2 face="sans-serif">So ti seems that it takes all interfaces
starting with "0/2" string. Any way to limit this? Do I have
to enter any escape character?</font>
<br>
<br><font size=2 face="sans-serif">Thank you!</font>
<br>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">Von:      
 </font><font size=1 face="sans-serif">Radu Popa/Technomatic</font>
<br><font size=1 color=#5f5f5f face="sans-serif">An:      
 </font><font size=1 face="sans-serif">nagios-users@lists.sourceforge.net</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Datum:      
 </font><font size=1 face="sans-serif">06/29/2011 01:29 PM</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Betreff:    
   </font><font size=1 face="sans-serif">Antwort: RE:
MRTG graphs problem - measurement units not taken into consideration</font>
<br>
<hr noshade>
<br>
<br><font size=2 face="sans-serif">Ok,</font>
<br>
<br><font size=2 face="sans-serif">Here is what I got so far:</font>
<br>
<br><font size=2 face="sans-serif">1. If I run the command: ./check_snmp_int.pl
-H 192.168.2.1 -C public -2 -n GigabitEthernet0/24 -fY -kqB -g -w 600000,600000,100,100,100000,10
-c 800000,800000,200,200,200000,20 -d 5 , I get the following output:</font>
<br><font size=2 face="sans-serif">GigabitEthernet0/24:UP (16.9Kbps/26.2Kbps/0.0/0.0/0.0/0.0):1
UP: OK | 'GigabitEthernet0/24_in_bps'=16899;600000000;800000000;0;1000000000
'GigabitEthernet0/24_out_bps'=26237;600000000;800000000;0;1000000000</font>
<br>
<br><font size=2 face="sans-serif">Before getting a correct output I run
the command several times. The initial output is GigabitEthernet0/24:UP
No usable data on file (102 rows) :(1 UP): UNKNOWN</font>
<br>
<br><font size=2 face="sans-serif">2. Defined the following command in
nagios:</font>
<br>
<br><font size=2 face="sans-serif">define command{</font>
<br><font size=2 face="sans-serif">        command_name
   check_snmp_int</font>
<br><font size=2 face="sans-serif">        command_line
   $USER1$/check_snmp_int.pl -H $HOSTADDRESS$ -C $USER5$ -2 -n
$ARG1$ -fY -kqB -g -w $ARG2$ -c $ARG3$ -d $ARG4$</font>
<br><font size=2 face="sans-serif">        }</font>
<br>
<br><font size=2 face="sans-serif">Where </font>
<br>
<br><font size=2 face="sans-serif">And the corresponding service check:</font>
<br>
<br><font size=2 face="sans-serif">define service{</font>
<br><font size=2 face="sans-serif">        use  
                  generic-service,pnpgraphed-service
     ; Inherit values from a template</font>
<br><font size=2 face="sans-serif">        host_name
              test_sw</font>
<br><font size=2 face="sans-serif">        service_description
    Port 24 Bandwidth Usage</font>
<br><font size=2 face="sans-serif">        check_command
          check_snmp_int!"GigabitEthernet0/24"!600000,600000,100,100,100000,10!800000,800000,200,200,200000,20!10</font>
<br><font size=2 face="sans-serif">        normal_check_interval
  2               ; Check the service
every 2 units under normal conditions</font>
<br><font size=2 face="sans-serif">        retry_check_interval
   1               ; Re-check
the service every 1 unit until its final/hard state is determined</font>
<br><font size=2 face="sans-serif">        }</font>
<br>
<br><font size=2 face="sans-serif">In nagios service status I get now:
</font><font size=3>ERROR: Description table : No response from remote
host "192.168.2.1". </font>
<br>
<br><font size=2 face="sans-serif">In resources I have defined $USER5$=Public</font>
<br>
<br><font size=2 face="sans-serif">Ideas, please?</font>
<br>
<br><font size=2 face="sans-serif">Thank you!</font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">Von:      
 </font><font size=1 face="sans-serif">Radu Popa/Technomatic</font>
<br><font size=1 color=#5f5f5f face="sans-serif">An:      
 </font><font size=1 face="sans-serif">nagios-users@lists.sourceforge.net</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Datum:      
 </font><font size=1 face="sans-serif">06/28/2011 05:14 PM</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Betreff:    
   </font><font size=1 face="sans-serif">RE: MRTG graphs
problem - measurement units not taken into consideration</font>
<br>
<hr noshade>
<br>
<br><font size=2 face="sans-serif">I have tried the SNMP plugin a few minutes
ago and here is what I get when running it from the command line:</font>
<br>
<br><font size=2 face="sans-serif">./check_snmp_int.pl -H 192.168.2.1 -C
public -n GigabitEthernet0/24 -k -w 200,400 -c 0,600</font>
<br><font size=2 face="sans-serif">GigabitEthernet0/24:UP No usable data
on file (1 rows) :(1 UP): UNKNOWN</font>
<br>
<br><font size=2 face="sans-serif">The interface name I took it from listing
all available interfaces on the switch.</font>
<br>
<br><font size=2 face="sans-serif">Any ideas, please?</font>
<br>
<br><font size=2 face="sans-serif">Thanks!</font>
<br>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">Von:      
 </font><font size=1 face="sans-serif">Radu Popa/Technomatic</font>
<br><font size=1 color=#5f5f5f face="sans-serif">An:      
 </font><font size=1 face="sans-serif">nagios-users@lists.sourceforge.net</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Datum:      
 </font><font size=1 face="sans-serif">06/28/2011 03:31 PM</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Betreff:    
   </font><font size=1 face="sans-serif">MRTG graphs
problem - measurement units not taken into consideration</font>
<br>
<hr noshade>
<br>
<br><font size=2 face="sans-serif">Hello,</font>
<br>
<br><font size=2 face="sans-serif">I am using Nagios to monitor the bandwidth
usage of a couple of switches/routers via the check_local_mrtgtraf command.
The graphs I handle via pnp4nagios. The problem I encounter is the following:
if the monitored bandwidth is at one point expressed in KB/s and then I
bring a lot of traffic through the router the, unit is changed into MB/s.
The graphed values seem not to take into consideration the change of the
measurement unit meaning that the 50KB/s seems to be at the same height
as the 50MB/s value in the graph.</font>
<br>
<br><font size=2 face="sans-serif">Can anyone please help?</font>
<br>
<br><font size=2 face="sans-serif">Thank you!</font>
<br>