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.
Box293
Too Basu
Posts: 5126 Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:
Post
by Box293 » Tue Dec 22, 2015 3:08 pm
Lets echo the exit code to see what the plugin is returning:
Code: Select all
su nagios
check_pgactivity -h pgtest-db -s backends -w 80 -c 95
echo $?
Also, can you provide a screenshot of the error.
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
Post
by wolf57 » Tue Dec 22, 2015 3:20 pm
Is this how you wanted the commands run?
nagios@montwo:~$ check_pgactivity -h pgtest-db -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:~$ echo $?
0
Box293
Too Basu
Posts: 5126 Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:
Post
by Box293 » Tue Dec 22, 2015 3:35 pm
Yes, it exited with an 0 so that means it's an OK state.
wolf57 wrote: Sorry the restart worked but in Nagios under the Services it shows (Service check did not exit properly)
Can you show this with a screenshot please.
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
Post
by wolf57 » Tue Dec 22, 2015 3:45 pm
see attached pdf file for the screen shot
Attachments
check_pgactivity.pdf
(216.02 KiB) Downloaded 174 times
Box293
Too Basu
Posts: 5126 Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:
Post
by Box293 » Tue Dec 22, 2015 3:48 pm
I mean the screenshot "In nagios under services"
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
Post
by wolf57 » Tue Dec 22, 2015 3:53 pm
Here's a screenshot of Nagios
Attachments
nagios.pdf
(241.46 KiB) Downloaded 344 times
Box293
Too Basu
Posts: 5126 Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:
Post
by Box293 » Tue Dec 22, 2015 5:25 pm
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 .
rkennedy
Posts: 6579 Joined: Mon Oct 05, 2015 11:45 am
Post
by rkennedy » Tue Dec 22, 2015 5:26 pm
Can you post the host definition for pgtest-db ?
Former Nagios Employee
wolf57
Posts: 20 Joined: Tue Dec 22, 2015 11:49 am
Post
by wolf57 » Wed Dec 23, 2015 9:03 am
define host {
host_name pgtest-db
alias pgtest-db
address 10.xx.x.xxx
hostgroups postgres-hosts
check_command check-host-alive
max_check_attempts 3
check_period workhours
contacts wolf
contact_groups db-group
notification_interval 5
notification_period workhours
register 1
}
Box293
Too Basu
Posts: 5126 Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:
Post
by Box293 » Wed Dec 23, 2015 9:31 am
Seeing as your host definition uses an IP address and your testing has been using the dns object as the address, let's test the command using the IP Address. Also, do an nslookup on the address and the dns, do they match:
Code: Select all
su nagios
check_pgactivity -h 10.xx.x.xxx -s backends -w 80 -c 95
nslookup 10.xx.x.xxx
nslookup pgtest-db
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new
Privacy Policy .