mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-17 16:26:59 +00:00
alarming: make native nagios support to dhcpd-pools
This commit makes integrating the command with nagios much easier. $ dhcpd-pools -c dhcpd.conf -l dhcpd.leases --critical 80 --warning 75 CRITICAL: dhcpd-pools: Ranges; crit: 14 warn: 22 ok: 220 Shared nets; crit: 1 warn: 0 ok: 4 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
5a307703c9
commit
42dd80aeac
6 changed files with 161 additions and 2 deletions
|
|
@ -102,6 +102,8 @@ struct configuration_t {
|
|||
int reverse_order;
|
||||
char *output_file;
|
||||
int output_limit[2];
|
||||
double warning;
|
||||
double critical;
|
||||
};
|
||||
struct shared_network_t {
|
||||
char *name;
|
||||
|
|
@ -177,6 +179,7 @@ void *safe_malloc(const size_t size)
|
|||
void *safe_realloc(void *__restrict ptr, const size_t size);
|
||||
char *safe_strdup(const char *__restrict str) __attribute__ ((nonnull(1)));
|
||||
int xstrstr(char *__restrict a, char *__restrict b, int len);
|
||||
double strtod_or_err(const char *__restrict str, const char *__restrict errmesg);
|
||||
int close_stream(FILE * stream);
|
||||
void close_stdout(void);
|
||||
void print_version(void) __attribute__ ((noreturn));
|
||||
|
|
@ -207,6 +210,7 @@ int output_txt(void);
|
|||
int output_html(void);
|
||||
int output_xml(void);
|
||||
int output_csv(void);
|
||||
int output_alarming(void);
|
||||
/* Memory release, file closing etc */
|
||||
void clean_up(void);
|
||||
/* Hash functions */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue