我曾经在几台服务器上使用过munin,这是第一次把我花这么多时间来设置它。
当我直接telnet munin时,我可以列出服务,日志和munin没有错误,每5分钟更新一次。 但是没有创buildhtml文件。 我使用的默认位置(/ var /caching/ munin / www),我可以确认该目录的权限设置为munin.munin
(IP和域已被更改)
munin.conf:
dbdir /var/lib/munin htmldir /var/cache/munin/www logdir /var/log/munin rundir /var/run/munin [example.ne.jp;] address 100.100.50.200
穆宁-node.conf:
log_level 4 log_file /var/log/munin/munin-node.log pid_file /var/run/munin/munin-node.pid background 1 setsid 1 user root group root host_name example.ne.jp allow ^127\.0\.0\.1$ allow ^100\.100\.50\.200$ allow ^::1$
/ etc / hosts:
100.100.50.200 example.ne.jp mail.example.ne.jp 127.0.0.1 localhost
$ telnet example.ne.jp 4949
Trying 100.100.50.200... Connected to example.ne.jp. Escape character is '^]'. # munin node at example.ne.jp list apache_accesses apache_processes apache_volume cpu cpuspeed df df_inode entropy fail2ban forks fw_packets if_err_eth0 if_err_eth1 if_eth0 if_eth1 interrupts ipmi_fans ipmi_power ipmi_temp irqstats load memory munin_stats mysql_bin_relay_log mysql_commands mysql_connections mysql_files_tables mysql_innodb_bpool mysql_innodb_bpool_act mysql_innodb_insert_buf mysql_innodb_io mysql_innodb_io_pend mysql_innodb_log mysql_innodb_rows mysql_innodb_semaphores mysql_innodb_tnx mysql_myisam_indexes mysql_network_traffic mysql_qcache mysql_qcache_mem mysql_replication mysql_select_types mysql_slow mysql_sorts mysql_table_locks mysql_tmp_tables ntp_2001:e40:100:208::123 ntp_91.189.94.4 ntp_kernel_err ntp_kernel_pll_freq ntp_kernel_pll_off ntp_offset ntp_states open_files open_inodes postfix_mailqueue postfix_mailvolume proc_pri processes swap threads uptime users vmstat fetch df _dev_sda3.value 2.1762874086869 _sys_fs_cgroup.value 0 _run.value 0.0503536980635825 _run_lock.value 0 _run_shm.value 0 _run_user.value 0 _dev_sda5.value 0.0176986285727571 _dev_sda8.value 1.08464646179852 _dev_sda7.value 0.0346633563514803 _dev_sda9.value 6.81031810822797 _dev_sda6.value 9.0932802215469 .
/var/log/munin/munin-node.log
Process Backgrounded 2014/08/16-14:13:36 Munin::Node::Server (type Net::Server::Fork) starting! pid(19610) Binding to TCP port 4949 on host 100.100.50.200 with IPv4 2014/08/16-14:23:11 CONNECT TCP Peer: "[100.100.50.200]:55949" Local: "[100.100.50.200]:4949" 2014/08/16-14:36:16 CONNECT TCP Peer: "[100.100.50.200]:56209" Local: "[100.100.50.200]:4949"
/var/log/munin/munin-update.log
... 2014/08/16 14:30:01 [INFO]: Starting munin-update 2014/08/16 14:30:01 [INFO]: Munin-update finished (0.00 sec) 2014/08/16 14:35:02 [INFO]: Starting munin-update 2014/08/16 14:35:02 [INFO]: Munin-update finished (0.00 sec) 2014/08/16 14:40:01 [INFO]: Starting munin-update 2014/08/16 14:40:01 [INFO]: Munin-update finished (0.00 sec)
$ ls -la / var / cache / munin / www /
drwxr-xr-x 3 munin munin 19 Aug 16 13:55 . drwxr-xr-x 3 root root 16 Aug 16 13:54 .. drwxr-xr-x 2 munin munin 4096 Aug 16 13:55 static
任何想法,为什么它不工作?
编辑
这是几天后/ var / log / munin / log的样子:
-rw-r----- 1 www-data 0 Aug 16 13:54 munin-cgi-graph.log -rw-r----- 1 www-data 0 Aug 16 13:54 munin-cgi-html.log -rw-rw-r-- 1 munin 0 Aug 16 13:55 munin-html.log -rw-r----- 1 munin 0 Aug 19 06:18 munin-limits.log -rw-r----- 1 munin 15K Aug 18 14:10 munin-limits.log.1 -rw-r----- 1 munin 1.8K Aug 18 06:15 munin-limits.log.2.gz -rw-rw-r-- 1 munin 1.3K Aug 17 06:15 munin-limits.log.3.gz -rw-r--r-- 1 root 6.5K Aug 16 13:55 munin-node-configure.log -rw-r--r-- 1 root 0 Aug 17 06:18 munin-node.log -rw-r--r-- 1 root 420 Aug 16 14:52 munin-node.log.1.gz -rw-r----- 1 munin 0 Aug 19 06:18 munin-update.log -rw-r----- 1 munin 11K Aug 18 14:10 munin-update.log.1 -rw-r----- 1 munin 1.6K Aug 18 06:15 munin-update.log.2.gz -rw-rw-r-- 1 munin 1.5K Aug 17 06:15 munin-update.log.3.gz
UPDATE
试图直接执行munin-cron或munin-html(su – munin –shell = / bin / bash),
$ perl /usr/share/munin/munin-html $ /usr/bin/munin-cron --debug
显示这个错误:
not a reference at /usr/share/perl5/Munin/Master/Utils.pm line 863.
主机名(或uname -n):(例如更改域)
example.ne.jp
根据: http : //www.mail-archive.com/[email protected]/msg1248923.html
这个bug也出现在其他distrib的新鲜安装上,似乎随机popup。
这通常是由于没有configuration节点,或者更确切地说是单个节点configuration不正确。
主节点和节点中的节点的命名configuration(通常在触发时都在同一个主机上)不匹配,
要更新我使用的图表:
su - munin --shell=/bin/bash test -x /usr/bin/munin-cron && /usr/bin/munin-cron
可能不是解决scheme,但值得尝试…
我解决了这个问题,但是我不能100%确定它的来源。 我尝试了许多事情,没有成功,带回错误。 我怀疑在那里挂着一枚“奥地利”进程。 服务器是生产服务器,所以我没有重新启动它。
这就是为什么我怀疑:当我遇到上述问题时,像往常一样重新启动munin“/etc/init.d/munin restart”或“service munin restart”以及“munin-node”。 我甚至清除并重新安装了munin,但问题依然存在。 就在几分钟前,我从其他服务器复制了所有的/ etc / munin目录(使用旧版本的munin),所以我在再次尝试之前杀死了所有“munin”进程。 重试后,慕尼正在没有问题地工作。 我认为这是configuration文件内的东西,但即使用前一个工作的munin目录replace它没有问题(在重新启动所有munin服务和删除任何munin进程后)。
简介:当服务器设置不正确时,我可能很快安装了munin。 在munin失败之后,有些进程可能正在运行,这阻碍了munin正常工作。 杀死所有的“munin”进程可能已经解决了这个问题。
在你的munin.conf ,在address 100.100.50.200下设置use_node_name yes (默认是no : http : use_node_name yes )。