problem using ncpa agent to monitor the postgresql service

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
UoGLibrary
Posts: 9
Joined: Mon Jan 26, 2015 12:24 pm

problem using ncpa agent to monitor the postgresql service

Post by UoGLibrary »

We're having a problem monitoring the postgresql service using the ncpa monitoring wizard, it is reporting that the service is in a stopped state when it isn't.
Looking at two different RHEL5.4 64 bit servers one of which is a physical box and one is in our vmware infrastructure; one has the service postgresql and the other has the service postgresql-9.0 if i run the command "service postgresql[-9.0] status" on either server it shows the pid that it's using and that it's running.

When I go through the ncpa monitoring wizard cpu disk etc are fine but when i get to the section that monitors services, I can look at the dropdown and it shows either postgresql or postgresql-9.0 depending on the server, and it shows the service is in the stopped state. I've selected it anyway for a test and nagios reports it as not running.

If i run the postgres database monitoring wizard for the same client servers it shows I can connect to the databases just fine. It's really overkill for these particular development servers. I really just need the service to show up as properly running.

Nagios server information
System:
Nagios XI Version : 2014R2.5
pump.lib.uoguelph.ca 2.6.32-504.8.1.el6.x86_64 x86_64
Red Hat Enterprise Linux Server release 6.6 (Santiago)
Gnome Installed

Apache Information
PHP Version: 5.3.3
Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36
Server Name: nagios.lib.uoguelph.ca
Server Address: 131.104.97.80
Server Port: 443

Date/Time
PHP Timezone: America/Toronto
PHP Time: Tue, 03 Feb 2015 16:35:27 -0500
System Time: Tue, 03 Feb 2015 16:35:27 -0500

Client information RHEL5.4 64 bit with the ncpa agent 1.7.2-el5x86_64.rpm installed. gnome is also installed.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: problem using ncpa agent to monitor the postgresql servi

Post by Box293 »

UoGLibrary wrote:if i run the command "service postgresql[-9.0] status" on either server it shows the pid that it's using and that it's running.
Why are the brackets being used? Can I confirm you are typing at the command line:

Code: Select all

service postgresql[-9.0] status
Can you provide the service definition for the postgresql-9.0 service (in CCM click the floppy disk icon).
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
UoGLibrary
Posts: 9
Joined: Mon Jan 26, 2015 12:24 pm

Re: problem using ncpa agent to monitor the postgresql servi

Post by UoGLibrary »

No that’s not what I’m typing, the brackets are just there so I didn’t have to specify the full command for each system which is slightly different. One system I run “service postgresql status” the other I run “service postgresql-9.0 status”, in both cases it shows as running again this is on the clients. I won’t take short cuts with my problem descriptions anymore.
I’m not sure what you mean by the service definition. I’ve only started working with Nagios XI about a week ago. I’ve since removed that service from those hosts because it keeps showing critical.
I can redo it if it will help resolve this problem.

So i've added it again, i think the section you are asking for is this, i've replaced our actual domain name and token

define service {
host_name domainname
service_description Service Status: postgresql-9.0
use xiwizard_ncpa_service
check_command check_xi_ncpa_agent!-t '*********' -P 5693 -M 'service/postgresql-9.0/running'
max_check_attempts 3
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard ncpa
register 1
}
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: problem using ncpa agent to monitor the postgresql servi

Post by lmiltchev »

I believe this is a bug. I was able to recreate the issue and posted a comment on GitHub:

https://github.com/NagiosEnterprises/ncpa/issues/142

I also filed an internal bug report (TASK ID 4944).
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked