@cryptotaxi247 / netdata-1 / commits / 892255b23

freeipmi: add availability status chart and alarm (#15151)

Ilya Mashchenko committed Jun 7, 2023 at 18:18 UTC 892255b23728fde076402b7300f13c80de32e5fc
3 files changed +27
collectors/freeipmi.plugin/freeipmi_plugin.c
+15
@@ -1833,6 +1833,21 @@ int main (int argc, char **argv) {
1833 for(iteration = 0; 1 ; iteration++) {
1834 usec_t dt = heartbeat_next(&hb, step);
1835
1836 + if (iteration) {
1837 + if (iteration == 1) {
1838 + fprintf(
1839 + stdout,
1840 + "CHART netdata.freeipmi_availability_status '' 'Plugin availability status' 'status' plugins netdata.plugin_availability_status line 146000 %d\n"
1841 + "DIMENSION available '' absolute 1 1\n",
1842 + netdata_update_every);
1843 + }
1844 + fprintf(
1845 + stdout,
1846 + "BEGIN netdata.freeipmi_availability_status\n"
1847 + "SET available = 1\n"
1848 + "END\n");
1849 + }
1850 +
1851 if(debug && iteration)
1852 fprintf(stderr, "freeipmi.plugin: iteration %zu, dt %llu usec, sensors collected %zu, sensors sent to netdata %zu \n"
1853 , iteration
health/Makefile.am
+1
@@ -69,6 +69,7 @@ dist_healthconfig_DATA = \
69 health.d/nvme.conf \
70 health.d/nut.conf \
71 health.d/pihole.conf \
72 + health.d/plugin.conf \
73 health.d/ping.conf \
74 health.d/postgres.conf \
75 health.d/portcheck.conf \
health/health.d/plugin.conf new
+11
@@ -0,0 +1,11 @@
1 + template: plugin_availability_status
2 + on: netdata.plugin_availability_status
3 + class: Errors
4 + type: Netdata
5 + calc: $now - $last_collected_t
6 + units: seconds ago
7 + every: 10s
8 + warn: $this > (($status >= $WARNING) ? ($update_every) : (20 * $update_every))
9 + delay: down 5m multiplier 1.5 max 1h
10 + info: the amount of time that ${label:_collect_plugin} did not report its availability status
11 + to: sysadmin