Page 1 of 1

Nagios - Cgi.cfg Question

Posted: Tue Dec 04, 2018 11:43 am
by Pradeeps
Hello Folks,

I have installed Nagios Core - 4.2.4 with nagiosql-3.4.0. I have recently changed the apache authentication to ldap and it works fine. However, I was going though "cgi.cfg" file and I see "nagiosadmin" user has been mentioned for few authorization.

Code: Select all

authorized_for_system_information=nagiosadmin
authorized_for_configuration_information=nagiosadmin
authorized_for_system_commands=nagiosadmin
authorized_for_all_services=nagiosadmin
authorized_for_all_hosts=nagiosadmin
authorized_for_all_service_commands=nagiosadmin
authorized_for_all_host_commands=nagiosadmin
My question is, what exactly the purpose of "cgi.cfg" file and also since I am not using "nagiosadmin" user anymore, will it impact any functionality? Any information would be helpful. Thanks in advance.

Re: Nagios - Cgi.cfg Question

Posted: Tue Dec 04, 2018 1:08 pm
by scottwilkerson
It gives you the ability to add special permissions for users to see/access hosts/services that they are not a contact for.

https://assets.nagios.com/downloads/nag ... igcgi.html

Re: Nagios - Cgi.cfg Question

Posted: Tue Dec 04, 2018 1:43 pm
by Pradeeps
Thanks for your response. May I know the purpose of the file? I dont see i am using it directly through nagiosql. So can I assume it is used in the background by nagios daemon?

Re: Nagios - Cgi.cfg Question

Posted: Tue Dec 04, 2018 1:48 pm
by scottwilkerson
Pradeeps wrote:Thanks for your response. May I know the purpose of the file? I dont see i am using it directly through nagiosql. So can I assume it is used in the background by nagios daemon?
It is used by the nagios CGI's when you access the web UI

Re: Nagios - Cgi.cfg Question

Posted: Tue Dec 04, 2018 1:56 pm
by Pradeeps
Got it. Therefore the authorization will impact only if we use the nagios native GUI. I use thruk and I am already allowing necessary users in it.

Re: Nagios - Cgi.cfg Question

Posted: Tue Dec 04, 2018 2:16 pm
by scottwilkerson
Pradeeps wrote:Got it. Therefore the authorization will impact only if we use the nagios native GUI. I use thruk and I am already allowing necessary users in it.
That sounds correct, as long as your UI doesn't depend on the Nagios native CGI's they wouldn't have any impact.

Re: Nagios - Cgi.cfg Question

Posted: Tue Dec 04, 2018 2:55 pm
by Pradeeps
Great thank you.

Re: Nagios - Cgi.cfg Question

Posted: Tue Dec 04, 2018 3:11 pm
by scottwilkerson
Pradeeps wrote:Great thank you.
No Problem.

Locking thread