Page 1 of 1

what is the escape special character in Nagios

Posted: Thu May 09, 2013 4:40 pm
by newuser1
Hello All,

I wanted to know what are the escape special character when doing a query in Nagios Oracle_Query? for example select * from table_name i get an error saying

Code: Select all

OUTPUT: UNKNOWN - got no valid response for select \* from table_name - ORA-00911: invalid character (DBD ERROR: error possibly near <*> indicator at char 7 in 'select <*>\* from table_name)

I try one escape '\' before the *
I also tried 2 and 3 slaches and no luck

Re: what is the escape special character in Nagios

Posted: Thu May 09, 2013 4:49 pm
by lmiltchev
Not all of the checks can be tested successfully via "Test Check Command" in the CCM. This button was placed in the CCM for convenience, but was never meant to be a replacement of checking via the CLI. It works in the majority of the cases but it may fail on database checks because of the escaping issues.

Can you show us the exact command that you are running from the command line and the output of it?

Re: what is the escape special character in Nagios

Posted: Thu May 09, 2013 5:22 pm
by newuser1
But this is in the GUI not in the command line.

Re: what is the escape special character in Nagios

Posted: Thu May 09, 2013 5:47 pm
by newuser1
how would you write a simple query when you go to configure tab > Monitor wizard > Oracle Query > enter the database credential > enter the default query?

Code: Select all

select count(*) from v\$session where status = "active"
I know it must be something simple I am just having a hard time figuring it out. All suggestions will be very appreciated!

Re: what is the escape special character in Nagios

Posted: Fri May 10, 2013 2:40 pm
by slansing
Do you have a specific query in mind to test this against? One that will without a doubt be valid in your oracle database? Unfortunately this is something only you or your DBA would be able to find out.