1 /*****************************************************************************
3 * NEBSTRUCTS.H - Event broker includes for Nagios
5 * Copyright (c) 2003-2007 Ethan Galstad (nagios@nagios.org)
6 * Last Modified: 10-28-2007
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 *****************************************************************************/
36 /****** STRUCTURES *************************/
38 /* process data structure */
39 typedef struct nebstruct_process_struct
{
43 struct timeval timestamp
;
44 }nebstruct_process_data
;
47 /* timed event data structure */
48 typedef struct nebstruct_timed_event_struct
{
52 struct timeval timestamp
;
60 }nebstruct_timed_event_data
;
63 /* log data structure */
64 typedef struct nebstruct_log_struct
{
68 struct timeval timestamp
;
76 /* system command structure */
77 typedef struct nebstruct_system_command_struct
{
81 struct timeval timestamp
;
83 struct timeval start_time
;
84 struct timeval end_time
;
88 double execution_time
;
91 }nebstruct_system_command_data
;
94 /* event handler structure */
95 typedef struct nebstruct_event_handler_struct
{
99 struct timeval timestamp
;
101 int eventhandler_type
;
103 char *service_description
;
110 struct timeval start_time
;
111 struct timeval end_time
;
113 double execution_time
;
118 }nebstruct_event_handler_data
;
121 /* host check structure */
122 typedef struct nebstruct_host_check_struct
{
126 struct timeval timestamp
;
138 struct timeval start_time
;
139 struct timeval end_time
;
141 double execution_time
;
149 }nebstruct_host_check_data
;
152 /* service check structure */
153 typedef struct nebstruct_service_check_struct
{
157 struct timeval timestamp
;
160 char *service_description
;
170 struct timeval start_time
;
171 struct timeval end_time
;
173 double execution_time
;
181 }nebstruct_service_check_data
;
184 /* comment data structure */
185 typedef struct nebstruct_comment_struct
{
189 struct timeval timestamp
;
193 char *service_description
;
202 unsigned long comment_id
;
204 void *object_ptr
; /* not implemented yet */
205 }nebstruct_comment_data
;
208 /* downtime data structure */
209 typedef struct nebstruct_downtime_struct
{
213 struct timeval timestamp
;
217 char *service_description
;
224 unsigned long duration
;
225 unsigned long triggered_by
;
226 unsigned long downtime_id
;
228 void *object_ptr
; /* not implemented yet */
229 }nebstruct_downtime_data
;
232 /* flapping data structure */
233 typedef struct nebstruct_flapping_struct
{
237 struct timeval timestamp
;
241 char *service_description
;
242 double percent_change
;
243 double high_threshold
;
244 double low_threshold
;
245 unsigned long comment_id
;
248 }nebstruct_flapping_data
;
251 /* program status structure */
252 typedef struct nebstruct_program_status_struct
{
256 struct timeval timestamp
;
258 time_t program_start
;
261 time_t last_command_check
;
262 time_t last_log_rotation
;
263 int notifications_enabled
;
264 int active_service_checks_enabled
;
265 int passive_service_checks_enabled
;
266 int active_host_checks_enabled
;
267 int passive_host_checks_enabled
;
268 int event_handlers_enabled
;
269 int flap_detection_enabled
;
270 int failure_prediction_enabled
;
271 int process_performance_data
;
272 int obsess_over_hosts
;
273 int obsess_over_services
;
274 unsigned long modified_host_attributes
;
275 unsigned long modified_service_attributes
;
276 char *global_host_event_handler
;
277 char *global_service_event_handler
;
278 }nebstruct_program_status_data
;
281 /* host status structure */
282 typedef struct nebstruct_host_status_struct
{
286 struct timeval timestamp
;
289 }nebstruct_host_status_data
;
292 /* service status structure */
293 typedef struct nebstruct_service_status_struct
{
297 struct timeval timestamp
;
300 }nebstruct_service_status_data
;
303 /* contact status structure */
304 typedef struct nebstruct_contact_status_struct
{
308 struct timeval timestamp
;
311 }nebstruct_contact_status_data
;
314 /* notification data structure */
315 typedef struct nebstruct_notification_struct
{
319 struct timeval timestamp
;
321 int notification_type
;
322 struct timeval start_time
;
323 struct timeval end_time
;
325 char *service_description
;
332 int contacts_notified
;
335 }nebstruct_notification_data
;
338 /* contact notification data structure */
339 typedef struct nebstruct_contact_notification_struct
{
343 struct timeval timestamp
;
345 int notification_type
;
346 struct timeval start_time
;
347 struct timeval end_time
;
349 char *service_description
;
360 }nebstruct_contact_notification_data
;
363 /* contact notification method data structure */
364 typedef struct nebstruct_contact_notification_method_struct
{
368 struct timeval timestamp
;
370 int notification_type
;
371 struct timeval start_time
;
372 struct timeval end_time
;
374 char *service_description
;
387 }nebstruct_contact_notification_method_data
;
390 /* adaptive program data structure */
391 typedef struct nebstruct_adaptive_program_data_struct
{
395 struct timeval timestamp
;
398 unsigned long modified_host_attribute
;
399 unsigned long modified_host_attributes
;
400 unsigned long modified_service_attribute
;
401 unsigned long modified_service_attributes
;
402 }nebstruct_adaptive_program_data
;
405 /* adaptive host data structure */
406 typedef struct nebstruct_adaptive_host_data_struct
{
410 struct timeval timestamp
;
413 unsigned long modified_attribute
;
414 unsigned long modified_attributes
;
417 }nebstruct_adaptive_host_data
;
420 /* adaptive service data structure */
421 typedef struct nebstruct_adaptive_service_data_struct
{
425 struct timeval timestamp
;
428 unsigned long modified_attribute
;
429 unsigned long modified_attributes
;
432 }nebstruct_adaptive_service_data
;
435 /* adaptive contact data structure */
436 typedef struct nebstruct_adaptive_contact_data_struct
{
440 struct timeval timestamp
;
443 unsigned long modified_attribute
;
444 unsigned long modified_attributes
;
445 unsigned long modified_host_attribute
;
446 unsigned long modified_host_attributes
;
447 unsigned long modified_service_attribute
;
448 unsigned long modified_service_attributes
;
451 }nebstruct_adaptive_contact_data
;
454 /* external command data structure */
455 typedef struct nebstruct_external_command_struct
{
459 struct timeval timestamp
;
463 char *command_string
;
465 }nebstruct_external_command_data
;
468 /* aggregated status data structure */
469 typedef struct nebstruct_aggregated_status_struct
{
473 struct timeval timestamp
;
475 }nebstruct_aggregated_status_data
;
478 /* retention data structure */
479 typedef struct nebstruct_retention_struct
{
483 struct timeval timestamp
;
485 }nebstruct_retention_data
;
488 /* acknowledgement structure */
489 typedef struct nebstruct_acknowledgement_struct
{
493 struct timeval timestamp
;
495 int acknowledgement_type
;
497 char *service_description
;
502 int persistent_comment
;
506 }nebstruct_acknowledgement_data
;
509 /* state change structure */
510 typedef struct nebstruct_statechange_struct
{
514 struct timeval timestamp
;
516 int statechange_type
;
518 char *service_description
;
526 }nebstruct_statechange_data
;