Status File Format


Introduction

In order to give external applications (such as the CGIs) access to the current host and service status information in NetSaint, all status information is saved to the file specified by the status_file option in the main config file. External applications can read the contents of this file to determine the current status of any monitored host or service. External applications should not write anything to the status file. NetSaint does not read the status file to determine current service and host information - it is simply provided as a means for third-party apps to access the internal status information in an easy manner.

File Format

The status file contains three types of entries: a program entry, one or more host status entries, and one or more service status entries. The format for each type of entry it described below.

Program Entry Format:

[<timestamp>] PROGRAM;<start_time>;<netsaint_pid>;<daemon_mode>;<program_mode>;<last_mode_change>;<last_command_check>;<last_log_rotation>;<executing_service_checks>;<accept_passive_service_checks>;<enable_event_handlers>;<obsess_over_services>;<enable_flap_detection>

where...

Host Status Format:

[<timestamp>] HOST; <host_name>;<state>;<last_check>;<last_state_change>;<problem_has_been_acknowledged>;<time_up>;<time_down>;<time_unreachable>;<last_notification>;<current_notification_number>;<notifications_enabled>;<event_handler_enabled>;<checks_enabled>;<flap_detection_enabled>;<is_flapping>;<percent_state_change>;<scheduled_downtime_depth>;<plugin_output>

where...

Service Status Format:

[<timestamp>] SERVICE; <host_name>;<svc_description>;<state>;<current_attempt>/<max_attempts>;<state_type>;<last_check><next_check>;<check_type>;<checks_enabled>;<passive_checks_accepted>;<last_state_change>;<problem_has_been_acknowledged>;<last_hard_state>;<time_ok>;<time_unknown>;<time_warning>;<time_critical>;<last_notification>;<current_notification_number>;<notifications_enabled>;<check_latency>;<execution_time>;<flap_detection_enabled>;<is_flapping>;<percent_state_change>;<scheduled_downtime_depth>;<plugin_output>

where...