MUNIN zfs plugins require root access

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
gilthanaz
Site Admin
Posts: 444
Joined: Fri Aug 29, 2003 9:29 pm
Contact:

MUNIN zfs plugins require root access

Post by gilthanaz »

[Problem]
After linking two zfs plugins for munin, they could not be executed as the zfs and zpool commands require root priviledges. I checked out the scripts from https://github.com/munin-monitoring/con ... lugins/zfs and linked them as usual into the munin plugins directory:

Code: Select all

/etc/munin/plugins/zfs_cache_efficiency
/etc/share/munin/plugins/zfs_list
The munin user does not have enough privileges, tho:

Code: Select all

$ zpool status
Permission denied the ZFS utilities must be run as root.
[Solution]
The needed info needs to be configured in /etc/munin/plugin-conf.d/munin-node by adding:

Code: Select all

[zfs_list]
user root

[zfs_cache_efficiency]
user root
The plugins worked great after munin was aware that they need to be executed with root privileges and even offered more functionality than i was expecting, including data on how much space is used by snapshots and how good a cache device is used.
Post Reply