Page 1 of 1
Can't view Service. NOT AUTHORIZED
Posted: Wed Jan 20, 2016 9:27 am
by amit.ahuja
I have a service name with long url as follow.
url.png
when I click on it, it shows that this service is not authorized or existed. This could be due to special charater = ? . Is there another way to get around that? I want service's name to be url so I can distinguish which one is which.
not authorized.png
Re: Can't view Service. NOT AUTHORIZED
Posted: Wed Jan 20, 2016 10:36 am
by hsmith
I can't replicate this on XI5.2.3. What happens if you remove the http:// from the name?
Re: Can't view Service. NOT AUTHORIZED
Posted: Wed Jan 20, 2016 3:44 pm
by amit.ahuja
still same issue. I named my service description with whole url
define service {
host_name ma100mlp_sec
servicegroups Environment URL
service_description http:// ma100mlp:9080/sdp/service-test/CatalogService/getProduct?productId=809315&channel=SITE
Re: Can't view Service. NOT AUTHORIZED
Posted: Wed Jan 20, 2016 4:29 pm
by rkennedy
What version of XI are you running? I tried to add a ? to my service description, and I'm alerted with a javascript error saying 'illegal characters'. See the screenshot below -
service-desc-illegal-chars.PNG
To answer your question though, yes, I believe the ? & = can all cause issues, because what your Nagios is trying to do is open this URL -
Code: Select all
http://nagoisxi/nagiosxi/includes/components/xicore/status.php?show=servicedetail&host=localhost&service=http://ma100mlp:9080/sdp/service-test/CatalogService/getProduct?productId=809315&channel=SITE&dest=auto
Re: Can't view Service. NOT AUTHORIZED
Posted: Wed Jan 20, 2016 4:47 pm
by amit.ahuja
I have edited the nagios.cfg file ignore those characters in order to name the url in service description.
illegal_macro_output_chars=`~$&|'"<>
but after doing that, clicking on the service will give me "NOT AUTHORIZED" error.
is there another way to name the url without getting this error? I have thousands of them. so have to name in service description in order to see them all in GUI.
Re: Can't view Service. NOT AUTHORIZED
Posted: Thu Jan 21, 2016 10:31 am
by hsmith
Let's try to wrap that service description in single quotes('something') and see if that helps.
Re: Can't view Service. NOT AUTHORIZED
Posted: Thu Jan 21, 2016 10:34 am
by ssax
Did you change this one?
Code: Select all
illegal_object_name_chars=`~!$%^&*|'"<>?,()=
I'm sure those are in there for a reason though, I can't guarantee you won't run into any issues.
Re: Can't view Service. NOT AUTHORIZED
Posted: Tue Feb 02, 2016 1:27 pm
by amit.ahuja
I removed ?= from illegal_object_name_chars in order the name service description with whole URL. Let's say that if i revert it back to default, is there another way to name service description with url. I just want to see the url in service status page
urls.png
Re: Can't view Service. NOT AUTHORIZED
Posted: Tue Feb 02, 2016 2:52 pm
by rkennedy
What happens if you access the link like this? Does it work?
Code: Select all
http://nagoisxi/nagiosxi/includes/components/xicore/status.php?show=servicedetail&host=localhost&service="http://ma100mlp:9080/sdp/service-test/CatalogService/getProduct?productId=809315&channel=SITE&dest=auto"
The problem in this link specifically is that additional variables are contained after the service=, this means that when you try to load the page it's also processing productId=809315&channel=SITE&dest=auto.