根據LibreNMS官方網站的說明,使用RRDCache可以增強I/O的效能,Ops/sec 可以減少約30-40%
軟體需求:RRDTool 1.5.5以上(RRDTool 1.7安裝請參考這裡)
編輯/etc/librenms/config.php,新增下列內容
$config['rrdtool_version'] = '1.5.5';
建立/etc/systemd/system/rrdcached.service檔案並新增下列內容
備註:因為是自行編譯的RRDTool,所以路徑PIDFile=/run/rrdcached.pid改為PIDFile=/opt/rrdtool-1.7.0/var/run/rrdcached.pid
[Unit]
Description=Data caching daemon for rrdtool
After=network.service[Service]
Type=forking
PIDFile=/opt/rrdtool-1.7.0/var/run/rrdcached.pid
ExecStart=/usr/bin/rrdcached -w 1800 -z 1800 -f 3600 -s librenms -U librenms -G librenms -B -R -j /var/tmp -l unix:/run/rrdcached.sock -t 4 -F -b /opt/librenms/rrd/[Install]
啟動rrdcached
WantedBy=default.target
systemctl enable --now rrdcached.service
編輯/opt/librenms/config.php將下列一行的#移除
#$config['rrdcached'] = "unix:/var/run/rrdcached.sock";
不好意思,請教一下以下這兩行是怎麼產生的,我去找這個路踁都沒有看到也
回覆刪除PIDFile=/opt/rrdtool-1.7.0/var/run/rrdcached.pid
#$config['rrdcached'] = "unix:/var/run/rrdcached.sock";
rrdcached -l localhost
刪除