Sign inSign up

nandolavras/nagioscore

By nandolavras

•Updated about 2 years ago

NagiosCore

Image
0

2.0K

nandolavras/nagioscore repository overview

NagiosCore 4.4.10 with Telegram Notifications.

OS: Alpine 3.16 or Debian 11.3 (BullsEye)

Changelog:

1.5.1-alpine:

  • Nagios updated to 4.4.10
  • Plugins updated to 2.4.3

1.5.0-alpine:

  • Changed GD2 file extensions in configuration to PNG (Not supported on LIBGD >= 2.3.3)

1.4.9-alpine:

  • Alpine updated to 3.16
  • PHP updated to 8
  • Fixed some bugs

1.4.8-alpine:

  • Nagios updated to 4.4.9

1.4.7-alpine:

  • Nagios updated to 4.4.8
  • Plugins updated to 2.4.2
  • Added Nagvis 1.9.34
  • Added Healthcheck

1.4.6-alpine:

  • Added Multiarch Support.

1.4.5-alpine:

  • Fixed a bug preventing legacy statusmap from build (legacymap not found on previous builds)
  • Added per map layout options (statusmap_layout [default to 5] / newstatusmap_layout [default to 3])
  • Changed the default legacymap background color to #C3C7D3

1.4.3-alpine:

  • Image updated to MultiStage Build. (Reduced Size)
  • Running on Alpine 3.15

1.4.0:

  • Image updated to MultiStage Build. (Reduced Size)
  • Running on Debian 11.3

How to use:

Running without data persistence:

docker run --name my-container-p 0.0.0.0:8887:80 nandolavras/nagioscore:TAG

Running with data persistence:

alternatively you can use external configuration & log data (for persistence) with the following:

docker run --name my-container
-v /path-on-host/etc/:/usr/local/nagios/etc/
-v /path-on-host/var/:/usr/local/nagios/var/
-v /path-on-host/external/:/usr/local/nagios/external/
-p 0.0.0.0:8887:80 nandolavras/nagioscore:TAG

To correct the timezone to your local timezone add the line below to your docker run:

-v /etc/localtime:/etc/localtime:ro

Credentials:

The default credentials for the web interface is nagiosadmin / welcome

To change the default web password:

docker exec -it my-container htpasswd /usr/local/nagios/etc/htpasswd.users nagiosadmin

Operation:

- To add a new host:

You have to edit /path-on-host/etc/monitoring.cfg, there's a example here.

After adding a new host or service restart nagios with:

docker exec -it my-container service nagios reload

- To Telegram notification work:

  1. You have to add your telegram bot TOKEN to /path-on-host/external/telegram

  2. Set the Telegram CHAT ID on /path-on-host/etc/objects/contacts.cfg, in each contact you want to enable telegram you must put the telegram chat id in the pager number for that specific contact.

  3. For the rest of the configuration about notifications, refers to Nagios Documentation.

- How to create a Telegram BOT and grab the TOKEN and CHAT ID:

  1. Open Telegram and start chat with @BotFather

  2. Type /newboot (follow the instructions)

  3. On the final Telegram shows your BOT TOKEN.

  4. Start a chat with your bot and send him a hello.

  5. Open on your Browser: https://api.telegram.org/botTOKEN/getUpdates⁠ (replacing TOKEN by the token that you already have)

  6. As the result you see a line with the content:

    "chat":{"id":999999999,"first_name":"You Name Here"

    This is your CHAT ID.

For more information about telegram BOTs, refers to Telegram Official Documentation: https://core.telegram.org/bots⁠

Tag summary

Content type

Image

Digest

sha256:596cdb550…

Size

83.4 MB

Last updated

about 2 years ago

docker pull nandolavras/nagioscore