Hello,
I have a very basic thing I want to do and I can’t seem to pin point what I am missing here.
The Goal:
I have three servers:
- Icinga master
- DNS server
- Hypervisor
I want to be able to check if DNS server is reachable from the Hypervisor at all times. For this I am simply going to ping it. The built-in check_ping should do the job.
My configuration:
object Host "hypervisor" {
import "generic-host"
address = "some_public_ip"
vars.os = "Linux"
vars.sla = "all-week-8to22"
vars.geolocation = "1234567890"
vars.client_endpoint = name
vars.notification["mail"] = {
groups = [ "icingaadmins" ]
}
vars.swap_wfree = "30%"
vars.swap_cfree = "15%"
vars.qemu_vms = {
"vm1" = {},
"vm2" = {},
"vm3" = {},
}
vars.f2b = {
"all-jails" = {}
}
vars.vnstat = {
"enp0s31f6" = {
vnstat_iwarning = 1024000
vnstat_owarning = 1024000
vnstat_icritical = 2048000
vnstat_ocritical = 2048000
}
"tap0" = {
vnstat_iwarning = 1024000
vnstat_owarning = 1024000
vnstat_icritical = 2048000
vnstat_ocritical = 2048000
}
}
vars.ping = {
"dns-server" = {
ping_address = "10.24.0.2"
ping_name = "dns-over-vpn"
ping_wrta = 150
ping_wpl = 5
ping_crta = 200
ping_cpl = 10
}
}
}
I added the vars.ping to achieve the above described goal. This is the only part I am interested in right now.
Does anyone sees any problem with the config? Because it is not working for me and nothing shows up in icinga2 web.
When I run the check on the hypervisor it works just fine
root@hypervisor /usr/lib/nagios/plugins # sudo -u nagios ./check_ping -H 10.24.0.2 -w 150,5% -c 250,10%
PING OK - Packet loss = 0%, RTA = 24.99 ms|rta=24.985001ms;150.000000;250.000000;0.000000 pl=0%;5;10;0
icinga2 --version (version: r2.10.3-1)
System information:
Platform: Debian GNU/Linux
Platform version: 10 (buster)
Kernel: Linux
Kernel version: 4.19.0-12-amd64
Architecture: x86_64
Thanks!