feature: Added elasticsearch transport and docs (#6687)

* Add elasticsearch transport and docs

* Fix formatting

* Fix formatting

* Remove librenms string from sql file

* Add missing states

* Use ifAlias not ifDescr

* Update Alerting.md

* Remove unused es_enabled flag

* Fix storage column names

* Fix processor columns

* Rename 194.sql to 193.sql
This commit is contained in:
pblasquez
2017-06-01 04:16:39 -07:00
committed by Neil Lathwood
parent f8aadf227b
commit cc38930007
6 changed files with 262 additions and 4 deletions

View File

@@ -20,11 +20,15 @@ if (is_admin() === false) {
$transport = mres($_POST['transport']);
require_once $config['install_dir'].'/includes/alerts.inc.php';
$tmp = array(dbFetchRow('select device_id,hostname from devices order by device_id asc limit 1'));
$tmp = array(dbFetchRow('select device_id,hostname,sysDescr,version,hardware,location from devices order by device_id asc limit 1'));
$tmp['contacts'] = GetContacts($tmp);
$obj = array(
"hostname" => $tmp[0]['hostname'],
"device_id" => $tmp[0]['device_id'],
"sysDescr" => $tmp[0]['sysDescr'],
"version" => $tmp[0]['version'],
"hardware" => $tmp[0]['hardware'],
"location" => $tmp[0]['location'],
"title" => "Testing transport from ".$config['project_name'],
"elapsed" => "11s",
"id" => "000",
@@ -33,6 +37,7 @@ $obj = array(
"severity" => "critical",
"rule" => "%macros.device = 1",
"name" => "Test-Rule",
"string" => "#1: test => string;",
"timestamp" => date("Y-m-d H:i:s"),
"contacts" => $tmp['contacts'],
"state" => "1",