Sign inSign up

mikenowak/nrpe

By mikenowak

•Updated 10 months ago

NRPE in a container

Image
0

1M+

mikenowak/nrpe repository overview

⁠Docker NRPE Container

NRPE (Nagios Remote Plugin Executor) container with additional monitoring plugins. Built on Alpine Linux for minimal footprint and enhanced security.

Note: This container is primarily maintained for the author's specific needs and includes several custom monitoring scripts that might not be useful for general purposes. It was originally created in 2017 and has evolved to meet specific monitoring requirements.

⁠Features

  • Based on Alpine Linux for minimal image size
  • Includes standard Nagios plugins
  • Additional custom checks including Docker, Swarm, backup monitoring, and various system metrics

⁠Installation

Pull from Docker Hub:

docker pull mikenowak/nrpe

⁠Usage

⁠Basic Run Command
docker run -d --restart unless-stopped \
  -v /:/rootfs:ro \
  -v /var/run:/var/run:rw \
  -v /sys:/sys:ro \
  -v /var/lib/docker/:/var/lib/docker:ro \
  --privileged \
  --net=host \
  --ipc=host \
  --pid=host \
  -e NAGIOS_SERVER="1.2.3.4" \
  mikenowak/nrpe
⁠Required Environment Variables
  • NAGIOS_SERVER: IP address of your Nagios monitoring server
⁠Volume Mounts

The container requires several mounts to function properly:

  • /:/rootfs:ro: Root filesystem (read-only)
  • /var/run:/var/run:rw: Runtime directory
  • /sys:/sys:ro: System information
  • /var/lib/docker/:/var/lib/docker:ro: Docker information (for Docker checks)
⁠Docker Compose Example
version: '3.8'

services:
  nrpe:
    image: mikenowak/nrpe
    environment:
      - NAGIOS_SERVER=1.2.3.4
    volumes:
      - /:/rootfs:ro
      - /var/run:/var/run:rw
      - /sys:/sys:ro
      - /var/lib/docker/:/var/lib/docker:ro
    privileged: true
    network_mode: host
    ipc: host
    pid: host
    restart: unless-stopped

⁠Security Considerations

  • Container runs with privileged access
  • Host network access required
  • Root filesystem mounted read-only
  • NRPE configured with minimal permissions
  • Uses specific user (nagios) for running checks

⁠Building from Source

git clone https://github.com/mikenowak/docker-nrpe.git
cd docker-nrpe
docker build -t local/nrpe .

⁠Attributions

This container includes monitoring scripts from various sources:

Some scripts included in this container come from sources that can no longer be properly attributed due to the age of the project (originally created in 2017). Apologies to the original authors where proper attribution couldn't be maintained.

⁠Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

⁠License

MIT⁠

Tag summary

Content type

Image

Digest

sha256:7d18ee3bb…

Size

72.4 MB

Last updated

10 months ago

docker pull mikenowak/nrpe