On a new database, or a database on a slave with no activity, pg_database.blk_hit/read are zero, $ratio is not defined, and it fails when compared with a threshold:
$ /opt/check_pgactivity/check_pgactivity --service hit_ratio --dbservice nagios_pignouf_piaf --status-file /tmp/check_pgactivity.pignouf.piaf -w 50% -c 20% --debug
...DEBUG: Query result: $VAR1 = [
[
'honk2',
'0',
'0'
],
[
'postgres',
'132495',
'229'
]
];
Use of uninitialized value $ratio in numeric lt (<) at /opt/check_pgactivity/check_pgactivity line 3553.
Use of uninitialized value $ratio in sprintf at /opt/check_pgactivity/check_pgactivity line 3554.
On a new database, or a database on a slave with no activity, pg_database.blk_hit/read are zero, $ratio is not defined, and it fails when compared with a threshold: