Longest query is no visibel in postgres database

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

Longest query is no visibel in postgres database

Post by biswajit.banerjee »

Hi Team,

We are facing problem in Nagios xi only database name is being shown,not the longest query:

command:
/usr/local/nagios/libexec/check_pgactivity -s longest_query -h '' -w 10 -c 15
You do not have the required permissions to view the files attached to this post.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Longest query is no visibel in postgres database

Post by npolovenko »

Hello, @biswajit.banerjee. Please run this command from the command line and show me the output:
/usr/local/nagios/libexec/check_pgactivity -s longest_query -h -w 10 -c 15
Also, click on the service in the web interface and let me know if you see the full output(including the query) in the "Service Status Detail"?
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: Longest query is no visibel in postgres database

Post by biswajit.banerjee »

Output of service in the web interface:
/usr/local/nagios/libexec/check_nrpe -H XXXXXX -t 30 -c check_longest_query
POSTGRES_LONGEST_QUERY CRITICAL: MyCareConfig: 1w 13h27m40s | 'ETLLog max'=NaNs;180000;54000 'ETLLog avg'=NaNs;180000;54000 'ETLLog #queries'=0 'postgres max'=NaNs;180000;54000 'postgres avg'=NaNs;180000;54000 'postgres #queries'=0 'template1 max'=0s;180000;54000 'template1 avg'=0s;180000;54000 'template1 #queries'=1 'MyCareConfig max'=653260s;180000;54000 'MyCareConfig avg'=336923.433333333s;180000;54000 'MyCareConfig #queries'=30

Output is not showing query name.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Longest query is no visibel in postgres database

Post by npolovenko »

@biswajit.banerjee, I ran this plugin in the lab to check the same on my Postgres database, and it's not showing the longest query name either.
Please check the list of all available potgres plugins that we have below. There might be an alternative plugin that fits your needs.
https://exchange.nagios.org/index.php?o ... d=postgres
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked