log based monitoring Postgresql

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ericssonvietnam
Posts: 239
Joined: Mon Jun 27, 2016 11:05 pm

log based monitoring Postgresql

Post by ericssonvietnam »

i am using the below configuration for the log based monitoring but there was miss of alarm no alarm was reported for the Postgres down attached are the relevant files.

Can you let me know the reason for such possible miss of alarms from nagiosXI

postgress check is as shown below on the node

[nagios@hnrbt10 conf]$ cat PostgreSQL.conf
$seekfilesdir = '/home/nagios/logfile_basedir/tmp';
$protocolsdir = '/home/nagios/logfile_basedir/tmp';
$scriptpath = '/home/nagios/bin';
#$MACROS = { CL_DISK01 => "/dev/dsk/c0d1", CL_DISK02 => "/dev/dsk/c0d2" };

@searches = (
{
tag => 'PostgreSQL down',
criticalpatterns => ['PostgreSQL is down'|'PostgreSQL is already stopped'|'Forcing msPostgresql away from hnrbt10 after 1000000 failures'|'Forcing msPostgresql away from hnrbt11 after 1000000 failures'] ,
options => 'sticky=1800,noprotocol,report=long,allyoucaneat',
logfile => '/var/log/messages'
#rotation => 'SUSE',
}
);

As i tested it from GUI it gave me the following output PFA
You do not have the required permissions to view the files attached to this post.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: log based monitoring Postgresql

Post by dwhitfield »

Can you attach or PM the postgres logs? I suspect you just need to add a different critical pattern.

Also, can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the ***Download Profile*** button towards the top. If for whatever reason you *cannot* download the profile, please put the output of View System Info (5.3.4+, Show Profile if older) in the thread (that will at least get us some info). This will give us access to many of the logs we would otherwise ask for individually. If security is a concern, you can unzip the profile take out what you like, and then zip it up again. We may end up needing something you remove, but we can ask for that specifically.

After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.
Locked