naemon / naemon-core

Networks, Applications and Event Monitor
http://www.naemon.io/
GNU General Public License v2.0
151 stars 63 forks source link

initialize hosts last_state_change and last_hard_state_change #453

Closed sni closed 6 months ago

sni commented 6 months ago

Currently the hosts last_state_change and last_hard_state_change will only be initialized if the state changes or in check_service.c when the first service result arives. I see no reason why this shouldn't be done for host results as well.

sni commented 6 months ago

Just for reference: https://github.com/naemon/naemon-core/blob/master/src/naemon/checks_service.c#L667 The timestamp will be initialized here when the first service result arrives. But this obviously only works if the host has services.