<div class="gmail_quote">On Dec 18, 2007 10:35 AM, Roger <<a href="mailto:Roger@nagioswiki.com">Roger@nagioswiki.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<span style="border-collapse:collapse"><div>I recently installed PNP for Nagios and am having problems with the RRD output displaying. I installed Nagios 2.10 from package on CentOS 4 (via RPMforge). Everything works well with NagiosQL.
</div><div><br></div><div>Per this doc, <span style="font-family:Helvetica;font-size:12px"><a href="http://www.ederdrom.de/pnp/doc_complete" target="_blank">http://www.ederdrom.de/pnp/doc_complete
</a></span></div><div><br></div><div>I downloaded the PNP code and ran "./configure" and then "make all && make install" This, by default, installed everything into /usr/local/nagios/pnp/
</div><div><br></div><div>I made a sym link: ln -s /usr/local/nagios/share/pnp /var/www/html/pnp (because the PHP front end files are located there)</div><div><br>
</div><div>And I also made the default checks that the documentation told me to make the following changes in /etc/nagios/nagios.cfg</div><div><br></div><div><span style="border-collapse:separate;color:rgb(51, 51, 51);font-family:Verdana;line-height:19px">

<pre style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0.5em;padding-right:0.5em;padding-bottom:0.5em;padding-left:0.5em;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:dashed;border-right-style:dashed;border-bottom-style:dashed;border-left-style:dashed;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);color:rgb(51, 51, 51);overflow-x:auto;overflow-y:auto;background-color:rgb(247, 249, 250);width:98%;font-size:100%">
 process_performance_data=1</pre></span></div><div><br></div><div><span style="border-collapse:separate;color:rgb(51, 51, 51);font-family:Verdana;line-height:19px">
<pre style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0.5em;padding-right:0.5em;padding-bottom:0.5em;padding-left:0.5em;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:dashed;border-right-style:dashed;border-bottom-style:dashed;border-left-style:dashed;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);color:rgb(51, 51, 51);overflow-x:auto;overflow-y:auto;background-color:rgb(247, 249, 250);width:98%;font-size:100%">
 service_perfdata_command=process-service-perfdata</pre></span></div><div>And in NagiosQL, I made the following definitions in  the commands - CheckCommands section.</div><div><br></div><div>
<span style="border-collapse:separate;color:rgb(51, 51, 51);font-family:Verdana;line-height:19px"><pre style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0.5em;padding-right:0.5em;padding-bottom:0.5em;padding-left:0.5em;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:dashed;border-right-style:dashed;border-bottom-style:dashed;border-left-style:dashed;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);color:rgb(51, 51, 51);overflow-x:auto;overflow-y:auto;background-color:rgb(247, 249, 250);width:98%;font-size:100%">
define command {
  command_name    process-service-perfdata
  command_line    /usr/bin/perl /usr/local/nagios/libexec/process_perfdata.pl
}

define command {
  command_name    process-host-perfdata
  command_line    /usr/bin/perl /usr/local/nagios/libexec/process_perfdata.pl -d HOSTPERFDATA
}</pre></span></div><div><br></div><div>And in NagiosQL's specialty - Service Ext Info, I made the following entry (modified for my environment)</div><div><br></div><div><span style="border-collapse:separate;color:rgb(51, 51, 51);font-family:Verdana;line-height:19px">

<pre style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0.5em;padding-right:0.5em;padding-bottom:0.5em;padding-left:0.5em;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:dashed;border-right-style:dashed;border-bottom-style:dashed;border-left-style:dashed;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);color:rgb(51, 51, 51);overflow-x:auto;overflow-y:auto;background-color:rgb(247, 249, 250);width:98%;font-size:100%">
define serviceextinfo {
  host_name             <a href="http://mybox.mydomain.com" target="_blank">mybox.mydomain.com</a>
  service_description   check_load
  action_url            /nagios/pnp/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$
}</pre></span></div><div><br></div><div>Now when I got to <a href="http://nagiosBox/nagios/pnp" style="color:rgb(0, 0, 204)" target="_blank">http://nagiosBox/pnp</a> I get the following error: "Hostname is not set".
</div><div><br></div><div>Where do I set this HOSTNAME variable? Is this part of the Service Ext Info part?  Or is this parameter somehow not being properly passed to the PNP/PHP scripts?</div></span></blockquote><div><br class="webkit-block-placeholder">
</div><span class="Apple-style-span" style="border-collapse: collapse; "><div>I redid the ./configure command to match my CentOS environment for Nagios 2.10</div><div><br></div><div>./configure --prefix=/usr/local/nagios/
</div><div><br></div><div>and then redid the aformentioned command lines in the service definitions to match the path to the new perl scripts.  Then I went back in my checks in NagiosQL and checked the "performance data" box.
</div><div><br></div><div>I'm assuming all I have to do now is just let the rrd files generate themselves now?</div><div><br></div></span><div><span class="Apple-style-span" style="border-collapse: collapse; ">(I ran an 'ls' in the /usr/local/nagios/share/perfdata folder, but no folders by the same of hostnames, like I'm expecting) 
</span> </div></div><br>