output: add warning and critical threshold counts to mustach

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2019-07-27 21:02:10 +01:00
parent 707eafa670
commit fb518b7a19
No known key found for this signature in database
GPG key ID: 0D46FEF7E61DBB46
5 changed files with 125 additions and 47 deletions

View file

@ -155,6 +155,16 @@ struct output_helper_t {
uint32_t pad;
};
/*! \struct status_counts_t
* \brief Range and shared network alarming status counts.
*/
struct status_counts_t {
unsigned int warning;
unsigned int critical;
unsigned int ok;
unsigned int ignored;
};
/*! \enum ltype
* \brief Lease state types. These are the possible values in struct leases_t.
*/
@ -320,6 +330,8 @@ extern int range_output_helper(struct conf_t *state, struct output_helper_t *oh,
extern int shnet_output_helper(struct conf_t *state, struct output_helper_t *oh,
struct shared_network_t *shared_p);
extern int output_analysis(struct conf_t *state);
extern void range_alarms(struct conf_t *state, struct status_counts_t *rangstat);
extern void shared_net_alarms(struct conf_t *state, struct status_counts_t *sharstat);
/* sort.c */
extern void mergesort_ranges(struct conf_t *state,