殇帝刘玢你 发表于 2015-11-22 13:25:14

postfix_ mailserver 监控 for Cacti

  Details in http://forums.cacti.net/about6657.html
  1.下载 postfix_mailserver.tar.gz   
  http://forums.cacti.net/download.php?id=4091
  2.解压得到两个文件
  cacti_host_template_postfix_mailserver.xml
  fetch_mail_statistics.pl
  3.在cacti的机子上的Console 的Import Templates 中导入cacti_host_template_postfix_mailserver.xml保存
  4.在装有postfix的邮件服务器上fetch_mail_statistics.pl 的路径如下,请确保的执行权限
  -rwxr-xr-x1 root root 5531 Jun 21 17:36 /usr/local/bin/fetch_mail_statistics.pl
  5.安装net-snmp(在装有postfix的邮件服务器上)
  yum install net-snmp*
  6.编辑/etc/snmp/snmp.conf修改的地方如下
  #       sec.namesource          community
com2sec notConfigUser      ip       public   // ip为cacti主机的ip
  #       group          context sec.model sec.level prefix read   writenotif
accessnotConfigGroup ""      any       noauth    exactall none none         //none 改为all
  ##         incl/excl subtree                        mask
view all    included.1                               80         // 这一行的注释"#"去掉
  追加
  pass .1.3.6.1.4.1.2021.255 /usr/local/bin/fetch_mail_statistics.pl /var/log/mail.log /var/log/mailstats.db .1.3.6.1.4.1.2021.255
  保存 ,重起snmpd
  service snmpd restart
  7.然后在cacti 端添加 新的devices Host Template 请选择postfix mailserver
  8.常见问题 解决
  Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: .1.3.6.1.4.1.2021.255
  1.检查 iptables 是否允许snmp 数据包通过
  2.请关闭 selinux (RHEL   和centos 会出现这个问题)
  把 /etc/selinux/config改为
  SELINUX=disabled
  重起
  wish you good luck!
页: [1]
查看完整版本: postfix_ mailserver 监控 for Cacti