Oracle database query alarms
Posted: Fri Jul 13, 2018 10:38 am
Does anyone know if there's a way to use the Nagios_xi_oraclequery command to run a sql query to an oracle database, display the data in the critical alarm and also go critical if the query returns anything?
example: query returns something (if data is returned that means there's a problem)
critical alarm is triggered and display's results (the data it returned) in email to the user monitoring that service
here's my query to help: --connect '<servername>:<port>/<sid>' --username 'xxxxx' --password 'xxxxx' --mode sql --name="select count(a.requested_start_date) from apps.fnd_concurrent_programs_vl b, apps.fnd_concurrent_requests a where b.USER_CONCURRENT_PROGRAM_NAME like '%Gather Schema S%' and a.status_code in ('E','G') and a.requested_start_date > sysdate - 7 and a.CONCURRENT_PROGRAM_ID=b.CONCURRENT_PROGRAM_ID" --critical 0
in the query snippet above, were trying to see if the oracle concurrent manager returns any errors in the last 7 days. if it does, were hoping that we can return the data from the database (this shows the errored request id, name of the concurrent program erroring out, and the status E (error) or G (warning)) and show the results of the query in the email that is sent to the owner of the service.
thanks for your help.
example: query returns something (if data is returned that means there's a problem)
critical alarm is triggered and display's results (the data it returned) in email to the user monitoring that service
here's my query to help: --connect '<servername>:<port>/<sid>' --username 'xxxxx' --password 'xxxxx' --mode sql --name="select count(a.requested_start_date) from apps.fnd_concurrent_programs_vl b, apps.fnd_concurrent_requests a where b.USER_CONCURRENT_PROGRAM_NAME like '%Gather Schema S%' and a.status_code in ('E','G') and a.requested_start_date > sysdate - 7 and a.CONCURRENT_PROGRAM_ID=b.CONCURRENT_PROGRAM_ID" --critical 0
in the query snippet above, were trying to see if the oracle concurrent manager returns any errors in the last 7 days. if it does, were hoping that we can return the data from the database (this shows the errored request id, name of the concurrent program erroring out, and the status E (error) or G (warning)) and show the results of the query in the email that is sent to the owner of the service.
thanks for your help.