[check_postgres] check_postgres_query_time - Getting "invalid
query returned" more often now
Glyn Astill
glynastill at yahoo.co.uk
Wed Oct 8 12:29:34 UTC 2008
Hi Greg,
I'm still getting these perhaps 25% of the time. I've tried using the debug options, but what I can't get my head around is why it's doing the following when it gives the invalid query.
Starting run_command with "SELECT setting FROM pg_settings WHERE name = 'server_version'"
With --debugoutput=u the check tends to return 0 / OK all the time, however it does sometimes output the following:
Use of uninitialized value in pattern match (m//) at check_postgres_query_time line 2848.
Use of uninitialized value in pattern match (m//) at check_postgres_query_time line 2855.
Use of uninitialized value in string eq at check_postgres_query_time line 340.
Use of uninitialized value in concatenation (.) or string at check_postgres_query_time line 340.
Use of uninitialized value in string eq at check_postgres_query_time line 340.
Use of uninitialized value in concatenation (.) or string at check_postgres_query_time line 340.
Use of uninitialized value in concatenation (.) or string at check_postgres_query_time line 345.
POSTGRES_QUERY_TIME OK: (host:) (port=) longest query: 0s | time= maxtime:0
Heres what I'm passing
perl check_postgres_query_time --warning='3 minutes' --critical='5 minutes' -db=SEE -H=localhost --debugoutput=u
and
perl check_postgres_query_time --warning='3 minutes' --critical='5 minutes' -db=SEE -H=localhost -v -v -v
I'm just a bit confused here, if you can give me any pointers I'll happily plog allong trying to find why it's going off.
Glyn
--- On Tue, 30/9/08, Glyn Astill <glynastill at yahoo.co.uk> wrote:
> From: Glyn Astill <glynastill at yahoo.co.uk>
> Subject: Re: [check_postgres] check_postgres_query_time - Getting "invalid query returned" more often now
> To: "Greg Sabino Mullane" <greg at endpoint.com>
> Cc: check_postgres at bucardo.org
> Date: Tuesday, 30 September, 2008, 2:51 PM
> > I cannot see any reason offhand for this. What version
> of
> > Postgres are you
> > using, and can you duplicate the problem with a manual
> run?
> > If so, try
> > adding three --verbose options so we can see
> what's
> > going on. If not, try
> > running it with the --debugoutput=u option.
> >
>
> We are on 8.3.4 and I can duplicate it with a manual run,
> I've had brief a look at the output, and I just got a
> little confused. It seems to be doing more when I get the
> invalid query..?
>
> Here is the verbose output when it works:
>
> http://privatepaste.com/50Guf2Rx9Q
>
> And when it gives the invalid query:
>
> http://privatepaste.com/f535h7rPCh
>
>
>
> _______________________________________________
> Check_postgres mailing list
> Check_postgres at bucardo.org
> https://mail.endcrypt.com/mailman/listinfo/check_postgres
-------------- next part --------------
$POSTGRES1 = {
"verbose" => 3,
"test" => 0,
"showperf" => 1,
"host" => [
"localhost"
],
"dbname" => [
"SEE"
],
"defaultuser" => "postgres",
"critical" => "5 minutes",
"showtime" => 1,
"timeout" => 10,
"warning" => "3 minutes"
};
psql=/usr/local/pgsql/bin/psql version=8.3
Starting run_command with "SELECT setting FROM pg_settings WHERE name = 'stats_command_string'"
$POSTGRES1 = [
"-q",
"-U",
"postgres",
"-d",
"SEE",
"-t",
"-h",
"localhost",
"-p",
5432,
"-o",
"/tmp/rCH2Y2EpWI/nagios_psql.a72XrvG.tmp",
"-c",
"SELECT setting FROM pg_settings WHERE name = 'stats_command_string'"
];
$POSTGRES1 = {
"hosts" => 1,
"db" => [
{
"ok" => 1,
"totaltime" => "0.08",
"dbuser" => "postgres",
"dbpass" => "",
"slurp" => "\n",
"pname" => "port=5432 host=localhost db=SEE user=postgres",
"port" => 5432,
"dbname" => "SEE",
"host" => "localhost"
}
],
"command" => "SELECT setting FROM pg_settings WHERE name = 'stats_command_string'"
};
Starting run_command with "SELECT datname, max(COALESCE(ROUND(EXTRACT(epoch FROM now()-query_start)),0)) FROM pg_stat_activity WHERE current_query <> '<IDLE>' GROUP BY 1"
$POSTGRES1 = [
"-q",
"-U",
"postgres",
"-d",
"SEE",
"-t",
"-h",
"localhost",
"-p",
5432,
"-o",
"/tmp/9374I7Qbx2/nagios_psql.gYzFQXp.tmp",
"-c",
"SELECT datname, max(COALESCE(ROUND(EXTRACT(epoch FROM now()-query_start)),0)) FROM pg_stat_activity WHERE current_query <> '<IDLE>' GROUP BY 1"
];
Starting run_command with "SELECT setting FROM pg_settings WHERE name = 'server_version'"
$POSTGRES1 = [
"-q",
"-U",
"postgres",
"-d",
"SEE",
"-t",
"-h",
"localhost",
"-p",
5432,
"-o",
"/tmp/LokntphP9y/nagios_psql.aL7LPvs.tmp",
"-c",
"SELECT setting FROM pg_settings WHERE name = 'server_version'"
];
$POSTGRES1 = {
"hosts" => 1,
"db" => [
{
"ok" => 1,
"totaltime" => "0.08",
"dbuser" => "postgres",
"dbpass" => "",
"slurp" => " 8.3.4\n\n",
"pname" => "port=5432 host=localhost db=SEE user=postgres",
"port" => 5432,
"dbname" => "SEE",
"host" => "localhost"
}
],
"command" => "SELECT setting FROM pg_settings WHERE name = 'server_version'"
};
$POSTGRES1 = {
"hosts" => 1,
"db" => [],
"command" => "SELECT datname, max(COALESCE(ROUND(EXTRACT(epoch FROM now()-query_start)),0)) FROM pg_stat_activity WHERE current_query <> '<IDLE>' GROUP BY 1"
};
POSTGRES_QUERY_TIME UNKNOWN: (host:localhost) Invalid query returned: SEE <PIPE> -0\n | time=0.09
-------------- next part --------------
$POSTGRES1 = {
"verbose" => 3,
"test" => 0,
"showperf" => 1,
"host" => [
"localhost"
],
"dbname" => [
"SEE"
],
"defaultuser" => "postgres",
"critical" => "5 minutes",
"showtime" => 1,
"timeout" => 10,
"warning" => "3 minutes"
};
psql=/usr/local/pgsql/bin/psql version=8.3
Starting run_command with "SELECT setting FROM pg_settings WHERE name = 'stats_command_string'"
$POSTGRES1 = [
"-q",
"-U",
"postgres",
"-d",
"SEE",
"-t",
"-h",
"localhost",
"-p",
5432,
"-o",
"/tmp/uRRpZDAdTV/nagios_psql.Uw7cGbe.tmp",
"-c",
"SELECT setting FROM pg_settings WHERE name = 'stats_command_string'"
];
$POSTGRES1 = {
"hosts" => 1,
"db" => [
{
"ok" => 1,
"totaltime" => "0.08",
"dbuser" => "postgres",
"dbpass" => "",
"slurp" => "\n",
"pname" => "port=5432 host=localhost db=SEE user=postgres",
"port" => 5432,
"dbname" => "SEE",
"host" => "localhost"
}
],
"command" => "SELECT setting FROM pg_settings WHERE name = 'stats_command_string'"
};
Starting run_command with "SELECT datname, max(COALESCE(ROUND(EXTRACT(epoch FROM now()-query_start)),0)) FROM pg_stat_activity WHERE current_query <> '<IDLE>' GROUP BY 1"
$POSTGRES1 = [
"-q",
"-U",
"postgres",
"-d",
"SEE",
"-t",
"-h",
"localhost",
"-p",
5432,
"-o",
"/tmp/j22osfaCql/nagios_psql.jhjylwZ.tmp",
"-c",
"SELECT datname, max(COALESCE(ROUND(EXTRACT(epoch FROM now()-query_start)),0)) FROM pg_stat_activity WHERE current_query <> '<IDLE>' GROUP BY 1"
];
$POSTGRES1 = {
"hosts" => 1,
"db" => [
{
"ok" => 1,
"totaltime" => "0.08",
"dbuser" => "postgres",
"dbpass" => "",
"slurp" => " SEE | 0\n\n",
"pname" => "port=5432 host=localhost db=SEE user=postgres",
"port" => 5432,
"dbname" => "SEE",
"host" => "localhost"
}
],
"command" => "SELECT datname, max(COALESCE(ROUND(EXTRACT(epoch FROM now()-query_start)),0)) FROM pg_stat_activity WHERE current_query <> '<IDLE>' GROUP BY 1"
};
POSTGRES_QUERY_TIME OK: (host:localhost) longest query: 0s | time=0.08 maxtime:0
More information about the Check_postgres
mailing list