Oracle Monitoring issue
Re: Oracle Monitoring issue
The folders and permissions look good for the Oracle Client and the perl modules.
When we ran the check with the wrong username, password or permissions for the Oracle database, we did see errors similar to what you are getting.
Can you show us how the nagios account was created on the Oracle server and also, what version is the Oracle database?
When we ran the check with the wrong username, password or permissions for the Oracle database, we did see errors similar to what you are getting.
Can you show us how the nagios account was created on the Oracle server and also, what version is the Oracle database?
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
raamardhani7
- Posts: 459
- Joined: Tue Jun 02, 2015 12:36 am
Re: Oracle Monitoring issue
Hi Tom,tgriep wrote:The folders and permissions look good for the Oracle Client and the perl modules.
When we ran the check with the wrong username, password or permissions for the Oracle database, we did see errors similar to what you are getting.
Can you show us how the nagios account was created on the Oracle server and also, what version is the Oracle database?
Below are the permissions that is given, and the oracle DB is 11g.
Code: Select all
grant create session to nagios;
grant select any dictionary to nagios;
grant select on V_$SYSSTAT to nagios;
grant select on V_$INSTANCE to nagios;
grant select on V_$LOG to nagios;
grant select on SYS.DBA_DATA_FILES to nagios;
grant select on SYS.DBA_FREE_SPACE to nagios;
--
grant read on directory BDUMP_DIR to nagios;
grant create session to nagios;
grant select on dba_data_files to nagios;
grant select on dba_free_space to nagios;
grant select on filext$ to nagios;
grant select on v_$librarycache to nagios;
grant select on v_$process to nagios;
grant select on v_$sesstat to nagios;
grant select on v_$sort_segment to nagios;
grant select on v_$sysstat to nagios;
grant select on v_$instance to nagios;
grant select on v_$parameter to nagios;
grant select on v_$session to nagios;
grant select on dba_tablespaces to nagios;
grant select on sys.alert_log to nagios;
grant select on system.alert_log to nagios;
grant select on system.alert_log_external to nagios;
grant execute on system.alert_log_date to nagios;
grant select on V_$RMAN_BACKUP_JOB_DETAILS to nagios;
grant select on V_$LOGSTDBY_PROGRESS to nagios;
grant select on DBA_LOGSTDBY_LOG to nagios;
grant select on v_$archived_log to nagios;
grant select on v_$archive_gap to nagios;
grant select on dba_autotask_job_history to nagios;
grant select on DBA_SCHEDULER_JOB_RUN_DETAILS to nagios;
grant select on dba_tables to nagios;
grant select on V_$DATAGUARD_STATS to nagios;
grant select on v_$backup_set to nagios;
grant select on v_$backup_piece to nagios;
grant select on V_$BACKUP_DATAFILE to nagios;
grant select on DBA_TAB_STATS_HISTORY to nagios;
Code: Select all
Grant ALTER SESSION to nagios;
Grant CONNECT to nagios;
Grant CREATE SESSION to nagios;
Grant SELECT ANY TABLE to nagios;
Code: Select all
Oracle Query - Database Status
UNKNOWN - got no valid response for select open_mode from v - ORA-04044: procedure, function, package, or type is not allowed here (DBD ERROR: error possibly near <*> indicator at char 22 in 'select open_mode from <*>v')
Code: Select all
/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 /usr/local/nagios/libexec/check_oracle_health --connect 'xx.xx.xx.xx:1521/dbinstance' --username 'userid' --password 'passwd' --mode sql --name="select open_mode from v\$database" --critical DOWN
OUTPUT: UNKNOWN - got no valid response for select open_mode from v$database
Re: Oracle Monitoring issue
Is this the actual name of the database you are running the query against?
If so, edit your command and instead of using \$, try this instead.
Try that and let us know if this helps.
Code: Select all
v$databaseCode: Select all
"select open_mode from v$"$"database"Be sure to check out our Knowledgebase for helpful articles and solutions!
-
raamardhani7
- Posts: 459
- Joined: Tue Jun 02, 2015 12:36 am
Re: Oracle Monitoring issue
Hi Tom,tgriep wrote:Is this the actual name of the database you are running the query against?If so, edit your command and instead of using \$, try this instead.Code: Select all
v$databaseTry that and let us know if this helps.Code: Select all
"select open_mode from v$"$"database"
Tried the below..
Code: Select all
/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 /usr/local/nagios/libexec/check_oracle_health --connect 'xx.xx.xx.xx:1521/dbinstance' --username 'user' --password 'passwd' --mode sql --name="select open_mode from v\$"\$"database" --critical DOWN
OUTPUT: UNKNOWN - got no valid response for select open_mode from v$$database - ORA-00942: table or view does not exist (DBD ERROR: error possibly near <*> indicator at char 22 in 'select open_mode from <*>v$$database')
Code: Select all
/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 /usr/local/nagios/libexec/check_oracle_health --connect 'xx.xx.xx.xx:1521/JDAAPDEV' --username 'user' --password 'passwd' --mode sql --name="select open_mode from v"\$"database" --critical DOWN
OUTPUT: UNKNOWN - got no valid response for select open_mode from v$databaseRe: Oracle Monitoring issue
What is the name of the database you are trying to run the query against?
Remove the \ from the command, try it again and let us know if it works.
Remove the \ from the command, try it again and let us know if it works.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
raamardhani7
- Posts: 459
- Joined: Tue Jun 02, 2015 12:36 am
Re: Oracle Monitoring issue
Name of the DB is:JDAAPDEVtgriep wrote:What is the name of the database you are trying to run the query against?
Remove the \ from the command, try it again and let us know if it works.
Code: Select all
--connect 'xx.xx.xx.xx:1521/JDAAPDEV' --username 'user' --password 'nagpasswdios' --mode sql --name="select open_mode from v"$"database" --critical DOWN
Code: Select all
COMMAND: /bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 /usr/local/nagios/libexec/check_oracle_health --connect 'xx.xx.xx.xx:1521/JDAAPDEV' --username 'user' --password 'passwwd' --mode sql --name="select open_mode from v"\$"database" --critical DOWN
OUTPUT: UNKNOWN - got no valid response for select open_mode from v$database
Re: Oracle Monitoring issue
I found this on the plugins web site, It looks like when using the mode sql, the query can only return a number.
The open_mode query returns a string so it will not work.
The open_mode query returns a string so it will not work.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
raamardhani7
- Posts: 459
- Joined: Tue Jun 02, 2015 12:36 am
Re: Oracle Monitoring issue
Hi Tom,tgriep wrote:I found this on the plugins web site, It looks like when using the mode sql, the query can only return a number.
The open_mode query returns a string so it will not work.
Could you please suggest what can be done here, thanks.
Re: Oracle Monitoring issue
I did a quick search but couldn't find a plugin to do a query that returns a string but you can take a look at our exchange site to see if you can find something.
https://exchange.nagios.org/directory/P ... ses/Oracle
https://exchange.nagios.org/directory/P ... ses/Oracle
Be sure to check out our Knowledgebase for helpful articles and solutions!