Community-based GPL-licensed network monitoring system
Go to file
Adam Bishop 492ab32b6d
Add support for sending events to Sensu (#11383)
* 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
2020-04-11 14:29:13 -05:00
.github Create FUNDING.yml 2020-04-06 14:12:24 -05:00
app Toggle visibilty of Dashboard Editor (#11321) 2020-04-10 14:34:44 +02:00
bootstrap Check PHP version first (#10473) 2019-08-01 06:58:22 -05:00
cache fix: page/graph load speed: part 1 (#6611) 2017-05-10 08:57:10 +01:00
config CyberPower SNMP Traps (#11403) 2020-04-10 13:27:15 +02:00
contrib Use Config helper (#10339) 2019-06-23 00:29:12 -05:00
database Adding Column ifSpeed_prev, ifHighSpeed_prev to Ports Table (#11348) 2020-04-01 10:50:33 +02:00
doc Add support for sending events to Sensu (#11383) 2020-04-11 14:29:13 -05:00
html Update Meraki logos (#11406) 2020-04-10 18:05:27 +02:00
includes update definition for devices running VyOS so they're discovered as Unix devices and can have sensors discovered (#11390) 2020-04-11 13:57:00 -05:00
LibreNMS Add support for sending events to Sensu (#11383) 2020-04-11 14:29:13 -05:00
licenses delete old stuff, put licenses into licenses 2011-09-29 15:58:18 +00:00
logs Restore gitignore file contents (#9784) 2019-02-06 06:57:44 -06:00
mibs Added support for RIEDO data concentrator (#11237) 2020-04-10 13:24:49 +02:00
misc Add support for Ascom IPBS (#11308) 2020-04-10 13:21:25 +02:00
resources Toggle visibilty of Dashboard Editor (#11321) 2020-04-10 14:34:44 +02:00
routes Toggle visibilty of Dashboard Editor (#11321) 2020-04-10 14:34:44 +02:00
rrd Restore gitignore file contents (#9784) 2019-02-06 06:57:44 -06:00
scripts Update php-codesniffer (#11368) 2020-04-03 08:41:24 -05:00
sql-schema Alert template clean up "\r\n\n" (#10541) 2019-09-05 04:34:24 +00:00
storage Update to Laravel 5.7 (PHP 7.3 support) (#9800) 2019-02-12 17:45:04 -06:00
tests CyberPower SNMP Traps (#11403) 2020-04-10 13:27:15 +02:00
.codeclimate.yml More codeclimate tuning (#9197) 2018-09-13 12:18:58 -05:00
.editorconfig Update to Laravel 5.7 (PHP 7.3 support) (#9800) 2019-02-12 17:45:04 -06:00
.env.dusk.testing New User Management (#9348) 2019-04-22 19:01:39 -05:00
.env.example Add Laravel to LibreNMS (#8318) 2018-05-09 08:05:17 -05:00
.gitignore Unbundle javascript language files (#10788) 2019-11-08 15:18:41 +00:00
.mention-bot Update .mention-bot (#5371) 2017-01-09 21:19:03 +00:00
.scrutinizer.yml refactor: use Composer to manage php dependencies (#5216) 2017-01-01 09:37:15 +00:00
.travis.yml Update dusk-updater (#11311) 2020-03-20 16:37:36 -05:00
addhost.php Clarify that you can use IP or hostname to add device (#11393) 2020-04-09 23:39:37 +02:00
adduser.php Use Laravel authentication (#8702) 2018-09-11 07:51:35 -05:00
alerts.php Alert Subsys to OOP and SNMPTraps trigger Alert Rules (#9765) 2019-07-18 08:36:02 -05:00
artisan Update to Laravel 5.7 (PHP 7.3 support) (#9800) 2019-02-12 17:45:04 -06:00
AUTHORS.md Add more Vigor series device support (#10562) 2019-09-05 03:42:40 +00:00
billing-calculate.php Added aggregate config option to Billing 95th percentile calculations (#10202) 2019-05-27 21:44:02 -05:00
build-base.php Laravel migrations (#8868) 2019-01-14 06:44:23 -06:00
build.sql Remove graph_types definitions from DB (#9618) 2019-01-08 13:46:45 -06:00
CHANGELOG.md Small Cleanup (#8871) 2018-07-07 13:55:17 +01:00
check-services.php Refactor Datastores to allow future improvements. OpenTSDB Tags. (#11283) 2020-03-16 09:17:58 -05:00
CODE_OF_CONDUCT.md docs: Added code of conduct doc in root (#7055) 2017-07-21 12:36:33 -05:00
composer.json Update PHP dependencies (#11377) 2020-04-03 17:13:18 -05:00
composer.lock Update PHP dependencies (#11377) 2020-04-03 17:13:18 -05:00
config_to_json.php Consolidate configuration settings and implement dynamic webui settings (#9809) 2019-10-16 21:22:05 +00:00
config.php.default Fix includes/defaults.inc.php references (#11249) 2020-03-04 09:18:56 +01:00
CONTRIBUTING.md documentation link fixes (#10848) 2019-11-19 17:14:15 +01:00
cronic fix: Updated bin/bash to use env in cronic script (#4752) 2016-10-13 22:23:53 +01:00
daily.php Prevent syslog table purge from spamming daily.log (#10851) 2019-11-19 23:57:56 +01:00
daily.sh Added support for routing table collection in discovery (#10182) 2019-11-17 16:30:43 +01:00
delhost.php refactor: Centralize includes and initialization (#4991) 2016-11-21 20:12:59 +00:00
discovery-wrapper.py Added ability to enable debug output with wrappers (#8830) 2018-06-20 22:56:51 +01:00
discovery.php Updated device cache support (#10795) 2019-11-14 21:56:06 +00:00
dist-pollers.php Fix broken updates (#10380) 2019-06-26 08:49:04 -05:00
irc.php refactor: Centralize includes and initialization (#4991) 2016-11-21 20:12:59 +00:00
librenms-service.py Updated shebang on librenms-service.py (#8875) 2018-07-08 22:25:29 +01:00
librenms.cron More more docs (#4197) 2016-08-25 18:40:11 -05:00
librenms.nonroot.cron Add note to cron file advising not to disable daily.sh (#9164) 2018-09-06 22:30:31 +01:00
LICENSE.txt Update copyright instructions 2014-06-23 13:44:12 +10:00
lnms Rename librenms script to lnms (#9696) 2019-01-18 11:39:10 -06:00
Makefile webui: Removed unused JS causing issues with typeahead (#8307) 2018-03-09 18:11:24 +01:00
mkdocs.yml Correct docs menu name (#11207) 2020-02-26 14:38:21 -06:00
package-lock.json Fix js warning in settings, update js deps (#11324) 2020-03-22 19:30:58 +01:00
package.json Fix js warning in settings, update js deps (#11324) 2020-03-22 19:30:58 +01:00
pbin.sh updated pbin.sh to be inline with other scripts and use env bash (#6583) 2017-05-05 07:52:52 +01:00
phpunit.xml Laravel 5.8 and updated dependencies (#10489) 2019-08-05 15:54:58 -05:00
ping.php Refactor Datastores to allow future improvements. OpenTSDB Tags. (#11283) 2020-03-16 09:17:58 -05:00
poll-billing.php Refactor Datastores to allow future improvements. OpenTSDB Tags. (#11283) 2020-03-16 09:17:58 -05:00
poller-service.py feature: support non-standard unix socket (#5724) 2017-04-06 22:02:37 +01:00
poller-wrapper.py fixed race conditions in distributed poller setup (#11307) 2020-04-09 22:38:49 -05:00
poller.php Refactor Datastores to allow future improvements. OpenTSDB Tags. (#11283) 2020-03-16 09:17:58 -05:00
README.md Markdown linting of docs (#10595) 2019-10-21 00:47:40 +00:00
readmegen.yml added changelog for v1.25 (#6018) 2017-02-26 22:14:06 +00:00
renamehost.php refactor: Centralize includes and initialization (#4991) 2016-11-21 20:12:59 +00:00
requirements.txt Python dispatcher service v2 (#10050) 2019-05-20 11:35:47 -05:00
server.php php artisan serve and dusk testing (#9422) 2019-02-14 09:06:10 -06:00
services-wrapper.py Read the db_port as integer (#11392) 2020-04-08 16:27:53 -05:00
snmp-scan.py Use Config helper (#10339) 2019-06-23 00:29:12 -05:00
snmp.conf.example snmp.conf is not needed so do not recommend to set anything (#6204) 2017-03-16 13:52:23 -05:00
snmpd.conf.example Documentation updates for DMI support and making two links in the FAQ work (#8440) 2018-05-08 18:35:25 -05:00
snmptrap.php Always boot Laravel (#9842) 2019-03-14 08:06:27 -05:00
syslog.php refactor: Centralize includes and initialization (#4991) 2016-11-21 20:12:59 +00:00
validate.php Only check depedencies once in validate.php (#11316) 2020-03-23 09:05:18 -05:00
webpack.mix.js Unbundle javascript language files (#10788) 2019-11-08 15:18:41 +00:00

Scrutinizer Status Scrutinizer Code Quality Travis Status

Introduction

LibreNMS is an autodiscovering PHP/MySQL/SNMP based network monitoring which includes support for a wide range of network hardware and operating systems including Cisco, Linux, FreeBSD, Juniper, Brocade, Foundry, HP and many more.

We intend LibreNMS to be a viable project and community that:

  • encourages contribution,
  • focuses on the needs of its users, and
  • offers a welcoming, friendly environment for everyone.

The Debian Social Contract will be the basis of our priority system, and mutual respect is the basis of our behaviour towards others. For more about the culture we're trying to build, please read the Freenode philosophy, including guidelines for running an IRC channel and being a community catalyst.

Documentation

Documentation can be found in the doc directory or docs.librenms.org, including instructions for installing and contributing.

Participating

You can participate in the project by:

VM image

You can try LibreNMS by downloading a VM image. Currently, a Ubuntu-based image is supplied and has been tested with VirtualBox.

Download one of the VirtualBox images we have available, documentation is provided which details login credentials and setup details.

License

Copyright (C) 2006-2012 Adam Armstrong adama@memetic.org

Copyright (C) 2013-2017 by individual LibreNMS contributors

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

LICENSE.txt contains a copy of the full GPLv3 licensing conditions.

The following additional license conditions apply to LibreNMS (a GPL exception):

As a special exception, you have permission to link or otherwise combine LibreNMS with the included copies of the following third-party software, and distribute modified versions, as long as you follow the requirements of the GNU GPL v3 in regard to all of the remaining software (comprising LibreNMS).

Please see Acknowledgements

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]