insufficient privileges

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

insufficient privileges

Post by WillemDH »

Hello,

Seems like our Nagios XI server has insufficient privileges to check status of httpd service.

Code: Select all

COMMAND: /usr/local/nagios/libexec/check_init_service httpd
OUTPUT: httpd status unknown due to insufficient privileges.
Other local services, like crond and sshd can be checked.

Grtz

Willem
Nagios XI 5.8.1
https://outsideit.net
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: insufficient privileges

Post by lmiltchev »

Add the following line to sudoers:

Code: Select all

nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_init_service httpd
or

Code: Select all

nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_init_service *
Modify your command, so it is going to look something like this:

Code: Select all

define command {
       command_name                  		check_init_service
       command_line                  		sudo $USER1$/check_init_service $ARG1$
}
and your service:

Code: Select all

define service {
	host_name			localhost
	service_description		apache
	use				xiwizard_generic_service
	check_command			check_init_service!httpd!
	register			1
	}
Testing from the CCM will still fail as it is run as apache user, but the check *should* work. Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: insufficient privileges

Post by WillemDH »

Ludmill,

Seems this solved my issue. Thanks Ludmill!! Thread can be closed.

Grtz

Willem
Nagios XI 5.8.1
https://outsideit.net
Locked