Add check_oracle service include file and make 'packet_loss_' macro alerts not use radio buttons (#10807)

* - Adjust Alerting Query Builder logic to not use boolean/radio buttons for 'packet_loss_' macros
- Add nagios check script for "check_oracle", which fails on the fallback logic because it does not accept IP/hostname via the '-H' flag

* Update check_oracle.inc.php
This commit is contained in:
Chris A. Evans
2019-11-14 12:45:00 -06:00
committed by Tony Murray
parent a9212faa83
commit 5bdfd57b84
2 changed files with 15 additions and 1 deletions

View File

@@ -69,7 +69,7 @@ class QueryBuilderFilter implements \JsonSerializable
continue; // don't include the time based macros, they don't work like that
}
if (ends_with($key, '_usage_perc')) {
if ((ends_with($key, '_usage_perc')) || (starts_with($key, 'packet_loss_'))) {
$this->filter[$field] = [
'id' => $field,
'type' => 'integer',

View File

@@ -0,0 +1,14 @@
<?php
/**
* check_oracle Nagios Plugin
* Docs: https://www.monitoring-plugins.org/doc/man/check_oracle.html
*
* If the plugin doesn't work, check that the ORACLE_HOME environment
* variable is set, that ORACLE_HOME/bin is in your PATH, and the
* tnsnames.ora file is locatable and is properly configured.
*
* This plugin does not accept the '-H' flag for hostname/IP address
* that most other Nagios plugins do.
*
*/
$check_cmd = \LibreNMS\Config::get('nagios_plugins') . "/check_oracle " . $service['service_param'];