Page 1 of 1

Tools -> Common tools broke after upgrade

Posted: Mon Jul 18, 2016 10:30 am
by ChathamDaleJ
Using Nagios 5.2.9. Upgraded last week. Since the pubrade, an absolute URL inthe tools page gets translated into a relative URL.

<a href='https%3A%2F%2Fnagios%2Flocal%2Foncall-calendar.php' target='_blank'>https://nagios/local/oncall-calendar.php</a>

This is where it tries to go:
https://nagios/nagiosxi/tools/https%3A% ... lendar.php

Re: Tools -> Common tools broke after upgrade

Posted: Mon Jul 18, 2016 11:12 am
by bwallace
I'll try to reproduce this here, but what version were you running prior to upgrading?
In the meantime, have you tried deleting / re-adding this tool / URL and does it work after that?

Re: Tools -> Common tools broke after upgrade

Posted: Thu Nov 17, 2016 11:52 am
by Robert_Gropman
I am having the same problem running 5.2.9 as well. Any Ideas?

Re: Tools -> Common tools broke after upgrade

Posted: Thu Nov 17, 2016 4:10 pm
by rkennedy
I filed a bug report for this, ID #10161.

Re: Tools -> Common tools broke after upgrade

Posted: Thu Nov 17, 2016 4:51 pm
by ssax
First, take a backup of the files:

Code: Select all

cp /usr/local/nagiosxi/html/tools/mytools.php /usr/local/nagiosxi/html/tools/mytools.php.bak
cp /usr/local/nagiosxi/html/tools/commontools.php /usr/local/nagiosxi/html/tools/commontools.php.bak
Then run these commands:

Code: Select all

sed -i 's/urlencode(\$r\["url"\])/\$r\["url"\]/g' /usr/local/nagiosxi/html/tools/mytools.php
sed -i 's/urlencode(\$r\["url"\])/\$r\["url"\]/g' /usr/local/nagiosxi/html/tools/commontools.php
Then test it and let us know if it resolves the issue.

If you need to revert for any reason, run these commands:

Code: Select all

cp /usr/local/nagiosxi/html/tools/mytools.php.bak /usr/local/nagiosxi/html/tools/mytools.php
cp /usr/local/nagiosxi/html/tools/commontools.php.bak /usr/local/nagiosxi/html/tools/commontools.php