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

Diff of /monit/monitor.h

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

revision 1.158 by martinp, Thu Dec 9 17:02:44 2004 UTC revision 1.159 by hauk, Sun Dec 12 23:45:09 2004 UTC
# Line 55  Line 55 
55  #include <regex.h>  #include <regex.h>
56  #endif  #endif
57    
58    
59  #include "ssl.h"  #include "ssl.h"
60  #include "socket.h"  #include "socket.h"
61    
# Line 235  typedef struct myeventaction { Line 236  typedef struct myeventaction {
236  /** Defines an url object */  /** Defines an url object */
237  typedef struct myurl {  typedef struct myurl {
238    char *url;                                                  /**< Full URL */    char *url;                                                  /**< Full URL */
   
239    char *protocol;                                    /**< URL protocol type */    char *protocol;                                    /**< URL protocol type */
240    char *user;                                        /**< URL user     part */    char *user;                                        /**< URL user     part */
241    char *password;                                    /**< URL password part */    char *password;                                    /**< URL password part */
# Line 243  typedef struct myurl { Line 243  typedef struct myurl {
243    int   port;                                        /**< URL port     part */    int   port;                                        /**< URL port     part */
244    char *path;                                        /**< URL path     part */    char *path;                                        /**< URL path     part */
245    char *query;                                       /**< URL query    part */    char *query;                                       /**< URL query    part */
   
246  } *Url_T;  } *Url_T;
247    
248  /** Defines an event notification and status receiver object */  /** Defines an event notification and status receiver object */
# Line 423  typedef struct myport { Line 422  typedef struct myport {
422    int is_available;                /**< TRUE if the server/port is available */    int is_available;                /**< TRUE if the server/port is available */
423    double response;                      /**< Socket connection response time */    double response;                      /**< Socket connection response time */
424    EventAction_T action;  /**< Description of the action upon event occurence */    EventAction_T action;  /**< Description of the action upon event occurence */
425    
426      /**< Apache-status specific parameters */
427      struct apache_status {
428        int loglimit;                  /**< Max percentatge of logging processes */
429        int loglimitOP;                                   /**< loglimit operator */
430        int closelimit;             /**< Max percentatge of closinging processes */
431        int closelimitOP;                               /**< closelimit operator */
432        int dnslimit;         /**< Max percentatge of processes doing DNS lookup */
433        int dnslimitOP;                                   /**< dnslimit operator */
434        int keepalivelimit;          /**< Max percentatge of keepalive processes */
435        int keepalivelimitOP;                       /**< keepalivelimit operator */
436        int replylimit;               /**< Max percentatge of replying processes */
437        int replylimitOP;                               /**< replylimit operator */
438        int requestlimit;     /**< Max percentatge of processes reading requests */
439        int requestlimitOP;                           /**< requestlimit operator */
440        int startlimit;            /**< Max percentatge of processes starting up */
441        int startlimitOP;                               /**< startlimit operator */
442        int waitlimit;  /**< Min percentatge of processes waiting for connection */
443        int waitlimitOP;                                 /**< waitlimit operator */
444        int gracefullimit;/**< Max percentatge of processes gracefully finishing */
445        int gracefullimitOP;                         /**< gracefullimit operator */
446        int cleanuplimit;      /**< Max percentatge of processes in idle cleanup */
447        int cleanuplimitOP;                           /**< cleanuplimit operator */
448      } ApacheStatus;
449        
450    Ssl_T SSL;                                             /**< SSL definition */    Ssl_T SSL;                                             /**< SSL definition */
451    
# Line 675  extern int            oldptreesize; Line 698  extern int            oldptreesize;
698    
699  /* ------------------------------------------------------- Public prototypes */  /* ------------------------------------------------------- Public prototypes */
700    
701    #include "util.h"
702    #include "file.h"
703    
704    /* FIXME: move remaining prototypes into seperate header-files */
705    
 char *trim(char *);  
 char *ltrim(char *);  
 char *rtrim(char *);  
 void  trim_quotes(char *);  
 char *replace_char(char *, char, char);  
 char *replace_string(char **, const char *, const char *);  
 int   count_words(char *, const char *);  
 int   starts_with(const char *, const char *);  
 void  handle_string_escapes(char *);  
 void  chomp(char *,int);  
 int   exist_service(const char *);  
 int   get_service_list_length();  
 Service_T get_service(const char *);  
 void  printrunlist();  
 void  printservice(Service_T);  
 void  printservicelist();  
 pid_t get_pid(char *);  
 int   is_process_running(Service_T);  
 int   is_strdefined(char *);  
 int   isreg_file(char *);  
 char *stripfilename(char*);  
 int   exist_file(char *);  
 char *get_RFC822date(long *);  
 char *get_uptime(time_t, char *);  
 time_t get_process_uptime(char *);  
 char *get_checksum(char *, int);  
 char *url_encode(char *);  
 char *url_decode(char *);  
 Url_T url_parse(char *);  
 char *get_basic_authentication_header();  
 Auth_T get_user_credentials(char *);  
 int   compare_user_credentials(char *, char *);  
706  int   parse(char *);  int   parse(char *);
707  void  control_service(const char *, const char *);  void  control_service(const char *, const char *);
708  void  control_service_daemon(const char *, const char *);  void  control_service_daemon(const char *, const char *);
# Line 723  void  daemonize() ; Line 718  void  daemonize() ;
718  void  gc();  void  gc();
719  void  gc_mail_list(Mail_T *);  void  gc_mail_list(Mail_T *);
720  void  gc_url(Url_T *);  void  gc_url(Url_T *);
 void  init_files();  
 time_t get_timestamp(char *, mode_t);  
 void  finalize_files();  
 char *find_rcfile();      
 int   create_pidfile(char *);  
721  int   kill_daemon(int);  int   kill_daemon(int);
722  int   exist_daemon();  int   exist_daemon();
723  void  sendmail(Mail_T);  void  sendmail(Mail_T);
# Line 744  char *format(const char *, va_list, long Line 734  char *format(const char *, va_list, long
734  void  redirect_stdfd();  void  redirect_stdfd();
735  void  fd_close();  void  fd_close();
736  pid_t getpgid(pid_t);  pid_t getpgid(pid_t);
 int   check_file_stat(char *, char *, int);  
 void  state_save();  
 int   state_should_update();  
 void  state_update();  
737  #if ! HAVE_MALLOC  #if ! HAVE_MALLOC
738  void *rpl_malloc (size_t __size);  void *rpl_malloc (size_t __size);
739  #endif  #endif

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

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