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

Diff of /monit/monitor.h

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

revision 1.159 by hauk, Sun Dec 12 23:45:09 2004 UTC revision 1.160 by hauk, Mon Dec 20 05:39:34 2004 UTC
# Line 66  Line 66 
66  #define STRERROR            strerror(errno)  #define STRERROR            strerror(errno)
67  #define STRLEN             256  #define STRLEN             256
68  #define ARGMAX             64  #define ARGMAX             64
69    #define MAX_HEADERS        20
70  /* Set log file mode: "-rw-rw-r--" */  /* Set log file mode: "-rw-rw-r--" */
71  #define LOGMASK            0112  #define LOGMASK            0112
72  /* Set pid file mode: "-rw-r--r--" */  /* Set pid file mode: "-rw-r--r--" */
# Line 243  typedef struct myurl { Line 244  typedef struct myurl {
244    int   port;                                        /**< URL port     part */    int   port;                                        /**< URL port     part */
245    char *path;                                        /**< URL path     part */    char *path;                                        /**< URL path     part */
246    char *query;                                       /**< URL query    part */    char *query;                                       /**< URL query    part */
247  } *Url_T;  } *URL_T;
248    
249    
250    /** Defines a HTTP client request object */
251    typedef struct myrequest {
252      URL_T url;                                      /**< Optional URL request */
253      int   length;                        /**< The length of the headers array */
254      int   operator;                 /**< Response content comparison operator */
255      char *headers[MAX_HEADERS];     /**< HTTP headers embedded in the request */
256    #ifdef HAVE_REGEX_H
257      regex_t *regex;                   /* regex used to test the response body */
258    #else
259      char *regex;                 /* string to search for in the response body */
260    #endif
261    } *Request_T;
262    
263    
264  /** Defines an event notification and status receiver object */  /** Defines an event notification and status receiver object */
265  typedef struct mycollector {  typedef struct mycollector {
266    Url_T url;                                             /**< URL definition */    URL_T url;                                             /**< URL definition */
267    Ssl_T ssl;                                             /**< SSL definition */    Ssl_T ssl;                                             /**< SSL definition */
268    int   timeout;              /**< The timeout to wait for connection or i/o */    int   timeout;              /**< The timeout to wait for connection or i/o */
   
269    Socket_T       socket;                     /**< Socket used for connection */    Socket_T       socket;                     /**< Socket used for connection */
270    
271    /** For internal use */    /** For internal use */
# Line 404  typedef struct mygenericproto { Line 419  typedef struct mygenericproto {
419    struct mygenericproto *next;    struct mygenericproto *next;
420  } *Generic_T;  } *Generic_T;
421    
   
422  /** Defines a port object */  /** Defines a port object */
423  typedef struct myport {  typedef struct myport {
424    volatile int socket;                       /**< Socket used for connection */    volatile int socket;                       /**< Socket used for connection */
# Line 422  typedef struct myport { Line 436  typedef struct myport {
436    int is_available;                /**< TRUE if the server/port is available */    int is_available;                /**< TRUE if the server/port is available */
437    double response;                      /**< Socket connection response time */    double response;                      /**< Socket connection response time */
438    EventAction_T action;  /**< Description of the action upon event occurence */    EventAction_T action;  /**< Description of the action upon event occurence */
439      /** Apache-status specific parameters */
   /**< Apache-status specific parameters */  
440    struct apache_status {    struct apache_status {
441      int loglimit;                  /**< Max percentatge of logging processes */      int loglimit;                  /**< Max percentatge of logging processes */
442      int loglimitOP;                                   /**< loglimit operator */      int loglimitOP;                                   /**< loglimit operator */
# Line 448  typedef struct myport { Line 461  typedef struct myport {
461    } ApacheStatus;    } ApacheStatus;
462        
463    Ssl_T SSL;                                             /**< SSL definition */    Ssl_T SSL;                                             /**< SSL definition */
464      Protocol_T protocol;     /**< Protocol object for testing a port's service */
465    /**< Object used for testing a port's service */    Request_T url_request;             /**< Optional url client request object */
   Protocol_T protocol;  
466        
467    /** For internal use */    /** For internal use */
468    struct myport *next;                               /**< next port in chain */    struct myport *next;                               /**< next port in chain */
# Line 640  typedef struct myservice { Line 652  typedef struct myservice {
652    Size_T      sizelist;                                 /**< Size check list */    Size_T      sizelist;                                 /**< Size check list */
653    Timestamp_T timestamplist;                       /**< Timestamp check list */    Timestamp_T timestamplist;                       /**< Timestamp check list */
654    Uid_T       uid;                                            /**< Uid check */    Uid_T       uid;                                            /**< Uid check */
655      URL_T       urllist;                    /**< URLs to check for the service */
656        
657    /** General event handlers */    /** General event handlers */
658    EventAction_T action_DATA;       /**< Description of the action upon event */    EventAction_T action_DATA;       /**< Description of the action upon event */
# Line 717  void  validate() ; Line 730  void  validate() ;
730  void  daemonize() ;  void  daemonize() ;
731  void  gc();  void  gc();
732  void  gc_mail_list(Mail_T *);  void  gc_mail_list(Mail_T *);
 void  gc_url(Url_T *);  
733  int   kill_daemon(int);  int   kill_daemon(int);
734  int   exist_daemon();  int   exist_daemon();
735  void  sendmail(Mail_T);  void  sendmail(Mail_T);

Legend:
Removed from v.1.159  
changed lines
  Added in v.1.160

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