/[monit]/monit/monitor.h
ViewVC logotype

Diff of /monit/monitor.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.64 by hauk, Thu Jun 26 14:24:11 2003 UTC revision 1.65 by hauk, Wed Jul 2 19:26:53 2003 UTC
# Line 144  Sigfunc *signal(int signo, Sigfunc * fun Line 144  Sigfunc *signal(int signo, Sigfunc * fun
144  /** ----------------------------------------------- Object Constructor macro */  /** ----------------------------------------------- Object Constructor macro */
145    
146    
147  #define NEW(p) (xcalloc(1, (long)sizeof *(p)))  #define NEW(p) ((p)= xcalloc(1, (long)sizeof *(p)))
148    
149    
150  /** ------------------------------------------ Simple Assert Exception macro */  /** ------------------------------------------ Simple Assert Exception macro */
# Line 260  typedef struct mychecksum { Line 260  typedef struct mychecksum {
260  } *Checksum_T;  } *Checksum_T;
261    
262    
 /** Defines an alert object */  
 typedef struct myalert {  
   int  alert_on_timeout;       /**< If TRUE, alert user when service timeout */  
   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 */  
 } Alert_T;  
   
   
263  /** Defines a mailinglist object */  /** Defines a mailinglist object */
264  typedef struct mymail {  typedef struct mymail {
265    char *to;                         /**< Mail address for alert notification */    char *to;                         /**< Mail address for alert notification */
266    char *from;                                     /**< The mail from address */    char *from;                                     /**< The mail from address */
267    char *subject;                                       /**< The mail subject */    char *subject;                                       /**< The mail subject */
268    char *message;                                       /**< The mail message */    char *message;                                       /**< The mail message */
269    char *opt_message;                 /**< An optional message used in alerts */    const char *opt_message;           /**< An optional message used in alerts */
270    Alert_T alerts; /*< Alert events for which this mail object should be sent */    unsigned int events;  /*< Events for which this mail object should be sent */
271    
272    /** For internal use */    /** For internal use */
273    struct mymail *next;                          /**< next recipient in chain */    struct mymail *next;                          /**< next recipient in chain */
# Line 350  typedef struct mycommand { Line 339  typedef struct mycommand {
339    
340  /** Defines an alien program to be execute upon alert or upon an action. */  /** Defines an alien program to be execute upon alert or upon an action. */
341  typedef struct myexec {  typedef struct myexec {
342    Alert_T alerts;   /**< Alert events triggering this program to be executed */    unsigned int events;    /**< Events triggering this program to be executed */
343    Command_T program;                       /**< The external program to call */    Command_T program;                       /**< The external program to call */
344        
345    /** For internal use */    /** For internal use */
# Line 391  typedef struct myservice { Line 380  typedef struct myservice {
380    char *group;                                       /**< Service group name */    char *group;                                       /**< Service group name */
381    Command_T start;                    /**< The start command for the service */    Command_T start;                    /**< The start command for the service */
382    Command_T stop;                      /**< The stop command for the service */    Command_T stop;                      /**< The stop command for the service */
383    int  do_validate;    /**< validation flag, if FALSE, no validation is done */    int  do_monitor; /**< Monitor flag, if FALSE, the service is not monitored */
384    int  mode;                            /**< Monitoring mode for the service */    int  mode;                            /**< Monitoring mode for the service */
385    int  ncycle;                          /**< The number of the current cycle */    int  ncycle;                          /**< The number of the current cycle */
386    int  nstart;           /**< The number of current starts with this service */    int  nstart;           /**< The number of current starts with this service */

Legend:
Removed from v.1.64  
changed lines
  Added in v.1.65

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26