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
Tools -> Common tools broke after upgrade
-
ChathamDaleJ
- Posts: 55
- Joined: Tue Jul 02, 2013 10:44 am
Re: Tools -> Common tools broke after upgrade
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?
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
I am having the same problem running 5.2.9 as well. Any Ideas?
Re: Tools -> Common tools broke after upgrade
I filed a bug report for this, ID #10161.
Former Nagios Employee
Re: Tools -> Common tools broke after upgrade
First, take a backup of the files:
Then run these commands:
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 /usr/local/nagiosxi/html/tools/mytools.php.bak
cp /usr/local/nagiosxi/html/tools/commontools.php /usr/local/nagiosxi/html/tools/commontools.php.bakCode: 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.phpIf 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