Page 1 of 1
Nagios XI command tools error ...
Posted: Thu Nov 21, 2019 8:15 am
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.
===========================================================================================
Re: Nagios XI command tools error ...
Posted: Thu Nov 21, 2019 11:10 am
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.
Re: Nagios XI command tools error ...
Posted: Fri Nov 22, 2019 11:35 am
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.
see attachment
Re: Nagios XI command tools error ...
Posted: Fri Nov 22, 2019 2:03 pm
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.
Re: Nagios XI command tools error ...
Posted: Mon Nov 25, 2019 12:42 pm
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...
Re: Nagios XI command tools error ...
Posted: Mon Nov 25, 2019 12:52 pm
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
Re: Nagios XI command tools error ...
Posted: Tue Nov 26, 2019 3:45 am
by xpertech
here's the output ...
Re: Nagios XI command tools error ...
Posted: Tue Nov 26, 2019 11:01 am
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.
Re: Nagios XI command tools error ...
Posted: Tue Dec 03, 2019 10:42 am
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
Re: Nagios XI command tools error ...
Posted: Tue Dec 03, 2019 11:07 am
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.