-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Streamline README * Link to container imgages * Move privileges part to separate doc * Use absolute paths for `sudo` examples * Emphasize `sudo` only being needed for local metrics
- Loading branch information
Showing
6 changed files
with
102 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Privileges | ||
|
||
If you are running the exporter as unprivileged user, but need to execute the | ||
FreeIPMI tools as root (as is likely necessary to access the local IPMI | ||
interface), you can do the following: | ||
|
||
**NOTE:** Make sure to adapt all absolute paths to match your distro! | ||
|
||
1. Add sudoers files to permit the following commands | ||
``` | ||
ipmi-exporter ALL = NOPASSWD: /usr/sbin/ipmimonitoring,\ | ||
/usr/sbin/ipmi-sensors,\ | ||
/usr/sbin/ipmi-dcmi,\ | ||
/usr/sbin/ipmi-raw,\ | ||
/usr/sbin/bmc-info,\ | ||
/usr/sbin/ipmi-chassis,\ | ||
/usr/sbin/ipmi-sel | ||
``` | ||
2. In your module config, override the collector command with `sudo` for | ||
every collector you are using and add the actual command as custom | ||
argument. Example for the "ipmi" collector: | ||
```yaml | ||
collector_cmd: | ||
ipmi: /usr/bin/sudo | ||
custom_args: | ||
ipmi: | ||
- "/usr/sbin/ipmimonitoring" | ||
``` | ||
See also the [sudo example config](../ipmi_local_sudo.yml). | ||
Note that no elevated privileges are necessary for getting remote metrics. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Configuration file for ipmi_exporter | ||
|
||
# This is an example config for scraping the local host, using `sudo` to | ||
# elevate privileges for access to the IPMI interface. | ||
modules: | ||
default: | ||
# Available collectors are bmc, bmc-watchdog, ipmi, chassis, dcmi, sel, sel-events and sm-lan-mode | ||
collectors: | ||
- ipmi | ||
- sel | ||
# Got any sensors you don't care about? Add them here. | ||
exclude_sensor_ids: | ||
- 2 | ||
- 29 | ||
- 32 | ||
# Define custom metrics for SEL entries | ||
sel_events: | ||
- name: correctable_memory_error | ||
regex: Correctable memory error.* | ||
# USING ANY OF THE BELOW VOIDS YOUR WARRANTY! YOU MAY GET BITTEN BY SHARKS! | ||
# You can override the command to be executed for a collector. Paired with | ||
# custom_args, this can be used to e.g. execute the IPMI tools with sudo. | ||
# Must be added for every enabled collector. Adapt the path to match your | ||
# distro, and read `docs/privileges.md`! | ||
collector_cmd: | ||
ipmi: /usr/bin/sudo | ||
sel: /usr/bin/sudo | ||
custom_args: | ||
ipmi: | ||
- "/usr/sbin/ipmimonitoring" | ||
sel: | ||
- "/usr/sbin/ipmi-sel" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters