--- /dev/null
+Compat Livestatus Component Query Tests
+=======================================
+
+Collection of queries used for execution
+on the livestatus socket.
+
+
+$ ./run_queries host/services
+
+or
+
+$ ./run_queries
--- /dev/null
+GET comments
+ResponseHeader: fixed16
+
--- /dev/null
+GET contacts
+ResponseHeader: fixed16
+
--- /dev/null
+GET contactgroups
+ResponseHeader: fixed16
+
--- /dev/null
+GET downtimes
+ResponseHeader: fixed16
+
--- /dev/null
+GET hosts
+Columns: check_command check_command_expanded
+ResponseHeader: fixed16
+
--- /dev/null
+GET hosts
+Columns: comments comments_with_info comments_with_extra_info
+ResponseHeader: fixed16
+
--- /dev/null
+GET hosts
+Columns: contacts contact_groups
+ResponseHeader: fixed16
+
--- /dev/null
+GET hosts
+Columns: custom_variable_names custom_variable_values custom_variables
+ResponseHeader: fixed16
+
--- /dev/null
+GET hosts
+Columns: downtimes downtimes_with_info
+ResponseHeader: fixed16
+
--- /dev/null
+GET hosts
+Columns: name address notes notes_expanded notes_url notes_url_expanded action_url action_url_expanded icon_image icon_image_expanded icon_image_alt x_2d y_2d
+ResponseHeader: fixed16
+
--- /dev/null
+GET hostgroups
+ResponseHeader: fixed16
+
--- /dev/null
+GET hosts
+Columns: name parents childs
+ResponseHeader: fixed16
+
--- /dev/null
+GET hosts
+Columns: name current_notification_number notification_period notification_interval notifications_enabled no_more_notifications last_notification next_notification
+ResponseHeader: fixed16
+
--- /dev/null
+GET hosts
+Columns: name num_services worst_service_state num_services_ok num_services_warn num_services_crit num_services_unknown num_services_pending worst_service_hard_state num_services_hard_ok num_services_hard_warn num_services_hard_crit num_services_hard_unknown services services_with_state services_with_info
+ResponseHeader: fixed16
+
--- /dev/null
+GET hosts
+Columns: name last_state_change last_hard_state_change last_time_up last_time_down last_time_unreachable staleness
+ResponseHeader: fixed16
+
--- /dev/null
+GET hosts
+ResponseHeader: fixed16
+Stats: latency = 3
+Stats: sum latency
+
--- /dev/null
+GET services
+Columns: check_command check_command_expanded
+ResponseHeader: fixed16
+
--- /dev/null
+GET services
+Columns: comments comments_with_info comments_with_extra_info
+ResponseHeader: fixed16
+
--- /dev/null
+GET services
+Columns: contacts contact_groups
+ResponseHeader: fixed16
+
--- /dev/null
+GET services
+Columns: custom_variable_names custom_variable_values custom_variables
+ResponseHeader: fixed16
+
--- /dev/null
+GET services
+Columns: downtimes downtimes_with_info
+ResponseHeader: fixed16
+
--- /dev/null
+GET services
+Columns: description host_name host_address notes notes_expanded notes_url notes_url_expanded action_url action_url_expanded icon_image icon_image_expanded icon_image_alt
+ResponseHeader: fixed16
+
--- /dev/null
+GET servicegroups
+ResponseHeader: fixed16
+
--- /dev/null
+GET services
+Columns: description current_notification_number notification_period notification_interval notifications_enabled no_more_notifications last_notification next_notification
+ResponseHeader: fixed16
+
--- /dev/null
+GET services
+ResponseHeader: fixed16
+
--- /dev/null
+GET services
+Columns: description host_name last_state_change last_hard_state_change last_time_ok last_time_warning last_time_critical last_time_unknown staleness
+ResponseHeader: fixed16
+
--- /dev/null
+GET services
+Separators: 10 32 35 95
+Columns: description custom_variables
+ResponseHeader: fixed16
+
--- /dev/null
+GET status
+Columns: connections connections_rate external_commands external_commands_rate livestatus_active_connections
+ResponseHeader: fixed16
+
--- /dev/null
+GET status
+Columns: nagios_pid program_start num_hosts num_services program_version
+ResponseHeader: fixed16
+
--- /dev/null
+GET status
+ResponseHeader: fixed16
+
--- /dev/null
+GET timeperiods
+ResponseHeader: fixed16
+
--- /dev/null
+#!/bin/bash
+
+LIVESTATUSHOST="10.0.10.18"
+LIVESTATUSPORT="6558"
+LIVESTATUSQUERIES="./queries"
+
+LIVESTATUSTABLE=$1
+
+if [ -n "$LIVESTATUSTABLE" ]; then
+ cat "$LIVESTATUSQUERIES/$LIVESTATUSTABLE"
+ (cat "$LIVESTATUSQUERIES/$LIVESTATUSTABLE"; sleep 1) | netcat $LIVESTATUSHOST $LIVESTATUSPORT
+else
+
+ echo -e "Looking into $LIVESTATUSQUERIES\n"
+ for q in $(find $LIVESTATUSQUERIES -type f)
+ do
+ cat $q
+ (cat $q; sleep 1) | netcat $LIVESTATUSHOST $LIVESTATUSPORT
+ echo -e "================================\n\n"
+ done
+fi