一、agent进程
[[email protected] mysql-mmm-2.2.1]# /etc/init.d/mysql-mmm-agent start
Daemon bin: ‘/usr/sbin/mmm_agentd‘ Daemon pid: ‘/var/run/mmm_agentd.pid‘ Starting MMM Agent daemon... Can‘t locate Proc/Daemon.pm in @INC (@INC contains: /root/perl5/lib/perl5/5.16.3/x86_64-linux-thread-multi /root/perl5/lib/perl5/5.16.3 /root/perl5/lib/perl5/x86_64-linux-thread-multi /root/perl5/lib/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/sbin/mmm_agentd line 7. BEGIN failed--compilation aborted at /usr/sbin/mmm_agentd line 7. failed
出现以上报错信息,可能是由于缺少环境变量导致服务启动失败。
解决方法
[[email protected] mysql-mmm-2.2.1]# cpan Proc::Daemon
[[email protected] mysql-mmm-2.2.1]# cpan Log::Log4perl
再次启动
[[email protected] mysql-mmm-2.2.1]# /etc/init.d/mysql-mmm-agent start Daemon bin: ‘/usr/sbin/mmm_agentd‘ Daemon pid: ‘/var/run/mmm_agentd.pid‘ Starting MMM Agent daemon... Ok
二、监控进程
[[email protected] ~]# /etc/init.d/mysql-mmm-monitor start
Daemon bin: ‘/usr/sbin/mmm_mond‘ Daemon pid: ‘/var/run/mmm_mond.pid‘ Starting MMM Monitor daemon: Can‘t locate Proc/Daemon.pm in @INC (@INC contains: /root/perl5/lib/perl5/5.16.3/x86_64-linux-thread-multi /root/perl5/lib/perl5/5.16.3 /root/perl5/lib/perl5/x86_64-linux-thread-multi /root/perl5/lib/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/sbin/mmm_mond line 11. BEGIN failed--compilation aborted at /usr/sbin/mmm_mond line 11. failed
解决方法:安装下列perl的库
[[email protected] ~]# cpan Proc::Daemon
[[email protected] ~]# cpan Log::Log4perl
再次启动
[[email protected] ~]# /etc/init.d/mysql-mmm-monitor start Daemon bin: ‘/usr/sbin/mmm_mond‘ Daemon pid: ‘/var/run/mmm_mond.pid‘ Starting MMM Monitor daemon: Ok
时间: 2024-11-13 16:24:57