errors in config - CHECK_PGACTIVITY plugin

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.
wolf57
Posts: 20
Joined: Tue Dec 22, 2015 11:49 am

Re: errors in config - CHECK_PGACTIVITY plugin

Post by wolf57 »

it all works using IP address

root@montwo:~# su - nagios
nagios@montwo:~$ check_pgactivity -h 10.11.0.200 -s backends -w 80 -c 95
POSTGRES_BACKENDS OK: 2 connections on 297 | postgres=1;80;95;0;297 nagios=0;80;95;0;297 phppgadmin=0;80;95;0;297 repmgrdb=0;80;95;0;297 opm=0;80;95;0;297 test4=0;80;95;0;297 template1=1;80;95;0;297 ima=0;80;95;0;297 test2=0;80;95;0;297 test1=0;80;95;0;297 test3=0;80;95;0;297 maximum_connections=297;80;95;0;297
nagios@montwo:~$ nslookup 10.11.0.200
Server: 140.197.230.100
Address: 140.197.230.100#53

Non-authoritative answer:
200.0.11.10.in-addr.arpa name = pgtest-db.uen.org.

Authoritative answers can be found from:
0.11.10.in-addr.arpa nameserver = ns2.uen.net.
0.11.10.in-addr.arpa nameserver = ns.uen.net.

nagios@montwo:~$ nslookup pgtest-db
Server: 140.197.230.100
Address: 140.197.230.100#53

Non-authoritative answer:
Name: pgtest-db.uen.org
Address: 10.11.0.200
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: errors in config - CHECK_PGACTIVITY plugin

Post by Box293 »

Lets go back and check the configs:

Show us the command defined in /etc/nagios3/objects/command.cfg

Show us the service defined in /etc/nagios3/objects/services/check_pgactivity.cfg

Also what is the output of:

Code: Select all

grep -R 'check_pgactivity' /etc/nagios3/
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
wolf57
Posts: 20
Joined: Tue Dec 22, 2015 11:49 am

Re: errors in config - CHECK_PGACTIVITY plugin

Post by wolf57 »

command.cfg and check_pgactivity.cfg are attached files

nagios@montwo:~$ grep -R 'check_pgactivity' /etc/nagios3/
/etc/nagios3/objects/services/check_nrpe.cfg: check_command check_nrpe!check_pgactivity! base253
/etc/nagios3/objects/services/check_pgactivity.cfg: service_description check_pgactivity
/etc/nagios3/objects/services/check_pgactivity.cfg: check_command check_pgactivity! -s backends -w 80% -c 95%
/etc/nagios3/objects/services-old/check_pgactivity.cfg: service_description check_pgactivity
/etc/nagios3/objects/services-old/check_pgactivity.cfg: check_command check_pgactivity!5432!backends!80!95
/etc/nagios3/objects/commands.cfg: command_name check_pgactivity
/etc/nagios3/objects/commands.cfg: command_line $USER1$/check_pgactivity -h $HOSTADDRESS$ $ARG1$
Attachments
check_pgactivity.cfg.txt
(1.18 KiB) Downloaded 193 times
command.cfg.txt
(11.52 KiB) Downloaded 253 times
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: errors in config - CHECK_PGACTIVITY plugin

Post by Box293 »

It's possible this old config file is being read in and overwritting the first one:

/etc/nagios3/objects/services-old/check_pgactivity.cfg

Try moving it to /tmp and the restart nagios service.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
wolf57
Posts: 20
Joined: Tue Dec 22, 2015 11:49 am

Re: errors in config - CHECK_PGACTIVITY plugin

Post by wolf57 »

I don't see how it can, It gets the info from nagios.cfg. I did move the whole directory out of /etc/nagios3/object but still getting the same error
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: errors in config - CHECK_PGACTIVITY plugin

Post by Box293 »

Are you using Nagios XI ?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
wolf57
Posts: 20
Joined: Tue Dec 22, 2015 11:49 am

Re: errors in config - CHECK_PGACTIVITY plugin

Post by wolf57 »

Nagios3 version 3.2.3-3ubuntu1.1 This is an Ubuntu 12.04 server, I used apt-get to install Nagios
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: errors in config - CHECK_PGACTIVITY plugin

Post by Box293 »

In the left pane under System click Configuration
Select Services
Click Continue
In the top right type in check_pgactivity
Click Update
Can you send a screenshot of that
You might need two as it will get wide
Click the Check Command (it's a hyperlink)
Can you send a screenshot of that
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: errors in config - CHECK_PGACTIVITY plugin

Post by tmcdonald »

Please make sure you are posting in the correct section of the forum. The XI section of the forum should be used for XI questions. I will be moving this to the Core section.
Former Nagios employee
wolf57
Posts: 20
Joined: Tue Dec 22, 2015 11:49 am

Re: errors in config - CHECK_PGACTIVITY plugin

Post by wolf57 »

I'm no longer able to send PDF file, its been deactivated. If I try to attach as rich text it fails after the download. Not sure why this was turned off
Locked