Hi
I have a lot of Oracle databases monitored with NagiosXI (check_oracle_health) and I found that when one "Service check" fails to connect to database for any reason, the plugin send a CRITICAL ALARM with the error returned, similar this:
[nagios@prnagxi01 ~]$ /usr/local/nagios/libexec/check_oracle_health --connect 'ALIAS_NAME' --username 'c##nagios' --password 'XYZ' --mode tablespace-usage
CRITICAL - cannot connect to ALIAS_NAME. ORA-12154: TNS:could not resolve the connect identifier specified (DBD ERROR: OCIServerAttach)
Is it possible to change this behaviour sending in this scenario an "UNKNOWN" alarm ? this seem more accurate, because when the plugin doesn't connect to Database, the specific metric value is unknown.
The CRITICAL message during the connection, should remain only for method "Connection-time" or "TNSPING".
Is this possible ?
Best Regards
Antonello
Oracle service check status
Re: Oracle service check status
Hi Antonello,
How are you doing?
Since "check_oracle_health" came from the Nagios Exchange page, it is best that you contact the developer (owner) for this.
https://exchange.nagios.org/directory/P ... th/details
However, I looked inside the script and if you only want to check for just the "ORA-12154" error, you can add the following three lines under the "sub dbconnect" function starting at line "5673".
Example:
Best Regards,
Vinh
How are you doing?
Since "check_oracle_health" came from the Nagios Exchange page, it is best that you contact the developer (owner) for this.
https://exchange.nagios.org/directory/P ... th/details
However, I looked inside the script and if you only want to check for just the "ORA-12154" error, you can add the following three lines under the "sub dbconnect" function starting at line "5673".
Example:
Code: Select all
} elsif ($self->{handle}->{errstr} =~ /ORA-12154/) {
$self->add_nagios($ERRORS{UNKNOWN}, $self->{handle}->{errstr});
$retval = undef;
Best Regards,
Vinh
Re: Oracle service check status
Hi Vinh
I'm fine hope you too.
I followed your suggestion and done some changes in the "sub dbconnect" for /ORA-12545/ , /ORA-12541/ and for other specific errors.
The changes are working
.
However I would suggest to propose this as an idea to plugin developer, but in more general scenario, where in case of connection problems, all the DB specific checks should be in UNKNOWN status (or configurable alternative status) except for "connection-time" and "tnsping".
In this way we can avoid unwanted notifications.
Thanks
Best Regards
Antonello
I'm fine hope you too.
I followed your suggestion and done some changes in the "sub dbconnect" for /ORA-12545/ , /ORA-12541/ and for other specific errors.
The changes are working
However I would suggest to propose this as an idea to plugin developer, but in more general scenario, where in case of connection problems, all the DB specific checks should be in UNKNOWN status (or configurable alternative status) except for "connection-time" and "tnsping".
In this way we can avoid unwanted notifications.
Thanks
Best Regards
Antonello
Re: Oracle service check status
Hi Antonello,
I am very glad that you has resolved the issue by making some changes to the script ...
Please feel free to update your suggestion to the developer web page, as I think will help others with unnecessary alarms or warnings.
May I go ahead and close this thread?
Best Regards,
Vinh
I am very glad that you has resolved the issue by making some changes to the script ...
Please feel free to update your suggestion to the developer web page, as I think will help others with unnecessary alarms or warnings.
May I go ahead and close this thread?
Best Regards,
Vinh
Re: Oracle service check status
Hi Vinh
Sorry for late in response.
Close the thread please
Best Regards
Antonello
Sorry for late in response.
Close the thread please
Best Regards
Antonello
Re: Oracle service check status
Great!! ... locking thread ... 