260 |
} *Checksum_T; |
} *Checksum_T; |
261 |
|
|
262 |
|
|
263 |
|
/** Defines an alert object */ |
264 |
|
typedef struct myalert { |
265 |
|
int alert_on_timeout; /**< If TRUE, alert user when service timeout */ |
266 |
|
int alert_on_restart; /**< If TRUE, alert user when the service restarts */ |
267 |
|
int alert_on_checksum; /**< If TRUE, alert user when the checksum fail */ |
268 |
|
int alert_on_resource; /**< If TRUE, alert user when resources exceed */ |
269 |
|
int alert_on_stop; /**< If TRUE, alert user when service stopped */ |
270 |
|
int alert_on_timestamp; /**< If TRUE, alert user when the timestamp fail */ |
271 |
|
} Alert_T; |
272 |
|
|
273 |
|
|
274 |
/** Defines a mailinglist object */ |
/** Defines a mailinglist object */ |
275 |
typedef struct mymail { |
typedef struct mymail { |
276 |
char *to; /**< Mail address for alert notification */ |
char *to; /**< Mail address for alert notification */ |
278 |
char *subject; /**< The mail subject */ |
char *subject; /**< The mail subject */ |
279 |
char *message; /**< The mail message */ |
char *message; /**< The mail message */ |
280 |
char *opt_message; /**< An optional message used in alerts */ |
char *opt_message; /**< An optional message used in alerts */ |
281 |
int alert_on_timeout; /**< If TRUE, alert user when service timeout */ |
Alert_T alerts; /*< Alert events for which this mail object should be sent */ |
|
int alert_on_restart; /**< If TRUE, alert user when the service restarts */ |
|
|
int alert_on_checksum; /**< If TRUE, alert user when the checksum fail */ |
|
|
int alert_on_resource; /**< If TRUE, alert user when resources exceed */ |
|
|
int alert_on_stop; /**< If TRUE, alert user when service stopped */ |
|
|
int alert_on_timestamp; /**< If TRUE, alert user when the timestamp fail */ |
|
282 |
|
|
283 |
/** For internal use */ |
/** For internal use */ |
284 |
struct mymail *next; /**< next recipient in chain */ |
struct mymail *next; /**< next recipient in chain */ |
294 |
int max_cycle; /**< Cycle overrun limit */ |
int max_cycle; /**< Cycle overrun limit */ |
295 |
int action; /**< Action in case of failure */ |
int action; /**< Action in case of failure */ |
296 |
|
|
297 |
struct myresource *next; |
/** For internal use */ |
298 |
|
struct myresource *next; /**< next resource in chain */ |
299 |
} *Resource_T; |
} *Resource_T; |
300 |
|
|
301 |
|
|
306 |
int time; /**< Timestamp watermark */ |
int time; /**< Timestamp watermark */ |
307 |
int action; /**< Action in case of failure */ |
int action; /**< Action in case of failure */ |
308 |
|
|
309 |
struct mytimestamp *next; |
/** For internal use */ |
310 |
|
struct mytimestamp *next; /**< next timestamp in chain */ |
311 |
} *Timestamp_T; |
} *Timestamp_T; |
312 |
|
|
313 |
|
|
319 |
long mem_kbyte; |
long mem_kbyte; |
320 |
int mem_percent; /**< pecentage * 10 */ |
int mem_percent; /**< pecentage * 10 */ |
321 |
int cpu_percent; /**< pecentage * 10 */ |
int cpu_percent; /**< pecentage * 10 */ |
|
|
|
322 |
int children; |
int children; |
323 |
long total_mem_kbyte; |
long total_mem_kbyte; |
324 |
int total_mem_percent; /**< pecentage * 10 */ |
int total_mem_percent; /**< pecentage * 10 */ |
348 |
} *Command_T; |
} *Command_T; |
349 |
|
|
350 |
|
|
351 |
|
/** Defines an alien program to be execute upon alert or upon an action. */ |
352 |
|
typedef struct myexec { |
353 |
|
Alert_T alerts; /**< Alert events triggering this program to be executed */ |
354 |
|
Command_T program; /**< The external program to call */ |
355 |
|
|
356 |
|
/** For internal use */ |
357 |
|
struct myexec *next; /**< next external program in chain */ |
358 |
|
} *Exec_T; |
359 |
|
|
360 |
|
|
361 |
/** Defines filesystem device data */ |
/** Defines filesystem device data */ |
362 |
typedef struct mydeviceinfo { |
typedef struct mydeviceinfo { |
363 |
long f_bsize; /**< Transfer block size */ |
long f_bsize; /**< Transfer block size */ |
377 |
int limit_percent; /**< Watermark - percent */ |
int limit_percent; /**< Watermark - percent */ |
378 |
int action; /**< Action in case of failure */ |
int action; /**< Action in case of failure */ |
379 |
|
|
380 |
struct mydevice *next; |
/** For internal use */ |
381 |
|
struct mydevice *next; /**< next device in chain */ |
382 |
} *Device_T; |
} *Device_T; |
383 |
|
|
384 |
|
|
417 |
Dependant_T dependantlist; /**<Dependant service list */ |
Dependant_T dependantlist; /**<Dependant service list */ |
418 |
Timestamp_T timestamplist; /**< Timestamp check list */ |
Timestamp_T timestamplist; /**< Timestamp check list */ |
419 |
Device_T devicelist; /**< Device check list */ |
Device_T devicelist; /**< Device check list */ |
420 |
|
Exec_T execlist; /**< External programs to call upon an alert or action */ |
421 |
|
|
422 |
/** Runtime parameters */ |
/** Runtime parameters */ |
423 |
DeviceInfo_T devinfo; /**< Data for the device check */ |
DeviceInfo_T devinfo; /**< Data for the device check */ |
424 |
ProcInfo_T procinfo; /**< Data for the procfs check */ |
ProcInfo_T procinfo; /**< Data for the procfs check */ |
443 |
long mem_kbyte_sum; |
long mem_kbyte_sum; |
444 |
int children_sum; |
int children_sum; |
445 |
|
|
446 |
|
/** For internal use */ |
447 |
struct myprocesstree ** children; |
struct myprocesstree ** children; |
448 |
struct myprocesstree * parent; |
struct myprocesstree * parent; |
449 |
} ProcessTree_T; |
} ProcessTree_T; |