Can't view Service. NOT AUTHORIZED

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
amit.ahuja
Posts: 113
Joined: Fri May 15, 2015 8:20 am

Can't view Service. NOT AUTHORIZED

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Can't view Service. NOT AUTHORIZED

Post by hsmith »

I can't replicate this on XI5.2.3. What happens if you remove the http:// from the name?
Former Nagios Employee.
me.
amit.ahuja
Posts: 113
Joined: Fri May 15, 2015 8:20 am

Re: Can't view Service. NOT AUTHORIZED

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Can't view Service. NOT AUTHORIZED

Post 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
You do not have the required permissions to view the files attached to this post.
Former Nagios Employee
amit.ahuja
Posts: 113
Joined: Fri May 15, 2015 8:20 am

Re: Can't view Service. NOT AUTHORIZED

Post 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.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Can't view Service. NOT AUTHORIZED

Post by hsmith »

Let's try to wrap that service description in single quotes('something') and see if that helps.
Former Nagios Employee.
me.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Can't view Service. NOT AUTHORIZED

Post 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.
amit.ahuja
Posts: 113
Joined: Fri May 15, 2015 8:20 am

Re: Can't view Service. NOT AUTHORIZED

Post 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
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Can't view Service. NOT AUTHORIZED

Post 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.
Former Nagios Employee
Locked