Error: Service check command 'check_pgactivity -U nagios_dis

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
giles
Posts: 24
Joined: Thu Aug 18, 2016 3:56 am

Error: Service check command 'check_pgactivity -U nagios_dis

Post 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
}
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

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

Post 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
}
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
giles
Posts: 24
Joined: Thu Aug 18, 2016 3:56 am

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

Post 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.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

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

Post 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.
Former Nagios Employee
giles
Posts: 24
Joined: Thu Aug 18, 2016 3:56 am

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

Post by giles »

But, from OPM they are saying that it is the problem in Nagios end.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

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

Post by rkennedy »

Closing this one, we will continue in your other thread. http://support.nagios.com/forum/viewtop ... 850#193267
Former Nagios Employee
Locked