Nagios XI command tools error ...

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
xpertech
Posts: 399
Joined: Thu Sep 01, 2011 9:47 pm

Nagios XI command tools error ...

Post by xpertech »

There's a problem when trying to use command tools ...

===========================================================================================
It appears as though you do not have permission to view the configuration information you requested...

If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI
and check the authorization options in your CGI configuration file.
===========================================================================================
You do not have the required permissions to view the files attached to this post.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Nagios XI command tools error ...

Post by benjaminsmith »

Hello @xpertech,

Thanks for posting the screenshot with the error output. I have a couple more questions to help troubleshoot the issue.

1. Are you logged in as an Admin or User?

2. What version of Nagios XI are you running?

3. Please post the URL of this tool so we can test it out.

4. Can tail the Apache log, load this page and post the output to the thread. Thanks.

Code: Select all

tail -f /var/log/httpd/*error_log
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
xpertech
Posts: 399
Joined: Thu Sep 01, 2011 9:47 pm

Re: Nagios XI command tools error ...

Post by xpertech »

benjaminsmith wrote:Hello @xpertech,

Thanks for posting the screenshot with the error output. I have a couple more questions to help troubleshoot the issue.

1. Are you logged in as an Admin or User?
Admin
2. What version of Nagios XI are you running?
5.6.4
3. Please post the URL of this tool so we can test it out.
Nagios XI Command /nagios/cgi-bin/config.cgi
4. Can tail the Apache log, load this page and post the output to the thread. Thanks.

Code: Select all

tail -f /var/log/httpd/*error_log
see attachment
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI command tools error ...

Post by lmiltchev »

We had a feature request for allowing to log in XI with a "mixed" case in usernames as far as I remember. So, when you log in Nagios XI, it wouldn't matter if you use "nagios.pic" or "Nagios.Pic". Using a "wrong" case in Nagios Core though won't work... In the first screenshots, you showed us that you logged into Nagios Core as "nagios.pic", however you user is "Nagios.Pic". I am pretty sure that this is what is used in cgi.cfg file. So, try the following:

1. Log out the browser, clear the cache and cookies.
2. Log in Nagios XI as your user. It doesn't matter what case you use here.
3. Go to Tools > My Tools > Nagios XI Command and run it
4. You will be asked to authenticate to Nagios Core. USE THE CORRECT CASE - "Nagios.Pic".

Let us know if this helped.
Be sure to check out our Knowledgebase for helpful articles and solutions!
xpertech
Posts: 399
Joined: Thu Sep 01, 2011 9:47 pm

Re: Nagios XI command tools error ...

Post by xpertech »

one of the NagiosXI administrators had made a test but still the same, another one will make a test later and see if any change...
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI command tools error ...

Post by lmiltchev »

Can you also show us the output of the command below?

Code: Select all

grep -i 'nagios.pic' /usr/local/nagios/etc/cgi.cfg
Be sure to check out our Knowledgebase for helpful articles and solutions!
xpertech
Posts: 399
Joined: Thu Sep 01, 2011 9:47 pm

Re: Nagios XI command tools error ...

Post by xpertech »

here's the output ...
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI command tools error ...

Post by lmiltchev »

You can see ALL of the configurations in Nagios Core, when you go to System > Configuration (/nagios/cgi-bin/config.cgi). This means that your user needs to be set up to see all hosts and services...
example01.PNG
Most probably, 'nagios.pic' user is NOT set up this way. The name doesn't appear in the cgi.cfg file... Modify the user's permissions, and your tool will work as expected.
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
xpertech
Posts: 399
Joined: Thu Sep 01, 2011 9:47 pm

Re: Nagios XI command tools error ...

Post by xpertech »

can not find cgi.cfg file in the folder you gave ...

/nagios/cgi-bin/config.cgi


but find that file in the ...

/usr/local/nagios/etc/cgi.cfg


contents are below, and the name "Nagios.Pic" appear in the cgi.cfg file...

# MODIFIED
default_statusmap_layout=6
# UNMODIFIED
action_url_target=_blank
authorized_for_all_host_commands=nagiosadmin,nagiosadmin,steven.yang,Nagios.Pic,constance.yang,Nagios.Pic
authorized_for_all_hosts=nagiosadmin,nagiosadmin,steven.yang,Nagios.Pic,shine.huang,yt.huang,temp,oscar.ou,valencia.huang,rachel.chang,yukai.lin,william.zhuang,Nagios.Pic
authorized_for_all_service_commands=nagiosadmin,nagiosadmin,steven.yang,Nagios.Pic,constance.yang,Nagios.Pic
authorized_for_all_services=nagiosadmin,nagiosadmin,steven.yang,Nagios.Pic,shine.huang,yt.huang,temp,oscar.ou,valencia.huang,rachel.chang,yukai.lin,william.zhuang,Nagios.Pic
authorized_for_configuration_information=nagiosadmin,nagiosadmin,steven.yang,Nagios.Pic,shine.huang,yt.huang,temp,oscar.ou,valencia.huang,rachel.chang,yukai.lin,william.zhuang,Nagios.Pic
authorized_for_system_commands=nagiosadmin,nagiosadmin,steven.yang,Nagios.Pic,Nagios.Pic
authorized_for_system_information=nagiosadmin,nagiosadmin,steven.yang,Nagios.Pic,Nagios.Pic
default_statuswrl_layout=4
escape_html_tags=1
lock_author_names=1
main_config_file=/usr/local/nagios/etc/nagios.cfg
notes_url_target=_blank
physical_html_path=/usr/local/nagios/share
ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$
refresh_rate=90
show_context_help=0
url_html_path=/nagios
use_authentication=1
use_pending_states=1
use_ssl_authentication=0
authorized_for_read_only=jeff.j.chang,scott.pc.lin,ravi.kiruveedula,jade.kao,cloud,daphne.wang,evac.chen,davide.girola,james.chien,jonas.chung,kaavie.cheng,candy.m.chen,evan.chen,jason50.chang,luis.pacheco,michael.tseng,chiyu.su,willy.li.chen,sammi.huang,temp,harry.richards,alex8.wang,servicedesk.twn
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI command tools error ...

Post by lmiltchev »

I seems like that now the "Nagios.Pic" user has sufficient permissions to view the data. Can you try again the following:

1. Log out the browser, clear the cache and cookies.
2. Log in Nagios XI as Nagios.Pic user.
3. Go to Tools > My Tools > Nagios XI Command and run it
4. You will be asked to authenticate to Nagios Core. USE THE CORRECT CASE - "Nagios.Pic".

If you see an error message, take a screenshot of the entire page, and post it on the forum.


Note:
can not find cgi.cfg file in the folder you gave ...

/nagios/cgi-bin/config.cgi
I was not referring to a folder - sorry I was not clear enough. I said:
You can see ALL of the configurations in Nagios Core, when you go to System > Configuration (/nagios/cgi-bin/config.cgi).
meaning, if you modified your user's permissions, you would be able to log in the Nagios Core interface (http://ip address/nagios), go to System > Configuration (which takes you to the "http://ip address/nagios/cgi-bin/config.cgi" page), where you should be able to view config data for various objects.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked