Skip to content

Differenate pending service checks from ok #11

@wbollock

Description

@wbollock

Currently, pending service checks are reported in the same manner as ok checks. Offhand, this is probably because current_state is 0 for both.

The servicestatus API endpoint seemingly has no way to differentiate these.

    # PASSIVE, OK
    {
        "host_name": "redacted",
        "service_description": "redacted",
        "display_name": "redacted",
        "host_object_id": "1771",
        "host_address": "redacted",
        "host_alias": "redacted",
        "icon_image": "",
        "icon_image_alt": "",
        "notes": "",
        "notes_url": "",
        "action_url": "",
        "servicestatus_id": "1143",
        "instance_id": "1",
        "service_object_id": "3009",
        "status_update_time": "2022-09-13 09:43:30",
        "output": "",
        "long_output": "",
        "perfdata": "",
        "current_state": "0",
        "has_been_checked": "0",
        "should_be_scheduled": "0",
        "current_check_attempt": "1",
        "max_check_attempts": "2",
        "last_check": "1969-12-31 19:00:00",
        "next_check": "1969-12-31 19:00:00",
        "check_type": "0",
        "check_options": "0",
        "last_state_change": "1969-12-31 19:00:00",
        "last_hard_state_change": "1969-12-31 19:00:00",
        "last_hard_state": "0",
        "last_time_ok": "1969-12-31 19:00:00",
        "last_time_warning": "1969-12-31 19:00:00",
        "last_time_unknown": "1969-12-31 19:00:00",
        "last_time_critical": "1969-12-31 19:00:00",
        "state_type": "1",
        "last_notification": "1969-12-31 19:00:00",
        "next_notification": "1969-12-31 19:00:00",
        "no_more_notifications": "0",
        "notifications_enabled": "1",
        "problem_has_been_acknowledged": "0",
        "acknowledgement_type": "0",
        "current_notification_number": "0",
        "passive_checks_enabled": "1",
        "active_checks_enabled": "0",
        "event_handler_enabled": "1",
        "flap_detection_enabled": "1",
        "is_flapping": "0",
        "percent_state_change": "0",
        "latency": "0",
        "execution_time": "0",
        "scheduled_downtime_depth": "0",
        "failure_prediction_enabled": "0",
        "process_performance_data": "1",
        "obsess_over_service": "0",
        "modified_service_attributes": "0",
        "event_handler": "",
        "check_command": "stale_check",
        "normal_check_interval": "5",
        "retry_check_interval": "1",
        "check_timeperiod_object_id": "246"
    }


    # PASSIVE, PENDING
    {
        "host_name": "redacted",
        "service_description": "redacted",
        "display_name": "redacted",
        "host_object_id": "77254",
        "host_address": "127.0.0.1",
        "host_alias": "127.0.0.1",
        "icon_image": "",
        "icon_image_alt": "",
        "notes": "",
        "notes_url": "",
        "action_url": "",
        "servicestatus_id": "67477",
        "instance_id": "1",
        "service_object_id": "77363",
        "status_update_time": "2022-09-13 09:43:30",
        "output": "",
        "long_output": "",
        "perfdata": "",
        "current_state": "0",
        "has_been_checked": "0",
        "should_be_scheduled": "0",
        "current_check_attempt": "1",
        "max_check_attempts": "1",
        "last_check": "1969-12-31 19:00:00",
        "next_check": "1969-12-31 19:00:00",
        "check_type": "0",
        "check_options": "0",
        "last_state_change": "1969-12-31 19:00:00",
        "last_hard_state_change": "1969-12-31 19:00:00",
        "last_hard_state": "0",
        "last_time_ok": "1969-12-31 19:00:00",
        "last_time_warning": "1969-12-31 19:00:00",
        "last_time_unknown": "1969-12-31 19:00:00",
        "last_time_critical": "1969-12-31 19:00:00",
        "state_type": "1",
        "last_notification": "1969-12-31 19:00:00",
        "next_notification": "1969-12-31 19:00:00",
        "no_more_notifications": "0",
        "notifications_enabled": "1",
        "problem_has_been_acknowledged": "0",
        "acknowledgement_type": "0",
        "current_notification_number": "0",
        "passive_checks_enabled": "1",
        "active_checks_enabled": "0",
        "event_handler_enabled": "1",
        "flap_detection_enabled": "1",
        "is_flapping": "0",
        "percent_state_change": "0",
        "latency": "0",
        "execution_time": "0",
        "scheduled_downtime_depth": "0",
        "failure_prediction_enabled": "0",
        "process_performance_data": "1",
        "obsess_over_service": "0",
        "modified_service_attributes": "0",
        "event_handler": "",
        "check_command": "stale_check",
        "normal_check_interval": "60",
        "retry_check_interval": "1",
        "check_timeperiod_object_id": "246"
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions