@@ -1216,13 +1216,19 @@ $Thruk::Backend::Provider::Livestatus::stats_columns->{'host_stats'} = [
12161216 ' down_and_disabled_active' => { -isa => { -and => [ ' state' => 1, ' check_type' => 0, ' active_checks_enabled' => 0 ]}},
12171217 ' down_and_disabled_passive' => { -isa => { -and => [ ' state' => 1, ' check_type' => 1, ' active_checks_enabled' => 0 ]}},
12181218 ' down_and_unhandled' => { -isa => { -and => [ ' state' => 1, ' active_checks_enabled' => 1, ' acknowledged' => 0, ' scheduled_downtime_depth' => 0 ]}},
1219+ ' down_soft' => { -isa => { -and => [ ' state' => 1, ' state_type' => 0 ]}},
1220+ ' down_hard' => { -isa => { -and => [ ' state' => 1, ' state_type' => 1 ]}},
1221+ ' down_hard_unhandled' => { -isa => { -and => [ ' state' => 1, ' state_type' => 1, ' active_checks_enabled' => 1, ' acknowledged' => 0, ' scheduled_downtime_depth' => 0 ]}},
12191222 ' unreachable' => { -isa => { -and => [ ' state' => 2 ]}},
12201223 ' plain_unreachable' => { -isa => { -and => [ ' state' => 2, ' scheduled_downtime_depth' => 0, ' acknowledged' => 0 ]}},
12211224 ' unreachable_and_ack' => { -isa => { -and => [ ' state' => 2, ' acknowledged' => 1 ]}},
12221225 ' unreachable_and_scheduled' => { -isa => { -and => [ ' state' => 2, ' scheduled_downtime_depth' => { ' >' => 0 } ]}},
12231226 ' unreachable_and_disabled_active' => { -isa => { -and => [ ' state' => 2, ' check_type' => 0, ' active_checks_enabled' => 0 ]}},
12241227 ' unreachable_and_disabled_passive' => { -isa => { -and => [ ' state' => 2, ' check_type' => 1, ' active_checks_enabled' => 0 ]}},
12251228 ' unreachable_and_unhandled' => { -isa => { -and => [ ' state' => 2, ' active_checks_enabled' => 1, ' acknowledged' => 0, ' scheduled_downtime_depth' => 0 ]}},
1229+ ' unreachable_soft' => { -isa => { -and => [ ' state' => 2, ' state_type' => 0 ]}},
1230+ ' unreachable_hard' => { -isa => { -and => [ ' state' => 2, ' state_type' => 1 ]}},
1231+ ' unreachable_hard_unhandled' => { -isa => { -and => [ ' state' => 2, ' state_type' => 1, ' active_checks_enabled' => 1, ' acknowledged' => 0, ' scheduled_downtime_depth' => 0 ]}},
12261232 ' flapping' => { -isa => { -and => [ ' is_flapping' => 1 ]}},
12271233 ' flapping_disabled' => { -isa => { -and => [ ' flap_detection_enabled' => 0 ]}},
12281234 ' notifications_disabled' => { -isa => { -and => [ ' notifications_enabled' => 0 ]}},
@@ -1231,6 +1237,8 @@ $Thruk::Backend::Provider::Livestatus::stats_columns->{'host_stats'} = [
12311237 ' active_checks_disabled_passive' => { -isa => { -and => [ ' check_type' => 1, ' active_checks_enabled' => 0 ]}},
12321238 ' passive_checks_disabled' => { -isa => { -and => [ ' accept_passive_checks' => 0 ]}},
12331239 ' outages' => { -isa => { -and => [ ' state' => 1, ' childs' => {' !=' => undef } ]}},
1240+ ' soft' => { -isa => { -and => [ ' state_type' => 0 ]}},
1241+ ' hard' => { -isa => { -and => [ ' state_type' => 1 ]}},
12341242];
12351243sub get_host_stats {
12361244 my ($self , %options ) = @_ ;
@@ -1436,6 +1444,9 @@ $Thruk::Backend::Provider::Livestatus::stats_columns->{'service_stats'} = [
14361444 ' warning_and_ack' => { -isa => { -and => [ ' state' => 1, ' acknowledged' => 1 ]}},
14371445 ' warning_on_down_host' => { -isa => { -and => [ ' state' => 1, ' host_state' => { ' !=' => 0 } ]}},
14381446 ' warning_and_unhandled' => { -isa => { -and => [ ' state' => 1, ' acknowledged' => 0, ' scheduled_downtime_depth' => 0, ' host_state' => 0, ' host_acknowledged' => 0, ' host_scheduled_downtime_depth' => 0 ]}},
1447+ ' warning_soft' => { -isa => { -and => [ ' state' => 1, ' state_type' => 0 ]}},
1448+ ' warning_hard' => { -isa => { -and => [ ' state' => 1, ' state_type' => 1 ]}},
1449+ ' warning_hard_unhandled' => { -isa => { -and => [ ' state' => 1, ' state_type' => 1, ' acknowledged' => 0, ' scheduled_downtime_depth' => 0, ' host_state' => 0, ' host_acknowledged' => 0, ' host_scheduled_downtime_depth' => 0 ]}},
14391450 ' critical' => { -isa => { -and => [ ' state' => 2 ]}},
14401451 ' plain_critical' => { -isa => { -and => [ ' state' => 2, ' scheduled_downtime_depth' => 0, ' acknowledged' => 0 ]}},
14411452 ' critical_and_scheduled' => { -isa => { -and => [ ' state' => 2, ' scheduled_downtime_depth' => { ' >' => 0 } ]}},
@@ -1444,6 +1455,9 @@ $Thruk::Backend::Provider::Livestatus::stats_columns->{'service_stats'} = [
14441455 ' critical_and_ack' => { -isa => { -and => [ ' state' => 2, ' acknowledged' => 1 ]}},
14451456 ' critical_on_down_host' => { -isa => { -and => [ ' state' => 2, ' host_state' => { ' !=' => 0 } ]}},
14461457 ' critical_and_unhandled' => { -isa => { -and => [ ' state' => 2, ' acknowledged' => 0, ' scheduled_downtime_depth' => 0, ' host_state' => 0, ' host_acknowledged' => 0, ' host_scheduled_downtime_depth' => 0 ]}},
1458+ ' critical_soft' => { -isa => { -and => [ ' state' => 2, ' state_type' => 0 ]}},
1459+ ' critical_hard' => { -isa => { -and => [ ' state' => 2, ' state_type' => 1 ]}},
1460+ ' critical_hard_unhandled' => { -isa => { -and => [ ' state' => 2, ' state_type' => 1, ' acknowledged' => 0, ' scheduled_downtime_depth' => 0, ' host_state' => 0, ' host_acknowledged' => 0, ' host_scheduled_downtime_depth' => 0 ]}},
14471461 ' unknown' => { -isa => { -and => [ ' state' => 3 ]}},
14481462 ' plain_unknown' => { -isa => { -and => [ ' state' => 3, ' scheduled_downtime_depth' => 0, ' acknowledged' => 0 ]}},
14491463 ' unknown_and_scheduled' => { -isa => { -and => [ ' state' => 3, ' scheduled_downtime_depth' => { ' >' => 0 } ]}},
@@ -1452,11 +1466,16 @@ $Thruk::Backend::Provider::Livestatus::stats_columns->{'service_stats'} = [
14521466 ' unknown_and_ack' => { -isa => { -and => [ ' state' => 3, ' acknowledged' => 1 ]}},
14531467 ' unknown_on_down_host' => { -isa => { -and => [ ' state' => 3, ' host_state' => { ' !=' => 0 } ]}},
14541468 ' unknown_and_unhandled' => { -isa => { -and => [ ' state' => 3, ' acknowledged' => 0, ' scheduled_downtime_depth' => 0, ' host_state' => 0, ' host_acknowledged' => 0, ' host_scheduled_downtime_depth' => 0 ]}},
1469+ ' unknown_soft' => { -isa => { -and => [ ' state' => 3, ' state_type' => 0 ]}},
1470+ ' unknown_hard' => { -isa => { -and => [ ' state' => 3, ' state_type' => 1 ]}},
1471+ ' unknown_hard_unhandled' => { -isa => { -and => [ ' state' => 3, ' state_type' => 1, ' acknowledged' => 0, ' scheduled_downtime_depth' => 0, ' host_state' => 0, ' host_acknowledged' => 0, ' host_scheduled_downtime_depth' => 0 ]}},
14551472 ' flapping' => { -isa => { -and => [ ' is_flapping' => 1 ]}},
14561473 ' flapping_disabled' => { -isa => { -and => [ ' flap_detection_enabled' => 0 ]}},
14571474 ' notifications_disabled' => { -isa => { -and => [ ' notifications_enabled' => 0 ]}},
14581475 ' eventhandler_disabled' => { -isa => { -and => [ ' event_handler_enabled' => 0 ]}},
14591476 ' passive_checks_disabled' => { -isa => { -and => [ ' accept_passive_checks' => 0 ]}},
1477+ ' soft' => { -isa => { -and => [ ' state_type' => 0 ]}},
1478+ ' hard' => { -isa => { -and => [ ' state_type' => 1 ]}},
14601479];
14611480sub get_service_stats {
14621481 my ($self , %options ) = @_ ;
0 commit comments