Collectd 无法在 centos 7.2 azure vm 上运行

Collectd 无法在 centos 7.2 azure vm 上运行

我在新的 Centos7.2 64 位上新安装了 collectd。我按照以下链接中的说明进行操作

https://devops.profitbricks.com/tutorials/how-to-install-and-configure-collectd-and-collectd-web-to-monitor-a-centos-7-server/

网页部分加载(只有橙色边框)时出现以下错误

root@tktestcollectd collectd-web]# Traceback (most recent call last):
  File "./runserver.py", line 24, in <module>
    main()
  File "./runserver.py", line 19, in main
    httpd = BaseHTTPServer.HTTPServer(("0.0.0.0", PORT), Handler)
  File "/usr/lib64/python2.7/SocketServer.py", line 419, in __init__
    self.server_bind()
  File "/usr/lib64/python2.7/BaseHTTPServer.py", line 108, in server_bind
    SocketServer.TCPServer.server_bind(self)
  File "/usr/lib64/python2.7/SocketServer.py", line 430, in server_bind
    self.socket.bind(self.server_address)
  File "/usr/lib64/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use

Can't locate CGI.pm in @INC (@INC contains: /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/local/collectd-web/cgi-bin/collection.modified.cgi line 23.
BEGIN failed--compilation aborted at /usr/local/collectd-web/cgi-bin/collection.modified.cgi line 23.

Can't locate CGI.pm in @INC (@INC contains: /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/local/collectd-web/cgi-bin/time.cgi line 24.
BEGIN failed--compilation aborted at /usr/local/collectd-web/cgi-bin/time.cgi line 24.**

答案1

需要添加yum install perl-CGI

https://www.sub-design.co.uk/wordpress/?p=774

相关内容