Page 1 of 1

Action URL

Posted: Mon Feb 04, 2013 5:02 am
by rbaholding
Good morning,

We have installed pnp4nagios. We need action URL to see perf data from our Host, but $HOSTNAME$ macro in action URL doesn't works.

For example: action URL definition for host is: /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=_HOST_

The result is always: perfdata directory "/usr/local/pnp4nagios/var/perfdata/$HOSTNAME$" for host "$HOSTNAME$" does not exist

If we change $HOSTNAME$ for host name manually works fine.

What are we doing wrong?

Regards

Re: Action URL

Posted: Mon Feb 04, 2013 10:08 am
by scottwilkerson
First, is this an XI install (as you are posting in the XI forum)

If so, pnp4nagios is installed by default and if you installed a different version this could cause other problems.

What version of Nagios are you running?

Re: Action URL

Posted: Mon Feb 04, 2013 10:14 am
by rbaholding
Yes is a Nagios XI installation. We want to use Action URLs but $HOSTNAME$ macro don't works

How can I test if is a macro problem or pnp4nagios problem?

Re: Action URL

Posted: Mon Feb 04, 2013 10:25 am
by slansing
What version of Nagios XI are you using? Did you try to install PNP 4 NAGIOS over Nagios XI? Or are you using the included version.

Re: Action URL

Posted: Mon Feb 04, 2013 10:30 am
by rbaholding
Nagios XI version: 2012R1.5b

Yes we try to install pnp4nagios over the existing...

Re: Action URL

Posted: Mon Feb 04, 2013 11:17 am
by slansing
Lets try re installing PNP, Can you re download Nagios XI, then un tar the tarball and run the pnp script?:

Code: Select all

service ndo2db stop

service nagios stop

service httpd stop

Code: Select all

cd /tmp

rm -rf xi* nagiosxi

wget http://assets.nagios.com/downloads/nagiosxi/2012/xi-2012r1.5b.tar.gz

tar -zxf xi-2012r1.5b.tar.gz

cd nagiosxi/subcomponents/pnp/install
Then:

Code: Select all

service ndo2db start

service nagios start

service httpd start
Let us know how it looks after this. Thanks!

Re: Action URL

Posted: Tue Feb 05, 2013 5:38 am
by rbaholding
Problem solved. Thank you!!

Re: Action URL

Posted: Tue Feb 05, 2013 10:47 am
by slansing
Excellent, closing and marking as resolved.