Munin:修订间差异
跳到导航
跳到搜索
此页面具有访问限制。如果您看见此消息,则说明您没有权限访问此页面。
(→設定) |
(→設定) |
||
第23行: | 第23行: | ||
html_strategy cgi | html_strategy cgi | ||
cgiurl_graph /munin-cgi/munin-cgi-graph | cgiurl_graph /munin-cgi/munin-cgi-graph | ||
</syntaxhighlight> | |||
另外是systemd的設定檔,包含了<code>/lib/systemd/system/munin-cgi-graph.service</code>: | |||
<syntaxhighlight lang="systemd"> | |||
# | |||
[Unit] | |||
Description=Munin CGI Graph FastCGI daemon | |||
After=remote-fs.target | |||
[Service] | |||
ExecStart=/usr/bin/spawn-fcgi -s /var/run/munin/fastcgi-graph.sock -P /var/run/munin/fastcgi-graph.pid -U www-data -u munin -g munin /usr/lib/munin/cgi/munin-cgi-graph | |||
PIDFile=/var/run/munin/fastcgi-graph.pid | |||
Restart=always | |||
RestartSec=1 | |||
Type=simple | |||
[Install] | |||
WantedBy=multi-user.target | |||
</syntaxhighlight> | </syntaxhighlight> | ||
2021年4月25日 (日) 21:44的版本
Munin是一套Perl撰写的监控软体。
安装
Munin目前已经算成熟,更新幅度不会太大,加上Ubuntu内的版本都还算够新[1],可以直接安装Ubuntu内的版本:
sudo apt install -y munin; sudo apt clean
节点只需要安装munin-node:
sudo apt install -y munin-node; sudo apt clean
设定
伺服器端的设定,先将Munin设定为CGI模式(事实上会是FastCGI模式),这需要修改/etc/munin/munin-conf.d/cgi.conf
:
graph_strategy cgi
html_strategy cgi
cgiurl_graph /munin-cgi/munin-cgi-graph
另外是systemd的设定档,包含了/lib/systemd/system/munin-cgi-graph.service
:
#
[Unit]
Description=Munin CGI Graph FastCGI daemon
After=remote-fs.target
[Service]
ExecStart=/usr/bin/spawn-fcgi -s /var/run/munin/fastcgi-graph.sock -P /var/run/munin/fastcgi-graph.pid -U www-data -u munin -g munin /usr/lib/munin/cgi/munin-cgi-graph
PIDFile=/var/run/munin/fastcgi-graph.pid
Restart=always
RestartSec=1
Type=simple
[Install]
WantedBy=multi-user.target
参考资料
- ↑ Ubuntu – Package Search Results -- munin. [2021-04-26] (English).
外部连结
- 官方网站 (英文)