alarm_config.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // SPDX-License-Identifier: GPL-3.0-or-later
  2. #ifndef ACLK_SCHEMA_WRAPPER_ALARM_CONFIG_H
  3. #define ACLK_SCHEMA_WRAPPER_ALARM_CONFIG_H
  4. #include <stdlib.h>
  5. #include <stdint.h>
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. struct aclk_alarm_configuration {
  10. char *alarm;
  11. char *tmpl;
  12. char *on_chart;
  13. char *classification;
  14. char *type;
  15. char *component;
  16. char *os;
  17. char *hosts;
  18. char *plugin;
  19. char *module;
  20. char *charts;
  21. char *families;
  22. char *lookup;
  23. char *every;
  24. char *units;
  25. char *green;
  26. char *red;
  27. char *calculation_expr;
  28. char *warning_expr;
  29. char *critical_expr;
  30. char *recipient;
  31. char *exec;
  32. char *delay;
  33. char *repeat;
  34. char *info;
  35. char *options;
  36. char *host_labels;
  37. int32_t p_db_lookup_after;
  38. int32_t p_db_lookup_before;
  39. char *p_db_lookup_dimensions;
  40. char *p_db_lookup_method;
  41. char *p_db_lookup_options;
  42. int32_t p_update_every;
  43. };
  44. void destroy_aclk_alarm_configuration(struct aclk_alarm_configuration *cfg);
  45. struct provide_alarm_configuration {
  46. char *cfg_hash;
  47. struct aclk_alarm_configuration cfg;
  48. };
  49. char *generate_provide_alarm_configuration(size_t *len, struct provide_alarm_configuration *data);
  50. char *parse_send_alarm_configuration(const char *data, size_t len);
  51. #ifdef __cplusplus
  52. }
  53. #endif
  54. #endif /* ACLK_SCHEMA_WRAPPER_ALARM_CONFIG_H */