From 486e371fd494e9493c8b75a53605aec8aeecb6bc Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 29 Sep 2018 03:38:09 +0200 Subject: [PATCH] Ability to add custom nagios plugins through /data/nagios-plugins Install official nagios-plugins package Services enabled by default --- CHANGELOG.md | 6 ++++++ Dockerfile | 3 +++ README.md | 10 +++++++++- entrypoint.sh | 25 +++++++++++++++++++++++++ examples/compose/docker-compose.yml | 2 ++ 5 files changed, 45 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2bb48b..0c38fd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 1.43-RC5 (2018/09/29) + +* Ability to add custom nagios plugins through `/data/nagios-plugins` +* Install official nagios-plugins package +* Services enabled by default + ## 1.43-RC4 (2018/09/26) * Add `ttf-dejavu` package diff --git a/Dockerfile b/Dockerfile index 79f07d8..13019dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,11 +28,14 @@ RUN apk --update --no-cache add \ imagemagick \ mtr \ mysql-client \ + nagios-plugins \ + nagios-plugins-all \ net-snmp \ net-snmp-tools \ nginx \ nmap \ openssl \ + perl \ php7 \ php7-cli \ php7-ctype \ diff --git a/README.md b/README.md index 21eb9aa..41da8d0 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,8 @@ If you are interested, [check out](https://hub.docker.com/r/crazymax/) my other * Alpine Linux 3.8, Nginx, PHP 7.2 * Cron tasks as a ["sidecar" container](#cron) * Syslog-ng support through a ["sidecar" container](#syslog-ng) +* [Distributed poller](https://docs.librenms.org/#Extensions/Distributed-Poller/#distributed-poller) +* Ability to add custom nagios plugins * OPCache enabled to store precompiled script bytecode in shared memory ### From docker-compose @@ -85,7 +87,7 @@ If you are interested, [check out](https://hub.docker.com/r/crazymax/) my other ### Volumes -* `/data` : Contains configuration, rrd database, logs, additional syslog-ng config files +* `/data` : Contains configuration, rrd database, logs, additional nagios plugins, additional syslog-ng config files ### Ports @@ -218,6 +220,12 @@ You have to create a configuration file to enable syslog in LibreNMS too. Create $config['enable_syslog'] = 1; ``` +## Additional nagios plugins + +You can add a custom nagios plugin in `/data/nagios-plugins/`. + +> ⚠️ Container has to be restarted to propagate changes + ## Upgrade To upgrade to the latest version of LibreNMS, pull the newer image and launch the container. LibreNMS will upgrade automatically : diff --git a/entrypoint.sh b/entrypoint.sh index 56930dc..4963254 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -103,6 +103,7 @@ sed -i -e "s/RANDOMSTRINGGOESHERE/${LIBRENMS_SNMP_COMMUNITY}/" /etc/snmp/snmpd.c echo "Initializing LibreNMS files / folders..." mkdir -p ${DATA_PATH}/config \ ${DATA_PATH}/logs \ + ${DATA_PATH}/nagios-plugins \ ${DATA_PATH}/rrd rm -f ${LIBRENMS_PATH}/config.d/* @@ -158,6 +159,13 @@ cat > ${LIBRENMS_PATH}/config.d/autoupdate.php < ${LIBRENMS_PATH}/config.d/services.php < ${LIBRENMS_PATH}/config.d/memcached.php <