showlog: Fix statetype filter settings
[nagios-reports-module.git] / nagios / nebstructs.h
blob2773bab64ff786bc4624036792f6ce3e60f25e9d
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
8 * License:
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 *****************************************************************************/
25 #ifndef _NEBSTRUCTS_H
26 #define _NEBSTRUCTS_H
28 #include "config.h"
29 #include "objects.h"
30 #include "nagios.h"
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
36 /****** STRUCTURES *************************/
38 /* process data structure */
39 typedef struct nebstruct_process_struct{
40 int type;
41 int flags;
42 int attr;
43 struct timeval timestamp;
44 }nebstruct_process_data;
47 /* timed event data structure */
48 typedef struct nebstruct_timed_event_struct{
49 int type;
50 int flags;
51 int attr;
52 struct timeval timestamp;
54 int event_type;
55 int recurring;
56 time_t run_time;
57 void *event_data;
59 void *event_ptr;
60 }nebstruct_timed_event_data;
63 /* log data structure */
64 typedef struct nebstruct_log_struct{
65 int type;
66 int flags;
67 int attr;
68 struct timeval timestamp;
70 time_t entry_time;
71 int data_type;
72 char *data;
73 }nebstruct_log_data;
76 /* system command structure */
77 typedef struct nebstruct_system_command_struct{
78 int type;
79 int flags;
80 int attr;
81 struct timeval timestamp;
83 struct timeval start_time;
84 struct timeval end_time;
85 int timeout;
86 char *command_line;
87 int early_timeout;
88 double execution_time;
89 int return_code;
90 char *output;
91 }nebstruct_system_command_data;
94 /* event handler structure */
95 typedef struct nebstruct_event_handler_struct{
96 int type;
97 int flags;
98 int attr;
99 struct timeval timestamp;
101 int eventhandler_type;
102 char *host_name;
103 char *service_description;
104 int state_type;
105 int state;
106 int timeout;
107 char *command_name;
108 char *command_args;
109 char *command_line;
110 struct timeval start_time;
111 struct timeval end_time;
112 int early_timeout;
113 double execution_time;
114 int return_code;
115 char *output;
117 void *object_ptr;
118 }nebstruct_event_handler_data;
121 /* host check structure */
122 typedef struct nebstruct_host_check_struct{
123 int type;
124 int flags;
125 int attr;
126 struct timeval timestamp;
128 char *host_name;
129 int current_attempt;
130 int check_type;
131 int max_attempts;
132 int state_type;
133 int state;
134 int timeout;
135 char *command_name;
136 char *command_args;
137 char *command_line;
138 struct timeval start_time;
139 struct timeval end_time;
140 int early_timeout;
141 double execution_time;
142 double latency;
143 int return_code;
144 char *output;
145 char *long_output;
146 char *perf_data;
148 void *object_ptr;
149 }nebstruct_host_check_data;
152 /* service check structure */
153 typedef struct nebstruct_service_check_struct{
154 int type;
155 int flags;
156 int attr;
157 struct timeval timestamp;
159 char *host_name;
160 char *service_description;
161 int check_type;
162 int current_attempt;
163 int max_attempts;
164 int state_type;
165 int state;
166 int timeout;
167 char *command_name;
168 char *command_args;
169 char *command_line;
170 struct timeval start_time;
171 struct timeval end_time;
172 int early_timeout;
173 double execution_time;
174 double latency;
175 int return_code;
176 char *output;
177 char *long_output;
178 char *perf_data;
180 void *object_ptr;
181 }nebstruct_service_check_data;
184 /* comment data structure */
185 typedef struct nebstruct_comment_struct{
186 int type;
187 int flags;
188 int attr;
189 struct timeval timestamp;
191 int comment_type;
192 char *host_name;
193 char *service_description;
194 time_t entry_time;
195 char *author_name;
196 char *comment_data;
197 int persistent;
198 int source;
199 int entry_type;
200 int expires;
201 time_t expire_time;
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{
210 int type;
211 int flags;
212 int attr;
213 struct timeval timestamp;
215 int downtime_type;
216 char *host_name;
217 char *service_description;
218 time_t entry_time;
219 char *author_name;
220 char *comment_data;
221 time_t start_time;
222 time_t end_time;
223 int fixed;
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{
234 int type;
235 int flags;
236 int attr;
237 struct timeval timestamp;
239 int flapping_type;
240 char *host_name;
241 char *service_description;
242 double percent_change;
243 double high_threshold;
244 double low_threshold;
245 unsigned long comment_id;
247 void *object_ptr;
248 }nebstruct_flapping_data;
251 /* program status structure */
252 typedef struct nebstruct_program_status_struct{
253 int type;
254 int flags;
255 int attr;
256 struct timeval timestamp;
258 time_t program_start;
259 int pid;
260 int daemon_mode;
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{
283 int type;
284 int flags;
285 int attr;
286 struct timeval timestamp;
288 void *object_ptr;
289 }nebstruct_host_status_data;
292 /* service status structure */
293 typedef struct nebstruct_service_status_struct{
294 int type;
295 int flags;
296 int attr;
297 struct timeval timestamp;
299 void *object_ptr;
300 }nebstruct_service_status_data;
303 /* contact status structure */
304 typedef struct nebstruct_contact_status_struct{
305 int type;
306 int flags;
307 int attr;
308 struct timeval timestamp;
310 void *object_ptr;
311 }nebstruct_contact_status_data;
314 /* notification data structure */
315 typedef struct nebstruct_notification_struct{
316 int type;
317 int flags;
318 int attr;
319 struct timeval timestamp;
321 int notification_type;
322 struct timeval start_time;
323 struct timeval end_time;
324 char *host_name;
325 char *service_description;
326 int reason_type;
327 int state;
328 char *output;
329 char *ack_author;
330 char *ack_data;
331 int escalated;
332 int contacts_notified;
334 void *object_ptr;
335 }nebstruct_notification_data;
338 /* contact notification data structure */
339 typedef struct nebstruct_contact_notification_struct{
340 int type;
341 int flags;
342 int attr;
343 struct timeval timestamp;
345 int notification_type;
346 struct timeval start_time;
347 struct timeval end_time;
348 char *host_name;
349 char *service_description;
350 char *contact_name;
351 int reason_type;
352 int state;
353 char *output;
354 char *ack_author;
355 char *ack_data;
356 int escalated;
358 void *object_ptr;
359 void *contact_ptr;
360 }nebstruct_contact_notification_data;
363 /* contact notification method data structure */
364 typedef struct nebstruct_contact_notification_method_struct{
365 int type;
366 int flags;
367 int attr;
368 struct timeval timestamp;
370 int notification_type;
371 struct timeval start_time;
372 struct timeval end_time;
373 char *host_name;
374 char *service_description;
375 char *contact_name;
376 char *command_name;
377 char *command_args;
378 int reason_type;
379 int state;
380 char *output;
381 char *ack_author;
382 char *ack_data;
383 int escalated;
385 void *object_ptr;
386 void *contact_ptr;
387 }nebstruct_contact_notification_method_data;
390 /* adaptive program data structure */
391 typedef struct nebstruct_adaptive_program_data_struct{
392 int type;
393 int flags;
394 int attr;
395 struct timeval timestamp;
397 int command_type;
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{
407 int type;
408 int flags;
409 int attr;
410 struct timeval timestamp;
412 int command_type;
413 unsigned long modified_attribute;
414 unsigned long modified_attributes;
416 void *object_ptr;
417 }nebstruct_adaptive_host_data;
420 /* adaptive service data structure */
421 typedef struct nebstruct_adaptive_service_data_struct{
422 int type;
423 int flags;
424 int attr;
425 struct timeval timestamp;
427 int command_type;
428 unsigned long modified_attribute;
429 unsigned long modified_attributes;
431 void *object_ptr;
432 }nebstruct_adaptive_service_data;
435 /* adaptive contact data structure */
436 typedef struct nebstruct_adaptive_contact_data_struct{
437 int type;
438 int flags;
439 int attr;
440 struct timeval timestamp;
442 int command_type;
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;
450 void *object_ptr;
451 }nebstruct_adaptive_contact_data;
454 /* external command data structure */
455 typedef struct nebstruct_external_command_struct{
456 int type;
457 int flags;
458 int attr;
459 struct timeval timestamp;
461 int command_type;
462 time_t entry_time;
463 char *command_string;
464 char *command_args;
465 }nebstruct_external_command_data;
468 /* aggregated status data structure */
469 typedef struct nebstruct_aggregated_status_struct{
470 int type;
471 int flags;
472 int attr;
473 struct timeval timestamp;
475 }nebstruct_aggregated_status_data;
478 /* retention data structure */
479 typedef struct nebstruct_retention_struct{
480 int type;
481 int flags;
482 int attr;
483 struct timeval timestamp;
485 }nebstruct_retention_data;
488 /* acknowledgement structure */
489 typedef struct nebstruct_acknowledgement_struct{
490 int type;
491 int flags;
492 int attr;
493 struct timeval timestamp;
495 int acknowledgement_type;
496 char *host_name;
497 char *service_description;
498 int state;
499 char *author_name;
500 char *comment_data;
501 int is_sticky;
502 int persistent_comment;
503 int notify_contacts;
505 void *object_ptr;
506 }nebstruct_acknowledgement_data;
509 /* state change structure */
510 typedef struct nebstruct_statechange_struct{
511 int type;
512 int flags;
513 int attr;
514 struct timeval timestamp;
516 int statechange_type;
517 char *host_name;
518 char *service_description;
519 int state;
520 int state_type;
521 int current_attempt;
522 int max_attempts;
523 char *output;
525 void *object_ptr;
526 }nebstruct_statechange_data;
528 #ifdef __cplusplus
530 #endif
532 #endif