docker-nagios icon indicating copy to clipboard operation
docker-nagios copied to clipboard

[DOC] Add documentation to install additional modules on starting nagios

Open CRCinAU opened this issue 5 months ago • 0 comments

One of the things that is always lacking is "damn, I wish I had package X, or module Y" etc...

It should be documented that you can add packages on nagios startup via a CMD override.

eg, in a docker-compose.yaml file, we can do something like:

  nagios:
    container_name: nagios
    image: manios/nagios:latest
    command: /plugins/bootstrap_nagios
    restart: unless-stopped
    ... rest of config ...
    volumes:
      - /path/on/host/for/nagios/plugins:/plugins
    ... any other volumes ...

In the /plugins directory, the bootstrap_nagios script will contain something like:

#!/bin/sh
set -eu
apk update
apk add python3 py3-requests mariadb-client perl-socket6 perl-net-dns

/usr/local/bin/start_nagios

This installs the alpine packages I need for some of my custom plugins.

This is generally MUCH simpler than forking / publishing your own docker containers with minor tweaks...

CRCinAU avatar Aug 30 '24 19:08 CRCinAU