1 /* getlog.h - common parameters for getlog */
3 /* ***** CONFIG ***** */
5 /* This is the place where logs files are dropped */
6 #define LOG_PATH "/var/log/cacti"
8 /* If last line's timestamp is older that this (seconds), no data will be
9 * returned. Additionally, if STALL_CMD is defined it will be run. Set it
10 * to 0 to avoid this check. */
11 #define MAX_AGE 120 /* 2 minutes */
13 /* This is a script that will be run if the log is stall for more than
14 * MAX_AGE seconds (It's up to you to make good use of this). Have no
15 * effect if MAX_AGE isn't positive. The original idea was to have a Nagios
16 * event handler restart the counter when stall (Implement it the way you
18 #define STALL_CMD "/usr/local/nagios/libexec/eventhandlers/notify_stall_counter $ARGV[0]"
20 /* This is the maximum read size for each read. Optimal performance can be
21 * obtained by setting this to the smallest number higher than your usual
22 * line length. THIS MUST BE A 512-BYTES MULTIPLE!! I.e. 512, 1024, 8192, 8704
23 * are all valid numbers.
25 * The current implementation limit this value to 32256 */
26 #define READ_CHNK 512 * 2 /* 1024 bytes */
28 /* Maximum buffered read size (Will stop reading lines longer than this!) */
29 #define MAX_READ 1024 * 512 /* 512KiB */
31 /* Define MALLOC_FREE if you want to free all dynamically allocated memory.
32 * Normally, the OS does a better job at is when the process exits */
33 /* #define MALLOC_FREE */ /* BROKEN!! */
36 /* ***** PROTOTYPES ***** */
40 int find_index(const char *, char *);
41 char *subst_col(int, char **);
42 int datediff(const char*);
43 int myatoi(const char*);