Check_pgactivity btree_bloat configuration issue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
biswajit.banerjee
Posts: 152
Joined: Fri Dec 08, 2017 10:24 pm

Check_pgactivity btree_bloat configuration issue

Post by biswajit.banerjee »

Hi ,
While configuration of Check_pgactivity for btree_bloat for some are working okay but some gives error

The Pgsql server working fine as
/usr/local/nagios/libexec/check_pgactivity -s btree_bloat -h 10.1.13.175 -w 90% -c 95%
POSTGRES_BTREE_BLOAT OK: Btree bloat ok | 'idx bloated in ids_3cvs'=0 'idx bloated in ids_alexandria'=0 'idx bloated in ids_betatest'=0 'idx bloated in ids_bhlc'=0 'idx bloated in ids_cfswatertown'=0 'idx bloated in ids_error'=0 'idx bloated in ids_eyeassociates'=0 'idx bloated in ids_imwdemo'=0 'idx bloated in ids_mdotest'=0 'idx bloated in ids_mecimw'=0 'idx bloated in ids_nwes'=0 'idx bloated in ids_nweyemn'=0 'idx bloated in ids_pilkintoneyecenterimw'=0 'idx bloated in ids_rea'=0 'idx bloated in ids_rgbeye'=0 'idx bloated in ids_sepemr'=0 'idx bloated in ids_whitson'=0 'idx bloated in ids_wolfeclinic'=0 'idx bloated in old1_ids_wolfeclinic'=0


Some Give errors as
/usr/local/nagios/libexec/check_pgactivity -s btree_bloat -h 10.1.13.130 -w 90% -c 95% -p 6432
CHECK_PGACTIVITY UNKNOWN: Query fail !
psql: FATAL: could not open file "base/49157/PG_VERSION": Permission denied

We have checked the existance of mentioned file , file was bot there , even creation of file doesnot change the error . Also nagios user is allowed to access the file too

Can you Please help resolving the issue .
Thanks
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Check_pgactivity btree_bloat configuration issue

Post by cdienger »

It looks like you're using an older version of https://github.com/OPMDG/check_pgactivity. Is this correct? Perhaps the newer version will work better for you.

What do the permissions look like on the file? The message is coming for the psql server so it's likely a config issue on that end. Is there any logging on that end that you can enable and review?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
biswajit.banerjee
Posts: 152
Joined: Fri Dec 08, 2017 10:24 pm

Re: Check_pgactivity btree_bloat configuration issue

Post by biswajit.banerjee »

Yes , We are using new plugin which is 12 days old

Now error has changed
/usr/local/nagios/libexec/check_pgactivity -s btree_bloat -h 10.1.13.130 -w 90% -c 95% -p 6432 -U postgres
CHECK_PGACTIVITY UNKNOWN: Query fail !
psql: FATAL: could not open file "base/49157/2601": No such file or directory

Kindly suggest
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Check_pgactivity btree_bloat configuration issue

Post by cdienger »

Try running the commadn with the debug option which can give you more details regarding where/why it is failing:

/usr/local/nagios/libexec/check_pgactivity -s btree_bloat -h 10.1.13.130 -w 90% -c 95% -p 6432 -U postgres --debug
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked