I have a single Primary server with several Satellite servers. I read in the documentation that best practice for a HA master configuration is to use a single database and connect both masters to that IP (VIP, if the database is a cluster behind a load balancer), so unless I’m missing something, that’s not actually HA - because the database / VIP is still a single point of failure.
For this reason, I’d like to stick with my current model of a single Primary & multiple Satellites. That said, I’d like to monitor a few things from one of my secondary nodes - and have the secondary send alerts if those things go down. Specifically, I want a Satellite server to monitor the Primary node, as well as the underlying physical hypervisors that the Primary resides on.
The Primary is in 1 datacenter, and I’m putting a secondary into each of our other data centers across the globe.
I’m still fairly new to Icinga, but I believe that My Master/Satellite setup is configured in a Top Down Config Sync mode. When I make changes to the config on the Master, I don’t have to then go make any changes or restart anything on the Secondary for my changes to take effect.
I realize that the documentation encourages one to use a services.conf file in each zone and reference that with something like: assign where host.vars.agent_endpoint
. That said, I’ve decided to define the service checks for each host (endpoint) in its own conf file, so that we can much more easily manage each host using Ansible.
I have an ansible playbook that I wrote which will setup monitoring for a specific endpoint that can be run like so, that will put the configuration for the new host that needs to be monitored into the correct zone on the Master server:
# ansible-playbook add_manual_host.yml -e "hostname=fqdn ip_address=172.16.x.x zone=europe http=false vnc=false linux=true" -K
# Possible Zones:
# - americas
# - europe
# - asia
How can I accomplish monitoring the Primary (and sending notifications) from a secondary server? On my Primary, I have multiple zones (for each data center) defined in /etc/icinga2/zones.conf, and the corresponding zone directories in setup in /etc/icinga2/zones.d/.
Below are a few other details about my environment (stdout from the Primary). Thanks in advance!
root@icinga:/# icinga2 --version
icinga2 - The Icinga 2 network monitoring daemon (version: r2.13.2-1)
Copyright (c) 2012-2022 Icinga GmbH (https://icinga.com/)
License GPLv2+: GNU GPL version 2 or later <https://gnu.org/licenses/gpl2.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
System information:
Platform: Ubuntu
Platform version: 20.04.3 LTS (Focal Fossa)
Kernel: Linux
Kernel version: 5.4.0-99-generic
Architecture: x86_64
Build information:
Compiler: GNU 9.3.0
Build host: runner-hh8q3bz2-project-298-concurrent-0
OpenSSL version: OpenSSL 1.1.1f 31 Mar 2020
Application information:
General paths:
Config directory: /etc/icinga2
Data directory: /var/lib/icinga2
Log directory: /var/log/icinga2
Cache directory: /var/cache/icinga2
Spool directory: /var/spool/icinga2
Run directory: /run/icinga2
Old paths (deprecated):
Installation root: /usr
Sysconf directory: /etc
Run directory (base): /run
Local state directory: /var
Internal paths:
Package data directory: /usr/share/icinga2
State path: /var/lib/icinga2/icinga2.state
Modified attributes path: /var/lib/icinga2/modified-attributes.conf
Objects path: /var/cache/icinga2/icinga2.debug
Vars path: /var/cache/icinga2/icinga2.vars
PID path: /run/icinga2/icinga2.pid
root@icinga:/# icinga2 feature list
Disabled features: command compatlog debuglog elasticsearch gelf graphite icingadb influxdb influxdb2 livestatus opentsdb perfdata statusdata syslog
Enabled features: api checker ido-pgsql mainlog notification