check_postgres icon indicating copy to clipboard operation
check_postgres copied to clipboard

check_postgres.pl action custom_query does not show the performance data

Open phinjensen opened this issue 12 years ago • 1 comments

ID: 84 Version: unspecified Date: 2011-10-18 08:12 EDT Author: tom ([email protected])


In wiki page,you said: It is required that one of the columns be named "result" and is the item that will be checked against your warning and critical values. The second column is for the performance data and any name can be used: this will be the 'value' inside the performance data section.

It's wrong,It is required that second of the columns be named "data"

The second issue is the message include the performance data can be shown in the linux console,but nagios page can't get the message,it can only read the message before the pipe symbol.

I try to delete the line print '| '; or change the pipe symbol to other character,for exmple 'kk' in the method dumpresult() of source code 'check_postgres.pl' ,it can show the complete message.

console:

POSTGRES_CUSTOM_QUERY CRITICAL: DB "demodb" (host:postgresql.demo.dev) 0 |
time=2.12  Check for records added in the last 4 hours to the demo table,the
result is:0

nagios page:(miss the above messages after a pipe symbol) POSTGRES_CUSTOM_QUERY CRITICAL: DB "demodb" (host:postgresql.demo.dev) 0

phinjensen avatar Jun 19 '13 21:06 phinjensen

Author: tom Date: 2011-10-18 09:06:39 EDT

sorry,for display the perfdata to nagios,we'll have to enable the process_performance_data option in the main config file.

but the first issue existed!

phinjensen avatar Jun 19 '13 21:06 phinjensen