Ad Widget

Collapse

Zabbix ZFS discovery with advanced features for Debian

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Babak
    Junior Member
    • Sep 2022
    • 2

    #1

    Zabbix ZFS discovery with advanced features for Debian

    Hi,

    I modified the template and configuration to provide a better overview and triggers for ZFS, inspired by pbergdolt. Also, I created another template for Proxmox storage, mostly using the 'pvesm' command to extract the necessary information and segregate it for ZFS and non-ZFS storages. Since it works great on all of my servers, I thought I'd share it with you.

    below is my zabbix agent config

    AllowKey=system.run[*]
    LogRemoteCommands=1
    Server=my zabbix server IP
    ListenPort=10050
    ListenIP=yourdeviceip
    ServerActive=my zabbix server IP



    1. you need to install sudo if you dont have it yet and then run 'visudo' and add below lines under the user privilege section

    zabbix ALL=(root) NOPASSWD: /sbin/zpool
    zabbix ALL=(root) NOPASSWD: /sbin/zfs​
    zabbix ALL=(root) NOPASSWD: /sbin/pvesm
    zabbix ALL=(ALL) NOPASSWD: /usr/sbin/pvesm
    zabbix ALL=(ALL) NOPASSWD: /usr/local/bin/proxmox_storage_discovery.sh
    zabbix ALL=(ALL) NOPASSWD: /usr/local/bin/proxmox_storage_metric.sh​

    2. import both Template App ZFS.yaml and Proxmox Storage Zabbix Agent.yaml file to your zabbix server
    3. copy both template-app-zfs.conf and proxmox-storage-zabbix-agent.conf to your client zabbix agent directory (/etc/zabbix/zabbix_agentd.conf.d/). note that by default the agent has the 'Include=/etc/zabbix/zabbix_agentd.conf.d/*.conf' on its config file.
    4. copy both proxmox_storage_discovery.sh and proxmox_storage_metric.sh to /usr/local/bin/
    5. run chmod +x /usr/local/bin/proxmox_storage_metric.sh and chmod +x /usr/local/bin/proxmox_storage_discovery.sh
    6. systemctl restart zabbix-agent.service
    7. bind the templates to your server on Zabbix Server to start the discovery and get the info.

    Enjoy it​
    Attached Files
Working...