New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IPMI Sensor plugin requires telegraf service to run as root #3332
Comments
I'm not very familiar with ipmi, I don't think I own any hardware that supports it, but it would be great if we could work out some improved documentation around setup. I think the device file needs to be assigned to a group and the group given, at least, read permissions. Something like:
If this does the job we could work on a udev rule to set it up on boot. |
chmoding didn't work, but your suggestion of a udev rule sent me off in the right direction. I found https://github.com/networkupstools/nut/tree/master/scripts/udev which gave me the idea to create
after changing |
@chrishoage Can you check if the group needs read and write 660 permissions or just read 640? |
@danielnelson I modified the udev rule to try both
|
I updated the ipmi_sensor README, can you take a look? I suggested placing the file into |
I moved my rule to I notice you have a tiny typo here: a179698#diff-379ee781bc500686e14753d1bc9756efR58 other than that the new docs look good. Thank you for your guidance in helping me solve this issue. Please feel free to close this issue at your own discretion. |
I fixed the typo, thanks |
I feel that this may not be super relevant to most people, but maybe it'll help another person is googling for the same problem I had: If you are on Ubuntu, and have the |
@antifuchs I have submitted a change request to the upstream OpenIPMI project to fix the init script issue on Ubuntu. The tiny patch is to change the test on line 80 of After this, the udev rule permissions changes are not overwritten by the init script. |
While adding the udev rule works, another option that would make sense is to run ipmitool as sudo, just like telegraf already does for smartctl. The plugin however does not offer such option. |
A |
Bug report
On Ubuntu
/dev/ipmi0
is owned byroot
The only way I've found to get
ipmitool sdr
(local ipmi) to work is to modify the telegraf.service user to beroot
on ubuntu.I've tried adding
telegraf
user to theroot
group. I've tried addingto my visudo file.
I'm really unsure how to get this to work with out having the service run telegraf as root.
Relevant telegraf.conf:
No other configuration
System info:
ipmitool version 1.8.16
Telegraf v1.4.2 (git: release-1.4 0cc5fc0)
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
Steps to reproduce:
Expected behavior:
IPMI to read sensor data
Actual behavior:
I have scoured the GHIs and the internet for how to solve this issue and have come up short.
How is this intended to be used?
The text was updated successfully, but these errors were encountered: