@cryptotaxi247 / netdata-1 / commits / 83c48807d

Preserve README info inside metadata.yaml for freeipmi.plugin (#15955)

Co-authored-by: ilyam8 <ilya@netdata.cloud>

Fotis Voutsas committed Sep 19, 2023 at 17:05 UTC 83c48807de20f299c58c9873894aad9889af3b24
1 file changed +216 -22
collectors/freeipmi.plugin/metadata.yaml
+216 -22
@@ -2,7 +2,7 @@ plugin_name: freeipmi.plugin
2 modules:
3 - meta:
4 plugin_name: freeipmi.plugin
5 - module_name: sensors
5 + module_name: freeipmi
6 monitored_instance:
7 name: Intelligent Platform Management Interface (IPMI)
8 link: "https://en.wikipedia.org/wiki/Intelligent_Platform_Management_Interface"
@@ -42,36 +42,225 @@ modules:
42 setup:
43 prerequisites:
44 list:
45 - - title: Preliminary actions
45 + - title: Install freeipmi.plugin
46 description: |
47 - 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.
47 + When using our official DEB/RPM packages, the FreeIPMI plugin is included in a separate package named `netdata-plugin-freeipmi` which needs to be manually installed using your system package manager. It is not installed automatically due to the large number of dependencies it requires.
48
49 - 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 linking 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.
49 + When using a static build of Netdata, the FreeIPMI plugin will be included and installed automatically, though you will still need to have FreeIPMI installed on your system to be able to use the plugin.
50
51 - If you installed `netdata` using a package manager, it is also necessary to install the package `netdata-plugin-freeimpi`.
51 + When using a local build of Netdata, you need to ensure that the FreeIPMI development packages (typically called `libipmimonitoring-dev`, `libipmimonitoring-devel`, or `freeipmi-devel`) are installed when building Netdata.
52 + - title: Preliminary actions
53 + description: |
54 + If you have not previously used IPMI on your system, you will probably need to run the `ipmimonitoring` command as root
55 + to initialize IPMI settings so that the Netdata plugin works correctly. It should return information about available sensors on the system.
56 configuration:
57 file:
58 name: "netdata.conf"
55 - section_name: '[plugin:freeipmi]'
56 - description: "This is netdata main configuration file"
59 + section_name: "[plugin:freeipmi]"
60 options:
58 - description: "This tool receives command line options that are visible when user run: `./usr/libexec/netdata/plugins.d/freeipmi.plugin --help`"
61 + description: |
62 + The configuration is set using command line options:
63 +
64 + ```
65 + # netdata.conf
66 + [plugin:freeipmi]
67 + command options = opt1 opt2 ... optN
68 + ```
69 +
70 + To display a help message listing the available command line options:
71 +
72 + ```bash
73 + ./usr/libexec/netdata/plugins.d/freeipmi.plugin --help
74 + ```
75 folding:
60 - title: "Config options"
76 + title: "Command options"
77 enabled: true
78 list:
63 - - name: command options
64 - description: Variable used to pass arguments for the plugin.
65 - default_value: 1
79 + - name: SECONDS
80 + description: Data collection frequency.
81 + default_value: ""
82 + required: false
83 + - name: debug
84 + description: Enable verbose output.
85 + default_value: disabled
86 + required: false
87 + - name: no-sel
88 + description: Disable System Event Log (SEL) collection.
89 + default_value: disabled
90 + required: false
91 + - name: reread-sdr-cache
92 + description: Re-read SDR cache on every iteration.
93 + default_value: disabled
94 + required: false
95 + - name: interpret-oem-data
96 + description: Attempt to parse OEM data.
97 + default_value: disabled
98 + required: false
99 + - name: assume-system-event-record
100 + description: treat illegal SEL events records as normal.
101 + default_value: disabled
102 + required: false
103 + - name: ignore-non-interpretable-sensors
104 + description: Do not read sensors that cannot be interpreted.
105 + default_value: disabled
106 + required: false
107 + - name: bridge-sensors
108 + description: Bridge sensors not owned by the BMC.
109 + default_value: disabled
110 + required: false
111 + - name: shared-sensors
112 + description: Enable shared sensors if found.
113 + default_value: disabled
114 + required: false
115 + - name: no-discrete-reading
116 + description: Do not read sensors if their event/reading type code is invalid.
117 + default_value: enabled
118 + required: false
119 + - name: ignore-scanning-disabled
120 + description: Ignore the scanning bit and read sensors no matter what.
121 + default_value: disabled
122 + required: false
123 + - name: assume-bmc-owner
124 + description: Assume the BMC is the sensor owner no matter what (usually bridging is required too).
125 + default_value: disabled
126 + required: false
127 + - name: hostname HOST
128 + description: Remote IPMI hostname or IP address.
129 + default_value: local
130 + required: false
131 + - name: username USER
132 + description: Username that will be used when connecting to the remote host.
133 + default_value: ""
134 + required: false
135 + - name: password PASS
136 + description: Password that will be used when connecting to the remote host.
137 + default_value: ""
138 + required: false
139 + - name: noauthcodecheck / no-auth-code-check
140 + description: Don't check the authentication codes returned.
141 + default_value: ""
142 + required: false
143 + - name: driver-type IPMIDRIVER
144 + description: Specify the driver type to use instead of doing an auto selection. The currently available outofband drivers are LAN and LAN_2_0, which perform IPMI 1.5 and IPMI 2.0 respectively. The currently available inband drivers are KCS, SSIF, OPENIPMI and SUNBMC.
145 + default_value: ""
146 + required: false
147 + - name: sdr-cache-dir PATH
148 + description: SDR cache files directory.
149 + default_value: /tmp
150 + required: false
151 + - name: sensor-config-file FILE
152 + description: Sensors configuration filename.
153 + default_value: system default
154 + required: false
155 + - name: sel-config-file FILE
156 + description: SEL configuration filename.
157 + default_value: system default
158 + required: false
159 + - name: ignore N1,N2,N3,...
160 + description: Sensor IDs to ignore.
161 + default_value: ""
162 + required: false
163 + - name: ignore-status N1,N2,N3,...
164 + description: Sensor IDs to ignore status (nominal/warning/critical).
165 + default_value: ""
166 + required: false
167 + - name: -v
168 + description: Print version and exit.
169 + default_value: ""
170 + required: false
171 + - name: --help
172 + description: Print usage message and exit.
173 + default_value: ""
174 required: false
175 examples:
176 folding:
177 enabled: true
70 - title: ""
71 - list: []
178 + title: "Config"
179 + list:
180 + - name: Decrease data collection frequency
181 + description: Basic example decreasing data collection frequency. The minimum `update every` is 5 (enforced internally by the plugin). IPMI is slow and CPU hungry. So, once every 5 seconds is pretty acceptable.
182 + config: |
183 + [plugin:freeipmi]
184 + update every = 10
185 + folding:
186 + enabled: false
187 + - name: Disable SEL collection
188 + description: Append to `command options =` the options you need.
189 + config: |
190 + [plugin:freeipmi]
191 + command options = no-sel
192 + - name: Ignore specific sensors
193 + description: |
194 + Specific sensor IDs can be excluded from freeipmi tools by editing `/etc/freeipmi/freeipmi.conf` and setting the IDs to be ignored at `ipmi-sensors-exclude-record-ids`.
195 +
196 + **However this file is not used by `libipmimonitoring`** (the library used by Netdata's `freeipmi.plugin`).
197 +
198 + To find the IDs to ignore, run the command `ipmimonitoring`. The first column is the wanted ID:
199 +
200 + ID | Name | Type | State | Reading | Units | Event
201 + 1 | Ambient Temp | Temperature | Nominal | 26.00 | C | 'OK'
202 + 2 | Altitude | Other Units Based Sensor | Nominal | 480.00 | ft | 'OK'
203 + 3 | Avg Power | Current | Nominal | 100.00 | W | 'OK'
204 + 4 | Planar 3.3V | Voltage | Nominal | 3.29 | V | 'OK'
205 + 5 | Planar 5V | Voltage | Nominal | 4.90 | V | 'OK'
206 + 6 | Planar 12V | Voltage | Nominal | 11.99 | V | 'OK'
207 + 7 | Planar VBAT | Voltage | Nominal | 2.95 | V | 'OK'
208 + 8 | Fan 1A Tach | Fan | Nominal | 3132.00 | RPM | 'OK'
209 + 9 | Fan 1B Tach | Fan | Nominal | 2150.00 | RPM | 'OK'
210 + 10 | Fan 2A Tach | Fan | Nominal | 2494.00 | RPM | 'OK'
211 + 11 | Fan 2B Tach | Fan | Nominal | 1825.00 | RPM | 'OK'
212 + 12 | Fan 3A Tach | Fan | Nominal | 3538.00 | RPM | 'OK'
213 + 13 | Fan 3B Tach | Fan | Nominal | 2625.00 | RPM | 'OK'
214 + 14 | Fan 1 | Entity Presence | Nominal | N/A | N/A | 'Entity Present'
215 + 15 | Fan 2 | Entity Presence | Nominal | N/A | N/A | 'Entity Present'
216 + ...
217 +
218 + `freeipmi.plugin` supports the option `ignore` that accepts a comma separated list of sensor IDs to ignore. To configure it set on `netdata.conf`:
219 + config: |
220 + [plugin:freeipmi]
221 + command options = ignore 1,2,3,4,...
222 troubleshooting:
223 problems:
74 - list: []
224 + list:
225 + - name: Debug Mode
226 + description: |
227 + You can run `freeipmi.plugin` with the debug option enabled, to troubleshoot issues with it. The output should give you clues as to why the collector isn't working.
228 +
229 + - Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.
230 +
231 + ```bash
232 + cd /usr/libexec/netdata/plugins.d/
233 + ```
234 +
235 + - Switch to the `netdata` user.
236 +
237 + ```bash
238 + sudo -u netdata -s
239 + ```
240 +
241 + - Run the `freeipmi.plugin` in debug mode:
242 +
243 + ```bash
244 + ./freeipmi.plugin 5 debug
245 + ```
246 + - name: kimpi0 CPU usage
247 + description: |
248 + There have been reports that kipmi is showing increased CPU when the IPMI is queried. To lower the CPU consumption of the system you can issue this command:
249 +
250 + ```sh
251 + echo 10 > /sys/module/ipmi_si/parameters/kipmid_max_busy_us
252 + ```
253 +
254 + You can also permanently set the above setting by creating the file `/etc/modprobe.d/ipmi.conf` with this content:
255 +
256 + ```sh
257 + # prevent kipmi from consuming 100% CPU
258 + options ipmi_si kipmid_max_busy_us=10
259 + ```
260 +
261 + This instructs the kernel IPMI module to pause for a tick between checking IPMI. Querying IPMI will be a lot slower now (e.g. several seconds for IPMI to respond), but `kipmi` will not use any noticeable CPU.
262 +
263 + You can also use a higher number (this is the number of microseconds to poll IPMI for a response, before waiting for a tick).
264 alerts:
265 - name: ipmi_sensor_state
266 link: https://github.com/netdata/netdata/blob/master/health/health.d/ipmi.conf
@@ -81,9 +270,20 @@ modules:
270 folding:
271 title: Metrics
272 enabled: false
84 - description: ""
273 + description: |
274 + The plugin does a speed test when it starts, to find out the duration needed by the IPMI processor to respond. Depending on the speed of your IPMI processor, charts may need several seconds to show up on the dashboard.
275 availability: []
276 scopes:
277 + - name: global
278 + description: These metrics refer to the entire monitored application.
279 + labels: []
280 + metrics:
281 + - name: ipmi.sel
282 + description: IPMI Events
283 + unit: "events"
284 + chart_type: area
285 + dimensions:
286 + - name: events
287 - name: sensor
288 description: ""
289 labels:
@@ -94,12 +294,6 @@ modules:
294 - name: component
295 description: One of 25 recognized components (Processor, Peripheral).
296 metrics:
97 - - name: ipmi.sel
98 - description: IPMI Events
99 - unit: "events"
100 - chart_type: area
101 - dimensions:
102 - - name: events
297 - name: ipmi.sensor_state
298 description: IPMI Sensors State
299 unit: "state"