* Add support for sending events to Sensu
Sensu is an alerting and monitoring service (and much more) that has a
nagios compatible check API.
This transport translates LibreNMS alerts into Sensu events, and sends
them to the agent API running on the same host as the poller.
The transport has a few options, but none of them are required - if the
Sensu agent is correctly configured, alerts will be sent as soon as the
transport is enabled.
There's a fair amount of code, as I've tried to translate as much data as
possible between LibreNMS and Sensu.
* Update Transports.md
* If alerted is 0, send an "ok" alert dated rrd.step / 2 seconds ago
This makes Sensu aware of the last time the check ran successfully (ish).
If we don't send the initial "ok", Sensu will either display 'unknown',
or an incorrectly high duration for the incident.
Alerted gets set to 1 after the first alert is sent.
We choose rrd.step / 2 as:
* rrd.step is the maximum time ago the check could have succeeded
* we halve it, so that if a check is flapping, it is not masked
Basically, we guess that the check fails around halfway through the time
since the poller last ran.
* Add additional metadata
* Improve codeclimate slightly
* Consider names that are 2 or 3 components long
* perform json_encode() on memcached app $response data to match update_application() string parameter
* return raw snmp_get result for memcached response data during update_application()
* ipv6 support for BGP routes in VRP devices
* reverse bgpPeers array to allow VRF aware BGP
* codeclimate
* codeclimate
* codeclimate, finally
* Split VRP out of bgp-peers for readabilty
* Split VRP out of bgp-peers for readabilty
* tests
* CodeClimate
* improve function description
* improve function description
* v6data
* rebase
* space
* ipv6 support for BGP routes in VRP devices
* reverse bgpPeers array to allow VRF aware BGP
* codeclimate
* codeclimate
* codeclimate, finally
* Split VRP out of bgp-peers for readabilty
* Split VRP out of bgp-peers for readabilty
* tests
* CodeClimate
* improve function description
* improve function description
* v6data
* rebase
* space
* fixed corner case
* ascom support
* tests
* typo
* Correct missing 'mpls' in misc/os_schema.json
* remove mpls for now
* tests
* Update ascom.svg
* Don't disable already disabled modules
As I usually state, not much gain in disabling these here. Would be better to optimize the modules if you think they take too long on devices that don't have support.
* refactor polling code
Co-authored-by: Tony Murray <murraytony@gmail.com>
* Fix dashboard size
Missing container
scrollbar and empty space on the right
* Can't change the width it will break existing dashboard :S
Odd that the default width 6 doesn't fit nicely into 20
* Fix device creation using overwrited ip
`deviceArray` was creating a device missing the `overwrite_ip` field, so it was not used by `isSNMPable`
* Fix device creation using overwrited ip
Part 2: Fix using not yet set variable
* Fix device creation using overwrited ip
Part 3: remove double space
* Useless commit to trigger Travis
* added functionality to set sysLocation override in $os.inc.php files
* php styling fixes
* updated docs for location override in $os.inc.php
* patch poweralert.inc.php to use $location override
* added location override for enexus (Eltek)
* update phpdoc for set_device_location()
* converged location code in core.inc.php to use set_device_location()
* added new snmprec test data for enexus os
* Travis test data
* remove enexus_smartpacks2 test data
* Revert "remove enexus_smartpacks2 test data"
This reverts commit 36c8fc7036.
* updated enexus_smartpacks2 test data with generic syslocation
* kick travis CI
* kick travis CI
* OPNsense better reporting of Version and Platform
OPNsense can now report exact version and platform, if the settings in OPNsense is ticked "Display Verion in OID".
* OPNsense poller change to better type check
OPNsense poller change to better type check on $OIDVersionString, which returns false if not found but contains string if it is.
* Add missing bracket to if statement
Add missing bracket to if statement on $OIDVersionString
* OPNsense poll add required spaces to function call
OPNsense poller add required spaces to function call, for coding style checks to pass.
* OPNsense test data json files
OPNsense test data json files