Tools -> Common tools broke after upgrade

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ChathamDaleJ
Posts: 55
Joined: Tue Jul 02, 2013 10:44 am

Tools -> Common tools broke after upgrade

Post 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
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Tools -> Common tools broke after upgrade

Post 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?
Be sure to check out the Knowledgebase for helpful articles and solutions!
Robert_Gropman
Posts: 1
Joined: Thu Sep 29, 2016 12:13 pm

Re: Tools -> Common tools broke after upgrade

Post by Robert_Gropman »

I am having the same problem running 5.2.9 as well. Any Ideas?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Tools -> Common tools broke after upgrade

Post by rkennedy »

I filed a bug report for this, ID #10161.
Former Nagios Employee
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Tools -> Common tools broke after upgrade

Post 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
Locked