Page 1 of 2
Not Authorized You are not authorized to view the requested
Posted: Fri Mar 30, 2018 1:42 pm
by haile711
Hello Support,
I have this issue on all my nagios servers
Not Authorized
You are not authorized to view the requested object, or the object does not exist.
If the services has a "=" in it, before i know if i remove them from the "illegal" characters in the "nagios.cfg" it works, but now its doesn't anymore
Example on the picture, the top url i can click and get in the service for stuff like "force check" or view "advance command"
but the bottom with the "chocolate=xxxx" i cannot
Thanks
Hai
Re: Not Authorized You are not authorized to view the reques
Posted: Fri Mar 30, 2018 1:55 pm
by scottwilkerson
That is why there are marked as illegal_object_name_chars you must have also removed the ? which I would guess will also cause problems
These need to be in there for Nagios to not have problems
Code: Select all
illegal_macro_output_chars=`~$&|'"<>
illegal_object_name_chars=`~!$%^&*|'"<>?,()=
Re: Not Authorized You are not authorized to view the reques
Posted: Fri Mar 30, 2018 1:55 pm
by npolovenko
@haile711, Try putting the escape character before the equals sign “\”.
Re: Not Authorized You are not authorized to view the reques
Posted: Fri Mar 30, 2018 2:38 pm
by haile711
@scottwilkerson i have removed those from the nagios.cfg. This is my current list of illegal chars
illegal_macro_output_chars=`~$|'"<>
illegal_object_name_chars=`~!$^*|'"<>,()
@npolovenko, I have also tried that but doesn't work
here is the current configuration
define service {
host_name ma100mlvnav018
servicegroups Environment URL
service_description
http://MA100MLVNAV018:8080/shop/product ... ?ID=809315
display_name
http://MA100MLVNAV018:8080/shop/product ... ?ID=809315
check_command check_envurl!MA100MLVNAV018!-p 8080!-u "/shop/product/frango-chocolates-45-pc.-milk-sea-salt-caramel-box-of-chocolates?ID=809315"!!!!!
max_check_attempts 3
check_interval 5
retry_interval 1
check_period 24x7
contact_groups siteops
event_handler notify-service-by-email
notification_interval 15
notification_period 24x7
notification_options w,c,r
notifications_enabled 0
register 1
}
Re: Not Authorized You are not authorized to view the reques
Posted: Fri Mar 30, 2018 2:46 pm
by scottwilkerson
haile711 wrote:@scottwilkerson i have removed those from the nagios.cfg. This is my current list of illegal chars
Code: Select all
illegal_macro_output_chars=`~$|'"<>
illegal_object_name_chars=`~!$^*|'"<>,()
I realize you removed them, but by doing so that broke the system.
These were there on purpose, while you CAN remove them, there are consequences for doing so, in this case, it will break the links.
They need to go back in there for everything to function properly.
Re: Not Authorized You are not authorized to view the reques
Posted: Fri Mar 30, 2018 2:54 pm
by haile711
@scottwilkerson, I know that this is not the right way to do so, but what I want to know if I removed the "=" in the "service_description" then I can click on the service to go into the service, but if i leave "=" sign in there then i get "NOT Authorized", I have removed these chars from the "nagios.cfg" before and it working fine, and now its not after update. I also know by removing them can cause problem, but the current problem is not from removing this on the nagios.cfg.
Re: Not Authorized You are not authorized to view the reques
Posted: Fri Mar 30, 2018 3:01 pm
by scottwilkerson
haile711 wrote:@scottwilkerson, I know that this is not the right way to do so, but what I want to know if I removed the "=" in the "service_description" then I can click on the service to go into the service, but if i leave "=" sign in there then i get "NOT Authorized", I have removed these chars from the "nagios.cfg" before and it working fine, and now its not after update. I also know by removing them can cause problem, but the current problem is not from removing this on the nagios.cfg.
I suspect the problem has more to do with the ? than the =
a URL can only have 1 ?, and when you click the link it is going to have 2
That said, there is likely a whole bunch of other things you may not be able to see that could also break, like notifications, certain default check commands may not work because these chars have special meaning on the command line as well
Re: Not Authorized You are not authorized to view the reques
Posted: Fri Mar 30, 2018 3:08 pm
by haile711
@scottwilkerson
Its the "=" sign, i removed them then i can click on them, i still left the "?" sign there
example in the picture.
This same check, if i put the "=" sign in between the api_key and the actual key then i cannot view it.
Re: Not Authorized You are not authorized to view the reques
Posted: Fri Mar 30, 2018 3:13 pm
by scottwilkerson
Alright, there you have it tested, however this still stands
scottwilkerson wrote:That said, there is likely a whole bunch of other things you may not be able to see that could also break, like notifications, certain default check commands may not work because these chars have special meaning on the command line as well
Re: Not Authorized You are not authorized to view the reques
Posted: Fri Mar 30, 2018 3:25 pm
by haile711
@scottwilkerson,
Currently we do not have issue with alerting, or any other commands that we know of yet.
I am still trying to figure out how to key the how "url" with the "=" sign in and be able to view the service to do "forced check" or disable or enable notifications.