Add how to execute as non root to README.md
https://github.com/soundcloud/ipmi_exporter/issues/32
This commit is contained in:
parent
3ec5c4f7f5
commit
d0b97919ac
26
README.md
26
README.md
|
@ -43,6 +43,32 @@ Make sure you have the following tools from the
|
|||
- `ipmi-dcmi`
|
||||
- `bmc-info`
|
||||
|
||||
|
||||
### How to run as non root
|
||||
|
||||
When running this exporter as non root, you should the followings.
|
||||
|
||||
1. add sudoers files to permit the above commands
|
||||
```bash
|
||||
ipmi-exporter ALL = NOPASSWD:/usr/sbin/ipmimonitoring, /usr/sbin/ipmi-sensors, /usr/sbin/ipmi-dcmi, /usr/sbin/bmc-info
|
||||
```
|
||||
2. create the script under user dir with execute permission
|
||||
```bash
|
||||
#!/bin/sh
|
||||
sudo /usr/sbin/$(basename $0) "$@"
|
||||
```
|
||||
3. create symlinks under user dir
|
||||
```bash
|
||||
ln -s /home/ipmi-exporter/[script name] /home/ipmi-exporter/ipmimonitoring
|
||||
ln -s /home/ipmi-exporter/[script name] /home/ipmi-exporter/ipmi-sensors
|
||||
ln -s /home/ipmi-exporter/[script name] /home/ipmi-exporter/ipmi-dcmi
|
||||
ln -s /home/ipmi-exporter/[script name] /home/ipmi-exporter/bmc-info
|
||||
````
|
||||
4. execute ipmi-exporter with the option
|
||||
```
|
||||
--freeipmi.path=/home/ipmi-exporter
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Simply scraping the standard `/metrics` endpoint will make the exporter emit
|
||||
|
|
Loading…
Reference in New Issue