Got error with check_oracle_health plugin

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
axvaster
Posts: 21
Joined: Tue Jan 08, 2019 11:54 am

Got error with check_oracle_health plugin

Post by axvaster »

Hi support,

We used check_oracle_health plugin on XI 5.7.3 and encountered the problem as attachment.

Code: Select all

[nagios@Nagios19 ~]$ /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/18.5/client64/lib ORACLE_HOME=/usr/lib/oracle/18.5/client64 /usr/local/nagios/libexec/check_oracle_health --connect '' --username '' --password '' --mode sql --name="select count(*) from nagios.alert_history where ORIGINATING_TIMESTAMP > trunc(systimestamp - 30/(24*60),'mi') and ORAERROR1 not in (select ORAERROR1 from nagios.oraerrwlst)" --warning 0 --critical 2
Error message is following:

Code: Select all

UNKNOWN - got no valid response for select count\\(\\*\\) from nagios.alert_history where ORIGINATING_TIMESTAMP \\> trunc\\(systimestamp - 30/\\(24\\*60\\),\\'mi\\'\\) and ORAERROR1 not in \\(select ORAERROR1 from nagios.oraerrwlst\\) - ORA-00911: invalid character (DBD ERROR: error possibly near <*> indicator at char 12 in 'select count<*>\\(\\*\\) from nagios.alert_history where ORIGINATING_TIMESTAMP \\> trunc\\(systimestamp - 30/\\(24\\*60\\),\\'mi\\'\\) and ORAERROR1 not in \\(select ORAERROR1 from nagios.oraerrwlst\\)')
nxi_573_error.png
It seems like we have invalid SQL statement, but the same SQL statement we used on XI 5.5.11 is working.
Is there any possible for this issue as a bug between them?
nagios_core.png
For your information, the version of DB is 11.2.0.4.0 and OS version is CentOS 8.2.

P.S. I would PM profile when any replies available.

Please advise.
Thank you!
You do not have the required permissions to view the files attached to this post.
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: Got error with check_oracle_health plugin

Post by dchurch »

Can you try running that command from the command line while SSH-ed into the Nagios XI server?

This is likely due to a known issue in Nagios XI 5.7.3 (fixed in 5.7.5) where the Run Check Command dialog inserted extra escaping where it shouldn't.

See Nagios XI change log:
5.7.5 - 11/12/2020
- Core Config Manager (CCM) - 3.0.8
- - Fixed issue with command escaping in Test Check Command [TPS#15167] -JO
I'd advise upgrading if this is a problem for you, but if that's not possible, I could maybe create a patch to retrofit the fix into your 5.7.3 installation.
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Locked