Issues with running oracle query fron nagiosxi

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mohan23
Posts: 118
Joined: Tue Oct 03, 2017 7:11 am

Issues with running oracle query fron nagiosxi

Post by mohan23 »

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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Issues with running oracle query fron nagiosxi

Post by scottwilkerson »

Actually, per the Nagios Plugin Development guidelines, the output would have to exceed the value in critical not match it.
https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT

I would use -1
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked