NagiosCore 4.4.10 with Telegram Notifications.
OS: Alpine 3.16 or Debian 11.3 (BullsEye)
Changelog:
1.5.1-alpine:
1.5.0-alpine:
1.4.9-alpine:
1.4.8-alpine:
1.4.7-alpine:
1.4.6-alpine:
1.4.5-alpine:
1.4.3-alpine:
1.4.0:
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:
You have to add your telegram bot TOKEN to /path-on-host/external/telegram
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.
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:
Open Telegram and start chat with @BotFather
Type /newboot (follow the instructions)
On the final Telegram shows your BOT TOKEN.
Start a chat with your bot and send him a hello.
Open on your Browser: https://api.telegram.org/botTOKEN/getUpdates (replacing TOKEN by the token that you already have)
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
Content type
Image
Digest
sha256:596cdb550…
Size
83.4 MB
Last updated
about 2 years ago
docker pull nandolavras/nagioscore