2015/4/29

Sendmail, Spamassassin, ClamAV statistics in cacti on CentOS 6 ver 1--draft

Draft...........................................until into work
still a draft,Might finish in one day
from:http://forums.cacti.net/about38434.html



Installation:

1) compile the source using:
Code:
gcc -o maillog_watcher maillog_watcher.c -lpthread

2) move the executable and the maillog_watcher_read.sh file to /opt/maillog_watcher/

3) add the following lines to your snmpd.conf
Code:
exec .1.3.6.1.4.100.2 maillog_received /opt/maillog_watcher/maillog_watcher_read.sh received
exec .1.3.6.1.4.100.4 maillog_sent /opt/maillog_watcher/maillog_watcher_read.sh sent
exec .1.3.6.1.4.100.5 maillog_virus /opt/maillog_watcher/maillog_watcher_read.sh virus
exec .1.3.6.1.4.100.6 maillog_spam /opt/maillog_watcher/maillog_watcher_read.sh spam
exec .1.3.6.1.4.100.7 maillog_rejected /opt/maillog_watcher/maillog_watcher_read.sh rejected
change to:
exec .1.3.6.1.4.100.2.101.1 maillog_received /opt/maillog_watcher/maillog_watcher_read.sh received
exec .1.3.6.1.4.100.4.101.1 maillog_sent /opt/maillog_watcher/maillog_watcher_read.sh sent
exec .1.3.6.1.4.100.5.101.1 maillog_virus /opt/maillog_watcher/maillog_watcher_read.sh virus
exec .1.3.6.1.4.100.6.101.1 maillog_spam /opt/maillog_watcher/maillog_watcher_read.sh spam
exec .1.3.6.1.4.100.7.101.1 maillog_rejected /opt/maillog_watcher/maillog_watcher_read.sh rejected



4) for logrotate to work, modify your /etc/logrotate.d/syslog file to send a HUP signal to maillog_watcher. mine looks like this:
Code:
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
    sharedscripts
    postrotate
        /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
        /bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
        /bin/kill -HUP `cat /var/run/maillog_watcher.pid 2> /dev/null` 2> /dev/null || true
    endscript
}

5) You can now start the maillog_watcher
Attachments:
File comment: maillog_watcher_read.sh file used to read the stats
maillog_watcher_read.sh [118 Bytes]
Downloaded 196 times
File comment: maillog_watcher source file
maillog_watcher.c [8.06 KiB]
Downloaded 209 times
File comment: maillog_watcher graph and data templates
cacti_graph_template_maillog_watcher.xml [41.22 KiB]
Downloaded 167 times






SNMP Get interface "End of MIB" ?

vi /etc/snmp/snmpd.conf
What I did was renaming the standard snmpd.conf to snmpd.conf.old
then creating a new one with only "rocommunity public <ip>"

another message about cacti:
http://tosian.blogspot.tw/2008/08/snmp-on-linux-server.html


沒有留言:

windows 無法拖動文件

原因:未知 症狀:windows點任何文件,都無法拖動到其他地方  解決方式: 來源: https://answers.microsoft.com/en-us/windows/forum/all/drag-and-drop-stopped-working/b73e4938-ca2...