Closed gunhu closed 3 years ago
Hi @dennisstritzke, any chance to get it upstream? :)
We should get this upstream! Thanks for pinging.
A few things I am thinking about though:
user.Username
to be equal to root
, it might be more accurate to check user.Uid
to be equal to 0
as the user id seems to be hardcoded in the kernel. This should be more robust.ipsec statusall mytunnel
would indicate, if the current user is allowed / able to query the tunnel status. If this check fails, we would use sudo ipsec statusall mytunnel
.What do you think about that? Should move the exporter closer to a 1.0.0 release.
Feel free to share your impressions @dennisstritzke and if it's ok for you I will start to refactor the PR.
Sounds good to me. Will be happy to receive a PR for this. 😊
@dennisstritzke Hi, pushed and waiting for review :)
I created 6cd3829, which contains your work that I amended with a CHANGELOG entry and refactoring it for readability.
The change is included in the v0.4.0 release. @gunhu, thank you for your contribution.
Hello,
I would love to be able to run the ipsec prometheus exporter with unprivileged user:
Add this block to allow exporter user to retrieve metrics.