rrd_api_systemd.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // SPDX-License-Identifier: GPL-3.0-or-later
  2. /** @file plugins_logsmanagement_systemd.h
  3. * @brief Incudes the structure and function definitions
  4. * for the systemd log charts.
  5. */
  6. #ifndef RRD_API_SYSTEMD_H_
  7. #define RRD_API_SYSTEMD_H_
  8. #include "daemon/common.h"
  9. struct File_info;
  10. typedef struct Chart_data_systemd chart_data_systemd_t;
  11. #include "../file_info.h"
  12. #include "../circular_buffer.h"
  13. #include "rrd_api.h"
  14. extern const char *dim_sever_str[SYSLOG_SEVER_ARR_SIZE];
  15. struct Chart_data_systemd {
  16. time_t last_update;
  17. /* Number of collected log records */
  18. collected_number num_lines;
  19. /* Systemd metrics - Syslog Priority value */
  20. char *dim_prior[193];
  21. collected_number num_prior[193];
  22. /* Systemd metrics - Syslog Severity value */
  23. collected_number num_sever[9];
  24. /* Systemd metrics - Syslog Facility value */
  25. collected_number num_facil[25];
  26. };
  27. void systemd_chart_init(struct File_info *p_file_info);
  28. void systemd_chart_update(struct File_info *p_file_info);
  29. #endif // RRD_API_SYSTEMD_H_