Issues with running oracle query fron nagiosxi
Posted: Thu Jun 21, 2018 2:41 am
Hello Everyone,
I'm trying to setup monitoring for one oracle select query and alert based on count from oracle query , i want to alert if count is 1 and more than 1.
Oracle query is giving me output as 0 and i have tried to test this to it will alert for critical threhold or not and i have set critical threshold as 0 and it should show me as critical as output of query is 0 , Instead it shows me OK state. Below is the command line i ran from nagios.
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.2/client64/lib ORACLE_HOME=/usr/lib/oracle/12.2/client64 /usr/local/nagios/libexec/check_oracle_health --connect '172.26.47.132:1521/dbinstance' --username 'nagios' --password '$USER9$' --mode sql --name="select count(*) from itsdcgprd.t6798_ivr_lct_rfr where T1989_CRY_CD is null" --warning 0 --critical 0
OK - select count(*) from itsdcgprd.t6798_ivr_lct_rfr where t1989_cry_cd is null: 0 | 'select'=0;0;0
can some one help me quickly on this to fix
I'm trying to setup monitoring for one oracle select query and alert based on count from oracle query , i want to alert if count is 1 and more than 1.
Oracle query is giving me output as 0 and i have tried to test this to it will alert for critical threhold or not and i have set critical threshold as 0 and it should show me as critical as output of query is 0 , Instead it shows me OK state. Below is the command line i ran from nagios.
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.2/client64/lib ORACLE_HOME=/usr/lib/oracle/12.2/client64 /usr/local/nagios/libexec/check_oracle_health --connect '172.26.47.132:1521/dbinstance' --username 'nagios' --password '$USER9$' --mode sql --name="select count(*) from itsdcgprd.t6798_ivr_lct_rfr where T1989_CRY_CD is null" --warning 0 --critical 0
OK - select count(*) from itsdcgprd.t6798_ivr_lct_rfr where t1989_cry_cd is null: 0 | 'select'=0;0;0
can some one help me quickly on this to fix