Oracle Query check inconsistency across different servers
Posted: Thu Apr 16, 2015 2:13 pm
Hello folks,
We are running the latest version of NagiosXI on the pre-built vm and seeing a very strange situation when trying to run an Oracle SQL query monitor against 2 identical database servers and would appreciate some guidance as to why this may be.
1. Connecting to 2 different Oracle servers that have the exactly the same database with bidirectional replication
2. Oracle accounts and user access rights on both databases are identical
3. I can run the same query manually with SqlPlus on both servers under the same username and I get a valid result
4. NagiosXI running the check on one server works properly but on the second server I get a nonsensical response.
Server 1 check command:
check_xi_oraclequery!--connect 'dbserver-1:1537/MYDB' --username 'user' --password 'password' --mode sql --name="select avg(response_time) from myuser.activity_logs where activity_date > sysdate - (2/1440)" --warning 50 --critical 200
Server 1 response when there is no activity for the last 2 minutes:
UNKNOWN - got no valid response for select avg(response_time) from myuser.activity_logs where activity_date > sysdate - (2/1440)
Server 2 check command:
check_xi_oraclequery!--connect 'dbserver-2:1537/MYDB' --username 'user' --password 'password' --mode sql --name="select avg(response_time) from myuser.activity_logs where activity_date > sysdate - (2/1440)" --warning 50 --critical 200
Server 2 response when there is no activity for the last 2 minutes:
UNKNOWN - got no valid response for select avg(response_time) from tim_user.activity_logs where activity_date > sysdate - (2/1440) - ORA-00942: table or view does not exist (DBD ERROR: error possibly near <*> indicator at char 21 in ' SELECT version FROM
Thank you,
Alex
We are running the latest version of NagiosXI on the pre-built vm and seeing a very strange situation when trying to run an Oracle SQL query monitor against 2 identical database servers and would appreciate some guidance as to why this may be.
1. Connecting to 2 different Oracle servers that have the exactly the same database with bidirectional replication
2. Oracle accounts and user access rights on both databases are identical
3. I can run the same query manually with SqlPlus on both servers under the same username and I get a valid result
4. NagiosXI running the check on one server works properly but on the second server I get a nonsensical response.
Server 1 check command:
check_xi_oraclequery!--connect 'dbserver-1:1537/MYDB' --username 'user' --password 'password' --mode sql --name="select avg(response_time) from myuser.activity_logs where activity_date > sysdate - (2/1440)" --warning 50 --critical 200
Server 1 response when there is no activity for the last 2 minutes:
UNKNOWN - got no valid response for select avg(response_time) from myuser.activity_logs where activity_date > sysdate - (2/1440)
Server 2 check command:
check_xi_oraclequery!--connect 'dbserver-2:1537/MYDB' --username 'user' --password 'password' --mode sql --name="select avg(response_time) from myuser.activity_logs where activity_date > sysdate - (2/1440)" --warning 50 --critical 200
Server 2 response when there is no activity for the last 2 minutes:
UNKNOWN - got no valid response for select avg(response_time) from tim_user.activity_logs where activity_date > sysdate - (2/1440) - ORA-00942: table or view does not exist (DBD ERROR: error possibly near <*> indicator at char 21 in ' SELECT version FROM
Thank you,
Alex