使用者工具

網站工具


tech:librenms:zfs_agent

差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

tech:librenms:zfs_agent [2020/08/02 01:08] (目前版本)
jonathan_tsai 建立
行 1: 行 1:
 +====== 安裝 ZFS Agent 的方式 ======
 +  * 返回 [[tech:​librenms]]
  
 +  * 這是 SNMP Extend
 +
 +  * 至被監控主機內安裝 <code sh>
 +wget https://​github.com/​librenms/​librenms-agent/​raw/​master/​snmp/​zfs-linux -O /​etc/​snmp/​zfs-linux
 +chmod +x /​etc/​snmp/​zfs-linux
 +</​code>​
 +  * 確認 zfs-linux 可以正確執行<​code sh>
 +/​etc/​snmp/​zfs-linux</​code>​ 如果正確執行應該可以看到類似的訊息<​xtermrtf>​
 +{"​deleted":​ 3118645, "​evict_skip":​ 1717, "​mutex_skip":​ 39, "​recycle_miss":​ 0, "​arc_size":​ 3474542792, "​target_size_max":​ 4095481856, "​target_size_min":​ 255967616, "​target_size":​ 3652029952, "​target_size_per":​ 89.17216777922408,​ "​arc_size_per":​ 84.83843694508604,​ "​target_size_arat":​ 0.8917216777922408,​ "​min_size_per":​ 6.25, "​mfu_size":​ 3002022308, "​p":​ 650007644, "​rec_used_per":​ 17.798529928376666,​ "​freq_used_per":​ 82.20147007162333,​ "​arc_hits":​ 431761123, "​arc_misses":​ 1787270, "​demand_data_hits":​ 120007984, "​demand_data_misses":​ 305265, "​demand_meta_hits":​ 309237991, "​demand_meta_misses":​ 1285852, "​mfu_ghost_hits":​ 430107, "​mfu_hits":​ 376894138, "​mru_ghost_hits":​ 272204, "​mru_hits":​ 53057794, "​pre_data_hits":​ 435112, "​pre_data_misses":​ 107684, "​pre_meta_hits":​ 2080036, "​pre_meta_misses":​ 2080036, "​anon_hits":​ 1106880, "​arc_accesses_total":​ 433548393, "​demand_data_total":​ 120313249, "​pre_data_total":​ 542796, "​real_hits":​ 429951932, "​cache_hits_per":​ 99.5877576693036,​ "​cache_miss_per":​ 0.4122423306964028,​ "​actual_hit_per":​ 99.17045915564032,​ "​data_demand_per":​ 99.74627482630778,​ "​data_pre_per":​ 80.16123921325877,​ "​anon_hits_per":​ 0.25636398022802065,​ "​mru_per":​ 12.288691865385944,​ "​mfu_per":​ 87.292282218749,​ "​mru_ghost_per":​ 0.06304504632298726,​ "​mfu_ghost_per":​ 0.09961688931404784,​ "​demand_hits_per":​ 27.794995335881595,​ "​pre_hits_per":​ 0.10077609511868904,​ "​meta_hits_per":​ 71.62247236419199,​ "​pre_meta_hits_per":​ 71.62247236419199,​ "​demand_misses_per":​ 17.07995993890123,​ "​pre_misses_per":​ 6.0250549721082995,​ "​meta_misses_per":​ 71.94503348682628,​ "​pre_meta_misses_per":​ 4.9499516021641945,​ "​pools":​ [{"​name":​ "​local-zfs",​ "​size":​ "​62277025792",​ "​alloc":​ "​53508251648",​ "​free":​ "​8768774144",​ "​ckpoint":​ 0, "​expandsz":​ 0, "​frag":​ "​44",​ "​cap":​ "​85",​ "​dedup":​ "​1.00",​ "​health":​ "​ONLINE",​ "​altroot":​ "​-"​},​ {"​name":​ "​pbs-zpool",​ "​size":​ "​996432412672",​ "​alloc":​ "​217580453888",​ "​free":​ "​778851958784",​ "​ckpoint":​ 0, "​expandsz":​ 0, "​frag":​ "​1",​ "​cap":​ "​21",​ "​dedup":​ "​1.00",​ "​health":​ "​ONLINE",​ "​altroot":​ "​-"​},​ {"​name":​ "​rpool",​ "​size":​ "​253403070464",​ "​alloc":​ "​1714081792",​ "​free":​ "​251688988672",​ "​ckpoint":​ 0, "​expandsz":​ 0, "​frag":​ "​1",​ "​cap":​ "​0",​ "​dedup":​ "​1.00",​ "​health":​ "​ONLINE",​ "​altroot":​ "​-"​}]}
 +</​xtermrtf>​
 +  * 修改 sudoers 設定<​code>​
 +vi /​etc/​sudoers</​code><​file>​
 +:
 +# Cmnd alias specification
 +Debian-snmp ​    ​ALL=(ALL) NOPASSWD: /​etc/​snmp/​zfs-linux
 +:
 +</​file>​
 +  * 修改 snmpd 設定<​code>​
 +vi /​etc/​snmp/​snmpd.conf</​code><​file>​
 +:
 +extend zfs /​usr/​bin/​sudo /​etc/​snmp/​zfs-linux
 +</​file>​重新啟動 snmpd <code sh>
 +systemctl restart snmpd
 +</​code>​
 +
 +===== 參考網址 =====
 +  * https://​docs.librenms.org/​Extensions/​Applications/#​zfs
 +
 +{{tag>​librenms agent snmp_ext}}
tech/librenms/zfs_agent.txt · 上一次變更: 2020/08/02 01:08 由 jonathan_tsai