Scheduled Downtime only working if user is admin
Scheduled Downtime only working if user is admin
very weird issue happening here.....
If I click on the "schedule downtime" link, it loads in about 5 seconds. If any user clicks on it, it just spins and spins and spins. It never loads. I then made a user an admin, the page loaded just as quick for them as it did for me. I then removed his admin and changed back to a user and the issue reappears.
I checked the http error_log and other files and could see no relevant log entries.
If I click on the "schedule downtime" link, it loads in about 5 seconds. If any user clicks on it, it just spins and spins and spins. It never loads. I then made a user an admin, the page loaded just as quick for them as it did for me. I then removed his admin and changed back to a user and the issue reappears.
I checked the http error_log and other files and could see no relevant log entries.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Re: Scheduled Downtime only working if user is admin
Hmm, are you seeing anything in your /var/log/httpd/access_log or /var/log/httpd/ssl_access_log when you try it as a non-admin?
See if you have the logging enabled, edit this file:
At the top, change this line:
To:
Run this tail command and make it spin again:
Post the sanitized output.
See if you have the logging enabled, edit this file:
Code: Select all
/usr/local/nagiosxi/html/includes/db.inc.phpCode: Select all
error_reporting($error_level);Code: Select all
//error_reporting($error_level);Code: Select all
tail -fn0 /var/log/httpd/*error* /var/log/httpd/*access*Re: Scheduled Downtime only working if user is admin
Ok, here is the not sanitized output, too busy and lazy to care...its just IPs anyway!
This happens in all browsers, but I was trying this test in Microsoft Edge so I didn't have to logout of my session in Chrome...
The first 3 lines are instantly logged when I click the link.
The next 3 come up after it draws the column headers and then just spins more and more and more
The rest of the lines are same and written every 30 seconds.
Code: Select all
[Mon May 16 12:55:04 2016] [error] [client 10.150.253.1] PHP Notice: Undefined offset: 1000 in /usr/local/nagiosxi/html/includes/components/helpsystem/helpsystem.inc.php on line 252, referer: http://iss-chi-nag05.net.itciss.com/nagiosxi/
10.150.253.1 - - [16/May/2016:12:55:04 -0500] "GET /nagiosxi/includes/components/xicore/downtime.php HTTP/1.1" 200 21167 "http://iss-chi-nag05.net.itciss.com/nagiosxi/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
10.150.253.1 - - [16/May/2016:12:55:05 -0500] "GET /nagiosxi/ajaxhelper.php?cmd=getusermeta&opts=view_rotation_enabled&nsp=bb3fd870d2141c0c4173341e9908f76e HTTP/1.1" 200 - "http://iss-chi-nag05.net.itciss.com/nagiosxi/includes/components/xicore/downtime.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
10.150.253.1 - - [16/May/2016:12:54:28 -0500] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_comments_html%22%2C%22args%22%3A%7B%7D%7D&nsp=bb3fd870d2141c0c4173341e9908f76e HTTP/1.1" 200 24210381 "http://iss-chi-nag05.net.itciss.com/nagiosxi/includes/components/xicore/status.php?show=comments" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
10.150.253.1 - - [16/May/2016:12:55:05 -0500] "GET /nagiosxi/includes/components/nagioscore/ui/statusjson.php?username=XXXXXXXX&ticket=XXXXXXX&query=downtimelist&details=true HTTP/1.1" 500 - "http://iss-chi-nag05.net.itciss.com/nagiosxi/includes/components/xicore/downtime.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
10.150.253.1 - - [16/May/2016:12:57:09 -0500] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_pagetop_alert_content_html%22%2C%22args%22%3A%22%22%7D&nsp=bb3fd870d2141c0c4173341e9908f76e HTTP/1.1" 200 - "http://iss-chi-nag05.net.itciss.com/nagiosxi/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
10.150.253.1 - - [16/May/2016:12:57:39 -0500] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_pagetop_alert_content_html%22%2C%22args%22%3A%22%22%7D&nsp=bb3fd870d2141c0c4173341e9908f76e HTTP/1.1" 200 - "http://iss-chi-nag05.net.itciss.com/nagiosxi/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
10.150.253.1 - - [16/May/2016:12:58:09 -0500] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_pagetop_alert_content_html%22%2C%22args%22%3A%22%22%7D&nsp=bb3fd870d2141c0c4173341e9908f76e HTTP/1.1" 200 - "http://iss-chi-nag05.net.itciss.com/nagiosxi/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
10.150.253.1 - - [16/May/2016:12:58:39 -0500] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_pagetop_alert_content_html%22%2C%22args%22%3A%22%22%7D&nsp=bb3fd870d2141c0c4173341e9908f76e HTTP/1.1" 200 - "http://iss-chi-nag05.net.itciss.com/nagiosxi/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
10.150.253.1 - - [16/May/2016:12:59:09 -0500] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_pagetop_alert_content_html%22%2C%22args%22%3A%22%22%7D&nsp=bb3fd870d2141c0c4173341e9908f76e HTTP/1.1" 200 - "http://iss-chi-nag05.net.itciss.com/nagiosxi/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
10.150.253.1 - - [16/May/2016:12:59:39 -0500] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_pagetop_alert_content_html%22%2C%22args%22%3A%22%22%7D&nsp=bb3fd870d2141c0c4173341e9908f76e HTTP/1.1" 200 - "http://iss-chi-nag05.net.itciss.com/nagiosxi/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
10.150.253.1 - - [16/May/2016:12:59:46 -0500] "GET /nagiosxi/ajaxhelper.php?cmd=keepalive&opts=1&nsp=bb3fd870d2141c0c4173341e9908f76e HTTP/1.1" 200 - "http://iss-chi-nag05.net.itciss.com/nagiosxi/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
10.150.253.1 - - [16/May/2016:13:00:09 -0500] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_pagetop_alert_content_html%22%2C%22args%22%3A%22%22%7D&nsp=bb3fd870d2141c0c4173341e9908f76e HTTP/1.1" 200 - "http://iss-chi-nag05.net.itciss.com/nagiosxi/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
10.150.253.1 - - [16/May/2016:13:00:39 -0500] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_pagetop_alert_content_html%22%2C%22args%22%3A%22%22%7D&nsp=bb3fd870d2141c0c4173341e9908f76e HTTP/1.1" 200 - "http://iss-chi-nag05.net.itciss.com/nagiosxi/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
10.150.253.1 - - [16/May/2016:13:01:09 -0500] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_pagetop_alert_content_html%22%2C%22args%22%3A%22%22%7D&nsp=bb3fd870d2141c0c4173341e9908f76e HTTP/1.1" 200 - "http://iss-chi-nag05.net.itciss.com/nagiosxi/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
10.150.253.1 - - [16/May/2016:13:01:39 -0500] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_pagetop_alert_content_html%22%2C%22args%22%3A%22%22%7D&nsp=bb3fd870d2141c0c4173341e9908f76e HTTP/1.1" 200 - "http://iss-chi-nag05.net.itciss.com/nagiosxi/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
The first 3 lines are instantly logged when I click the link.
The next 3 come up after it draws the column headers and then just spins more and more and more
The rest of the lines are same and written every 30 seconds.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Re: Scheduled Downtime only working if user is admin
This is the critical part, I've modified yours to strip out the username/ticket:
The user is getting a 500 error, let's modify the URL and go to it directly and see what it says for that user:
- Change YOURXISERVER, USERNAME, and TICKET to the values that you previously provided in the logs
Let me know what it says in the browser.
Code: Select all
10.150.253.1 - - [16/May/2016:12:55:05 -0500] "GET /nagiosxi/includes/components/nagioscore/ui/statusjson.php?username=XXXXXXXX&ticket=XXXXXXX&query=downtimelist&details=true HTTP/1.1" 500 - "http://iss-chi-nag05.net.itciss.com/nagiosxi/includes/components/xicore/downtime.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"- Change YOURXISERVER, USERNAME, and TICKET to the values that you previously provided in the logs
Code: Select all
http://YOURXISERVER/nagiosxi/includes/components/nagioscore/ui/statusjson.php?username=USERNAME&ticket=TICKET&query=downtimelist&details=trueRe: Scheduled Downtime only working if user is admin
Nothing ever happens in the browser, chrome, edge and ie all tested and all just sit and spin over and over with no error ever happening.
Edit: and as soon as I said that, Edge finally came back with:
And chrome just stopped spinning and ended with a white page, no error.
Edit: and as soon as I said that, Edge finally came back with:
Code: Select all
HTTP 500 error
That's odd... Microsoft Edge can’t find this page
This page can’t be displayed, because this site’s server might be under maintenance or there could be a programming error.
Try this
•Go back to the last page
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Re: Scheduled Downtime only working if user is admin
Are these local users, or LDAP users by any chance? I had a similar issue, which was a bug because the UPPER and lower cases didn't line up in cgi.cfg.
Former Nagios Employee
Re: Scheduled Downtime only working if user is admin
These are local users....slowly switching to AD, but the one I am testing with is local.rkennedy wrote:Are these local users, or LDAP users by any chance? I had a similar issue, which was a bug because the UPPER and lower cases didn't line up in cgi.cfg.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Re: Scheduled Downtime only working if user is admin
I decided to test further, a normal user is able to load the page. This is only affecting users that are contacts on no hosts/services and have these permissions:
You do not have the required permissions to view the files attached to this post.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Re: Scheduled Downtime only working if user is admin
Does your /usr/local/nagios/etc/cgi.cfg have these users in there (case-sensitive) on the correct entries?
Re: Scheduled Downtime only working if user is admin
Yes sir, they are all there(well all the ones with the preferences above of course). All lower-case and so are their IDs in XI and in the URL.ssax wrote:Does your /usr/local/nagios/etc/cgi.cfg have these users in there (case-sensitive) on the correct entries?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github