我正在使用MRTG来监视服务器上的CPU和网络统计信息。一切都很好...我无法使其工作的一件事是星号-我使用的脚本是在https://karlsbakk.net/asterisk/scripts/asterisk-mrtg
上找到的我已根据我的服务器信息进行了相应配置,然后使用mrtg继续在星号上生成并发调用的统计信息...但发生以下错误:
2020-03-04 10:34:36: WARNING: Could not get any data from external command '/etc/mrtg/bin/mrtgasterisk.pl -h localhost -1 SIP -2 IAX2'
Maybe the external command did not even start.
2020-03-04 10:34:36: WARNING: Problem with External get '/etc/mrtg/bin/mrtgasterisk.pl -h localhost -1 SIP -2 IAX2':
Expected a Number for 'in' but nothing'
2020-03-04 10:34:36: WARNING: Problem with External get '/etc/mrtg/bin/mrtgasterisk.pl -h localhost -1 SIP -2 IAX2':
Expected a Number for 'out' but nothing'
2020-03-04 10:34:36: ERROR: Target[asterisk][_IN_] ' $target->[2]{$mode} ' did not eval into defined data
2020-03-04 10:34:36: ERROR: Target[asterisk][_OUT_] ' $target->[2]{$mode} ' did not eval into defined data
有人曾经经历过并且能够解决它吗?
这是问题:
2020-03-04 10:34:36: WARNING: Could not get any data from external command '/etc/mrtg/bin/mrtgasterisk.pl -h localhost -1 SIP -2 IAX2'
您的脚本mrtgasterisk.pl
未正确完成。尝试从命令行以交互方式运行它,看看它是否输出任何有用的错误消息。可能是您给它提供了错误的参数,还是未安装所需的模块? MRTG只知道脚本运行不正常。