Page 1 of 1

Error: Service check command 'check_pgactivity -U nagios_dis

Posted: Sun Aug 21, 2016 6:18 am
by giles
I am getting following error while restarting the nagios3 service:
Error: Service check command 'check_pgactivity -U nagios_dispatcher -s bgwriter -w 80% -c 95%' specified in service 'check_pgactivity' for host 'localhost' not defined anywhere!

I have following entry in postgresql.cgf

define service {
host_name localhost
service_description check_pgactivity
check_command check_pgactivity -U nagios_dispatcher -s bgwriter -w 80% -c 95%
max_check_attempts 3
check_interval 3
retry_interval 3
check_period 24x7
}

Re: Error: Service check command 'check_pgactivity -U nagios

Posted: Sun Aug 21, 2016 10:58 pm
by Box293
I think you need a command definition like this:

Code: Select all

define command {
       command_name                  		check_pgactivity
       command_line                  		$USER1$/check_pgactivity $ARG1$
}
Then your service would be defined like:

Code: Select all

define service {
host_name localhost
service_description check_pgactivity
check_command check_pgactivity!-U nagios_dispatcher -s bgwriter -w 80% -c 95%
max_check_attempts 3
check_interval 3
retry_interval 3
check_period 24x7
}

Re: Error: Service check command 'check_pgactivity -U nagios

Posted: Mon Aug 22, 2016 2:48 am
by giles
I can restart the nagios service successfully after making the changes. Now the problem is I cannot see the service on OPM UI.

Re: Error: Service check command 'check_pgactivity -U nagios

Posted: Mon Aug 22, 2016 10:35 am
by rkennedy
OPM isn't our product, so it's hard to say what the issue is. Your best bet is contacting them for support.

Re: Error: Service check command 'check_pgactivity -U nagios

Posted: Tue Aug 23, 2016 2:03 am
by giles
But, from OPM they are saying that it is the problem in Nagios end.

Re: Error: Service check command 'check_pgactivity -U nagios

Posted: Tue Aug 23, 2016 11:32 am
by rkennedy
Closing this one, we will continue in your other thread. http://support.nagios.com/forum/viewtop ... 850#193267