Commit 45eb59d
Fix ethtool returning 0 for sanitized metrics (#3335)
The ethtool_linux looks for ethtool stats with their sanitized name
which might be different from the name provisioned by ethtool.
This caused node-exporter to return a 0-value for sanitized metrics.
This patch works-around the missing key by copying ethtool stats
to another map under their sanitized name.
Signed-off-by: Guillaume Espanel <[email protected]>
Co-authored-by: Guillaume Espanel <[email protected]>1 parent 67ebd4c commit 45eb59d
File tree
3 files changed
+9
-1
lines changed- collector
- fixtures/ethtool/eth0
3 files changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
| 456 | + | |
456 | 457 | | |
457 | 458 | | |
458 | 459 | | |
| |||
467 | 468 | | |
468 | 469 | | |
469 | 470 | | |
| 471 | + | |
| 472 | + | |
470 | 473 | | |
471 | 474 | | |
472 | 475 | | |
| |||
484 | 487 | | |
485 | 488 | | |
486 | 489 | | |
487 | | - | |
| 490 | + | |
488 | 491 | | |
489 | 492 | | |
490 | 493 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| 272 | + | |
272 | 273 | | |
273 | 274 | | |
274 | 275 | | |
| |||
292 | 293 | | |
293 | 294 | | |
294 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
295 | 299 | | |
296 | 300 | | |
297 | 301 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
0 commit comments