NagiosEnterprises / nagioscore

Nagios Core
GNU General Public License v2.0
1.48k stars 440 forks source link

The behavior for last_state_change date between host and service is different #891

Closed klnjmm closed 1 year ago

klnjmm commented 1 year ago

Hi,

I have a different behavior between the value of last_state_change date between host and service when having retry (soft and hard state)

Environment : Ubuntu 20.04

Nagios 4.2.3

Nagios 4.4.3

This change has fixed this bug for service :

But the value for host has changed : it's now the date at the first try ...

host-nagios-4 4 3-01 host-nagios-4 4 3-04

Nagios 4.4.9

Same behavior than nagios 4.4.3

host-nagios-4 4 9-01 host-nagios-4 4 9-03

Expected behavior :

The value of last_state_change is the value of the last try, when passing in hard state, for host and for service.

Do you encounter the same problem ?

sawolf commented 1 year ago

Hi Jim - thanks for reaching out. I haven't gotten into this one yet but the information you've given is clear. I'll commit to at least looking into this for 4.4.11.

sawolf commented 1 year ago

Fixed in https://github.com/NagiosEnterprises/nagioscore/commit/ade7c47207130926cb4d120bd604eced2b59fc6a

I wasn't able to find the change that made host state changes regress, but based on the discussion around #592 it seems like people expect "Last State Change" to reflect changes from SOFT to HARD state.