alarm_config.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 *lookup;
  22. char *every;
  23. char *units;
  24. char *green;
  25. char *red;
  26. char *calculation_expr;
  27. char *warning_expr;
  28. char *critical_expr;
  29. char *recipient;
  30. char *exec;
  31. char *delay;
  32. char *repeat;
  33. char *info;
  34. char *options;
  35. char *host_labels;
  36. int32_t p_db_lookup_after;
  37. int32_t p_db_lookup_before;
  38. char *p_db_lookup_dimensions;
  39. char *p_db_lookup_method;
  40. char *p_db_lookup_options;
  41. int32_t p_update_every;
  42. char *chart_labels;
  43. char *summary;
  44. };
  45. void destroy_aclk_alarm_configuration(struct aclk_alarm_configuration *cfg);
  46. struct provide_alarm_configuration {
  47. char *cfg_hash;
  48. struct aclk_alarm_configuration cfg;
  49. };
  50. char *generate_provide_alarm_configuration(size_t *len, struct provide_alarm_configuration *data);
  51. char *parse_send_alarm_configuration(const char *data, size_t len);
  52. #ifdef __cplusplus
  53. }
  54. #endif
  55. #endif /* ACLK_SCHEMA_WRAPPER_ALARM_CONFIG_H */