Monitor Chrony

Hi,

how do you add chrony (NTP) to be monitored in Icinga2 WEB GUI?

I tried adding in services.conf chrony and chronyd:

apply Service “chronyd” {
import “generic-service”

check_command = “chronyd”

assign where host.name == NodeName
}

But it just seems wrong, and doesn’t want to restart the icinga2.service then.

“Job for icinga2.service failed because the control process exited with error code. See “systemctl status icinga2.service” and “journalctl -xe” for details.”

nov. 03 10:09:41 %server% systemd[1]: Failed to start Icinga host/service/network monitoring system.

Any ideas?

When I try:

apply Service “ntp_time” {
import “generic-service”

check_command = “ntp_time”

assign where host.name == NodeName
}

I get it showing in the WEB GUI, but with error:

CRITICAL: No response from NTP server

In chrony.conf i added allow IP on 127.0.0.1 and the NTP server + the NTP servers giving the time like 3.europe.pool.ntp.org.

I tried adding in services.conf chrony and chronyd:

apply Service “chronyd” {
import “generic-service”

check_command = “chronyd”

assign where host.name == NodeName
}

Hii @Networkmagne, here you use a CheckCommand named chronyd, did you define the CheckCommand somewhere?

When I try:

apply Service “ntp_time” {
import “generic-service”

check_command = “ntp_time”

assign where host.name == NodeName
}

Here as well? If yes, please post the CheckCommand configuration here as well?

Hi, I managed to fix it earlier by adding all the NTP servers from 0.europe.pool.ntp.org until 3.europe.pool.ntp.org.

Restartet icinga2 and BOOM it worked. :smiley:

Wasn’t able to close the case ealier, got a 505 error notification.

Thanks anyway @yhabteab for replying.