From dd814a7c1a8de056a79f7238578b09236edd5506 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 10 Aug 2023 11:18:49 +0200 Subject: Adding upstream version 1.42.0. Signed-off-by: Daniel Baumann --- collectors/freeipmi.plugin/freeipmi_plugin.c | 6 +- collectors/freeipmi.plugin/metadata.yaml | 151 +++++++++++++++++++ collectors/freeipmi.plugin/metrics.csv | 10 -- collectors/freeipmi.plugin/multi_metadata.yaml | 199 ------------------------- 4 files changed, 155 insertions(+), 211 deletions(-) create mode 100644 collectors/freeipmi.plugin/metadata.yaml delete mode 100644 collectors/freeipmi.plugin/metrics.csv delete mode 100644 collectors/freeipmi.plugin/multi_metadata.yaml (limited to 'collectors/freeipmi.plugin') diff --git a/collectors/freeipmi.plugin/freeipmi_plugin.c b/collectors/freeipmi.plugin/freeipmi_plugin.c index bfd867cc9..94b4fed85 100644 --- a/collectors/freeipmi.plugin/freeipmi_plugin.c +++ b/collectors/freeipmi.plugin/freeipmi_plugin.c @@ -1799,8 +1799,10 @@ int main (int argc, char **argv) { for(iteration = 0; 1 ; iteration++) { usec_t dt = heartbeat_next(&hb, step); - if(!tty) + if (!tty) { fprintf(stdout, "\n"); // keepalive to avoid parser read timeout (2 minutes) during ipmi_detect_speed_secs() + fflush(stdout); + } struct netdata_ipmi_state state = {0 }; @@ -1890,7 +1892,7 @@ int main (int argc, char **argv) { // restart check (14400 seconds) if (now_monotonic_sec() - started_t > IPMI_RESTART_EVERY_SECONDS) { - collector_error("%s(): reached my lifetime expectancy. Exiting to restart.", __FUNCTION__); + collector_info("%s(): reached my lifetime expectancy. Exiting to restart.", __FUNCTION__); fprintf(stdout, "EXIT\n"); fflush(stdout); exit(0); diff --git a/collectors/freeipmi.plugin/metadata.yaml b/collectors/freeipmi.plugin/metadata.yaml new file mode 100644 index 000000000..9540410bf --- /dev/null +++ b/collectors/freeipmi.plugin/metadata.yaml @@ -0,0 +1,151 @@ +plugin_name: freeipmi.plugin +modules: + - meta: + plugin_name: freeipmi.plugin + module_name: sensors + monitored_instance: + name: Intelligent Platform Management Interface (IPMI) + link: "https://en.wikipedia.org/wiki/Intelligent_Platform_Management_Interface" + categories: + - data-collection.hardware-devices-and-sensors + icon_filename: "netdata.png" + related_resources: + integrations: + list: [] + info_provided_to_referring_integrations: + description: "" + keywords: + - sensors + - ipmi + - freeipmi + - ipmimonitoring + most_popular: true + overview: + data_collection: + metrics_description: | + "Monitor enterprise server sensor readings, event log entries, and hardware statuses to ensure reliable server operations." + method_description: | + The plugin uses open source library IPMImonitoring to communicate with sensors. + supported_platforms: + include: [] + exclude: [] + multi_instance: true + additional_permissions: + description: "The plugin needs setuid." + default_behavior: + auto_detection: + description: "" + limits: + description: "" + performance_impact: + description: "Linux kernel module for IPMI can create big overhead." + setup: + prerequisites: + list: + - title: Preliminary actions + description: | + If you have not previously used IPMI on your system, you will probably need to run the ipmimonitoring command as root to initialize IPMI settings so that the Netdata plugin works correctly. It should return information about available sensors on the system. + + In some distributions libipmimonitoring.pc is located in a non-standard directory, which can cause building the plugin to fail when building Netdata from source. In that case you should find the file and link it to the standard pkg-config directory. Usually, running sudo ln -s /usr/lib/$(uname -m)-linux-gnu/pkgconfig/libipmimonitoring.pc/libipmimonitoring.pc /usr/lib/pkgconfig/libipmimonitoring.pc resolves this issue. + configuration: + file: + name: "netdata.conf" + section_name: '[plugin:freeipmi]' + description: "This is netdata main configuration file" + options: + description: "This tool receives command line options that are visible when user run: `./usr/libexec/netdata/plugins.d/freeipmi.plugin --help`" + folding: + title: "Config options" + enabled: true + list: + - name: command options + description: Variable used to pass arguments for the plugin. + default_value: 1 + required: false + examples: + folding: + enabled: true + title: "" + list: [] + troubleshooting: + problems: + list: [] + alerts: + - name: ipmi_sensor_state + link: https://github.com/netdata/netdata/blob/master/health/health.d/ipmi.conf + metric: ipmi.sensor_state + info: IPMI sensor ${label:sensor} (${label:component}) state + metrics: + folding: + title: Metrics + enabled: false + description: "" + availability: [] + scopes: + - name: sensor + description: "" + labels: + - name: sensor + description: The sensor name + - name: type + description: One of 45 recognized sensor types (Battery, Voltage...) + - name: component + description: One of 25 recognized components (Processor, Peripheral). + metrics: + - name: ipmi.sel + description: IPMI Events + unit: "events" + chart_type: area + dimensions: + - name: events + - name: ipmi.sensor_state + description: IPMI Sensors State + unit: "state" + chart_type: line + dimensions: + - name: nominal + - name: critical + - name: warning + - name: unknown + - name: ipmi.sensor_temperature_c + description: IPMI Sensor Temperature Celsius + unit: "Celsius" + chart_type: line + dimensions: + - name: temperature + - name: ipmi.sensor_temperature_f + description: IPMI Sensor Temperature Fahrenheit + unit: "Fahrenheit" + chart_type: line + dimensions: + - name: temperature + - name: ipmi.sensor_voltage + description: IPMI Sensor Voltage + unit: "Volts" + chart_type: line + dimensions: + - name: voltage + - name: ipmi.sensor_ampere + description: IPMI Sensor Current + unit: "Amps" + chart_type: line + dimensions: + - name: ampere + - name: ipmi.sensor_fan_speed + description: IPMI Sensor Fans Speed + unit: "RPM" + chart_type: line + dimensions: + - name: rotations + - name: ipmi.sensor_power + description: IPMI Sensor Power + unit: "Watts" + chart_type: line + dimensions: + - name: power + - name: ipmi.sensor_reading_percent + description: IPMI Sensor Reading Percentage + unit: "%" + chart_type: line + dimensions: + - name: percentage diff --git a/collectors/freeipmi.plugin/metrics.csv b/collectors/freeipmi.plugin/metrics.csv deleted file mode 100644 index 4c90d5c1b..000000000 --- a/collectors/freeipmi.plugin/metrics.csv +++ /dev/null @@ -1,10 +0,0 @@ -metric,scope,dimensions,unit,description,chart_type,labels,plugin,module -ipmi.sel,,events,events,"IPMI Events",area,,freeipmi.plugin,sel -ipmi.sensor_state,sensor,"nominal, critical, warning, unknown",state,"IPMI Sensors State",line,"sensor, type, component",freeipmi.plugin,sensors -ipmi.sensor_temperature_c,sensor,temperature,Celsius,"IPMI Sensor Temperature Celsius",line,"sensor, type, component",freeipmi.plugin,sensors -ipmi.sensor_temperature_f,sensor,temperature,Fahrenheit,"IPMI Sensor Temperature Fahrenheit",line,"sensor, type, component",freeipmi.plugin,sensors -ipmi.sensor_voltage,sensor,voltage,Volts,"IPMI Sensor Voltage",line,"sensor, type, component",freeipmi.plugin,sensors -ipmi.sensor_ampere,sensor,ampere,Amps,"IPMI Sensor Current",line,"sensor, type, component",freeipmi.plugin,sensors -ipmi.sensor_fan_speed,sensor,rotations,RPM,"IPMI Sensor Fans Speed",line,"sensor, type, component",freeipmi.plugin,sensors -ipmi.sensor_power,sensor,power,Watts,"IPMI Sensor Power",line,"sensor, type, component",freeipmi.plugin,sensors -ipmi.sensor_reading_percent,sensor,percentage,%,"IPMI Sensor Reading Percentage",line,"sensor, type, component",freeipmi.plugin,sensors diff --git a/collectors/freeipmi.plugin/multi_metadata.yaml b/collectors/freeipmi.plugin/multi_metadata.yaml deleted file mode 100644 index 21333278a..000000000 --- a/collectors/freeipmi.plugin/multi_metadata.yaml +++ /dev/null @@ -1,199 +0,0 @@ -name: freeipmi.plugin -modules: - - meta: - plugin_name: freeipmi.plugin - module_name: sel - monitored_instance: - name: freeipmi sel - link: '' - categories: [] - icon_filename: '' - related_resources: - integrations: - list: [] - info_provided_to_referring_integrations: - description: '' - keywords: [] - most_popular: false - overview: - data_collection: - metrics_description: '' - method_description: '' - supported_platforms: - include: [] - exclude: [] - multi-instance: true - additional_permissions: - description: '' - default_behavior: - auto_detection: - description: '' - limits: - description: '' - performance_impact: - description: '' - setup: - prerequisites: - list: [] - configuration: - file: - name: '' - description: '' - options: - description: '' - folding: - title: '' - enabled: true - list: [] - examples: - folding: - enabled: true - title: '' - list: [] - troubleshooting: - problems: - list: [] - alerts: [] - metrics: - folding: - title: Metrics - enabled: false - description: "" - availability: [] - scopes: - - name: global - description: "" - labels: [] - metrics: - - name: ipmi.sel - description: IPMI Events - unit: "events" - chart_type: area - dimensions: - - name: events - - meta: - plugin_name: freeipmi.plugin - module_name: sensors - monitored_instance: - name: freeipmi sensors - link: '' - categories: [] - icon_filename: '' - related_resources: - integrations: - list: [] - info_provided_to_referring_integrations: - description: '' - keywords: [] - most_popular: false - overview: - data_collection: - metrics_description: '' - method_description: '' - supported_platforms: - include: [] - exclude: [] - multi-instance: true - additional_permissions: - description: '' - default_behavior: - auto_detection: - description: '' - limits: - description: '' - performance_impact: - description: '' - setup: - prerequisites: - list: [] - configuration: - file: - name: '' - description: '' - options: - description: '' - folding: - title: '' - enabled: true - list: [] - examples: - folding: - enabled: true - title: '' - list: [] - troubleshooting: - problems: - list: [] - alerts: - - name: ipmi_sensor_state - link: https://github.com/netdata/netdata/blob/master/health/health.d/ipmi.conf - metric: ipmi.sensor_state - info: IPMI sensor ${label:sensor} (${label:component}) state - metrics: - folding: - title: Metrics - enabled: false - description: "" - availability: [] - scopes: - - name: sensor - description: "" - labels: - - name: sensor - description: TBD - - name: type - description: TBD - - name: component - description: TBD - metrics: - - name: ipmi.sensor_state - description: IPMI Sensors State - unit: "state" - chart_type: line - dimensions: - - name: nominal - - name: critical - - name: warning - - name: unknown - - name: ipmi.sensor_temperature_c - description: IPMI Sensor Temperature Celsius - unit: "Celsius" - chart_type: line - dimensions: - - name: temperature - - name: ipmi.sensor_temperature_f - description: IPMI Sensor Temperature Fahrenheit - unit: "Fahrenheit" - chart_type: line - dimensions: - - name: temperature - - name: ipmi.sensor_voltage - description: IPMI Sensor Voltage - unit: "Volts" - chart_type: line - dimensions: - - name: voltage - - name: ipmi.sensor_ampere - description: IPMI Sensor Current - unit: "Amps" - chart_type: line - dimensions: - - name: ampere - - name: ipmi.sensor_fan_speed - description: IPMI Sensor Fans Speed - unit: "RPM" - chart_type: line - dimensions: - - name: rotations - - name: ipmi.sensor_power - description: IPMI Sensor Power - unit: "Watts" - chart_type: line - dimensions: - - name: power - - name: ipmi.sensor_reading_percent - description: IPMI Sensor Reading Percentage - unit: "%" - chart_type: line - dimensions: - - name: percentage -- cgit v1.2.3