Heloo

tested please attachment:-)

Perhaps it will work.
If not correct it.

Havrla




Dne 30.8.2015 01:29, hav...@lhotkanet.cz napsal(a):
Heloo

CENTOS7
clamd and spamd  not graf data

file: /usr/share/toaster/mrtg/qmailmrtg.cfg

BEFORE  (no data in graf):

Target[clamd]: \`/usr/bin/qmailmrtg C /var/log/qmail/clamd\`
Target[spamd]: \`/usr/bin/qmailmrtg S /var/log/qmail/spamd\`


AFTER (data in graf):

Target[clamd]: `GRP=\`date +"%b %d %H:%M" --date "- 10 min" | sed
"s/.$//"\` ; grep "$GRP" /var/log/clamd/clamd.log  | grep "FOUND" | wc -l
; grep "$GRP" /var/log/clamd/clamd.log |  grep -i "ERROR" | wc -l ; echo
"" ; echo ""`

Target[spamd]: `GRP=\`date +"%b %d %H:%M" --date "- 10 min" | sed
"s/.$//"\` ; grep "spamd:" /var/log/maillog | grep "$GRP" | grep "clean
message" | wc -l ; grep "spamd:" /var/log/maillog | grep "$GRP" | grep
"identified spam" | wc -l ; echo "" ; echo ""`



Havrla






Heloo

CENTOS7

remove "\" from  /usr/share/toaster/mrtg/qmailmrtg.cfg in  Target

before  ->  no graf
Target[messages]: \`/usr/bin/qmailmrtg m /var/log/qmail/send\`
etc...
errors:
2015-08-29 23:37:30: ERROR: Target[messages][_IN_] '\
$target->[0]{$mode} ' evaluated to 'REF(0x2dea310)' instead of a number
2015-08-29 23:37:30: ERROR: Target[messages][_OUT_] '\
$target->[0]{$mode} ' evaluated to 'REF(0x2e73460)' instead of a number

after -> graf OK
Target[messages]: `/usr/bin/qmailmrtg m /var/log/qmail/send`
etc...


Havrla

---------------------------------------------------------------------
To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com
For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com




---------------------------------------------------------------------
To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com
For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com


# config by Oden Eriksson <o...@d-srv.com>

Refresh: 600
Interval: 10
WriteExpires: Yes

# where to save the output.
WorkDir: /usr/share/toaster/htdocs/mrtg

#############################################################

Title[messages]: FQDN - Qmail (throughput)
MaxBytes[messages]: 10000
AbsMax[messages]: 20000
Options[messages]: gauge
Target[messages]: `/usr/bin/qmailmrtg m /var/log/qmail/send` 
PageTop[messages]: <font face=arial size=3><B>FQDN</B> - Qmail 
(throughput)</font><br>
ShortLegend[messages]: Messages
YLegend[messages]: Messages
Legend1[messages]: Total messages
LegendI[messages]: &nbsp;Deliveries:
LegendO[messages]: &nbsp;Attempts:
WithPeak[messages]: ymwd

#-------------------------------------------------------------------

Title[queue-size]: FQDN - Qmail (queue size)
MaxBytes[queue-size]: 10000
AbsMax[queue-size]: 100000
Options[queue-size]: gauge
Target[queue-size]: `/usr/bin/qmailmrtg q /var/qmail/queue`
PageTop[queue-size]: <font face=arial size=3><B>FQDN</B> - Qmail (queue 
size)</font><br>
ShortLegend[queue-size]: Messages
YLegend[queue-size]: Messages
Legend1[queue-size]: Messages
LegendI[queue-size]: &nbsp;Messages:
LegendO[queue-size]: &nbsp;Unprocessed Messages:
WithPeak[queue-size]: ymwd

#-------------------------------------------------------------------

Title[clamd]: FQDN - clamd
MaxBytes[clamd]: 10000
AbsMax[clamd]: 100000
Options[clamd]: gauge
Target[clamd]: `GRP=\`date +"%b %d %H:%M" --date "- 10 min" | sed "s/.$//"\` ; 
grep "$GRP" /var/log/clamd/clamd.log  | grep "FOUND" | wc -l ; grep "$GRP" 
/var/log/clamd/clamd.log |  grep -i "ERROR" |wc -l ; echo "" ; echo ""`
PageTop[clamd]: <font face=arial size=3><B>FQDN ClamAV</B></font><br>
ShortLegend[clamd]: Msg
YLegend[clamd]: Viruses
Legend1[clamd]: Total Viruses;
LegendI[clamd]: Found&nbsp;
LegendO[clamd]: Errors:&nbsp;
WithPeak[clamd]: ymwd

#-------------------------------------------------------------------

Title[spamd]: FQDN - spamd
MaxBytes[spamd]: 10000
AbsMax[spamd]: 100000
Options[spamd]: gauge
Target[spamd]: `GRP=\`date +"%b %d %H:%M" --date "- 10 min" | sed "s/.$//"\` ; 
grep "spamd:" /var/log/maillog | grep "$GRP" | grep "clean message" | wc -l ; 
grep "spamd:" /var/log/maillog | grep "$GRP" | grep "identified spam" | wc -l ; 
echo "" ; echo ""`
PageTop[spamd]: <font face=arial size=3><B>FQDN SpamAssassin</B></font><br>
ShortLegend[spamd]: Messages
YLegend[spamd]: Spam/hour
Legend1[spamd]: Total Spam;
LegendI[spamd]: Clean&nbsp;
LegendO[spamd]: Spam:&nbsp;
WithPeak[spamd]: ymwd

#-------------------------------------------------------------------

Title[concurrency]: FQDN - Qmail (concurrency)
MaxBytes[concurrency]: 500
AbsMax[concurrency]: 10000
Options[concurrency]: gauge
Target[concurrency]: `/usr/bin/qmailmrtg c /var/log/qmail/send`
PageTop[concurrency]: <font face=arial size=3><B>FQDN</B> - Qmail 
(concurrency)</font><br>
ShortLegend[concurrency]: Concurrency
YLegend[concurrency]: Concurrency
Legend1[concurrency]: Concurrency
LegendI[concurrency]: &nbsp;Local:
LegendO[concurrency]: &nbsp;Remote:
WithPeak[concurrency]: ymwd

#-------------------------------------------------------------------

Title[messstatus]: FQDN - Qmail (Success/Failures)
MaxBytes[messstatus]: 10000
AbsMax[messstatus]: 100000
Options[messstatus]: gauge
Target[messstatus]: `/usr/bin/qmailmrtg s /var/log/qmail/send`
PageTop[messstatus]: <font face=arial size=3><B>FQDN</B> - Qmail 
(Success/Failures)</font><br>
ShortLegend[messstatus]: Messages
YLegend[messstatus]: Messages
Legend1[messstatus]: Messages
LegendI[messstatus]: &nbsp;Success:
LegendO[messstatus]: &nbsp;Failures:
WithPeak[messstatus]: ymwd

#-------------------------------------------------------------------

Title[bytes]: FQDN - Qmail (Bytes Transfered)
MaxBytes[bytes]: 200000
AbsMax[bytes]: 10000000
Options[bytes]: gauge
Target[bytes]: `/usr/bin/qmailmrtg b /var/log/qmail/send`
PageTop[bytes]: <font face=arial size=3><B>FQDN</B> - Qmail (Bytes 
Transfered)</font><br>
ShortLegend[bytes]: kB
YLegend[bytes]: kB
Legend1[bytes]: kB
LegendI[bytes]: &nbsp;kB:
LegendO[bytes]: &nbsp;kB:
WithPeak[bytes]: ymwd

#-------------------------------------------------------------------

Title[smtp]: FQDN - Qmail (smtp concurrency)
MaxBytes[smtp]: 100
AbsMax[smtp]: 500
Options[smtp]: gauge
Target[smtp]: `/usr/bin/qmailmrtg t /var/log/qmail/smtp`
PageTop[smtp]: <font face=arial size=3><B>FQDN</B> - Qmail (smtp)</font><br>
ShortLegend[smtp]: smtp
YLegend[smtp]: smtp
Legend1[smtp]: smtp
LegendI[smtp]: &nbsp;smtp:
LegendO[smtp]: 
WithPeak[smtp]: ymwd

#-------------------------------------------------------------------

Title[smtpad]: FQDN - smtp (allow/deny)
MaxBytes[smtpad]: 1000
AbsMax[smtpad]: 10000
Options[smtpad]: gauge
Target[smtpad]: `/usr/bin/qmailmrtg a /var/log/qmail/smtp`
PageTop[smtpad]: <font face=arial size=3><B>FQDN</B> - smtp 
(allow/deny)</font><br>
ShortLegend[smtpad]: Smtp
YLegend[smtpad]: Smtp
Legend1[smtpad]: Smtp
LegendI[smtpad]: &nbsp;Allow:
LegendO[smtpad]: &nbsp;Deny:
WithPeak[smtpad]: ymwd

#-------------------------------------------------------------------

Title[pop3]: FQDN - Qmail (pop3)
MaxBytes[pop3]: 100
AbsMax[pop3]: 500
Options[pop3]: gauge
Target[pop3]: `NUM=\`/usr/bin/netstat -pnt | grep ":110" | wc -l\` ; echo $NUM 
; echo $NUM ; echo "" ; echo "" ` 
PageTop[pop3]: <font face=arial size=3><B>FQDN</B> - Qmail (pop3)</font><br>
ShortLegend[pop3]: pop3
YLegend[pop3]: pop3
Legend1[pop3]: pop3
LegendI[pop3]: &nbsp;pop3:
LegendO[pop3]: 
WithPeak[pop3]: ymwd

#-------------------------------------------------------------------

Title[pop3ad]: FQDN - pop3 (allow/deny)
MaxBytes[pop3ad]: 1000
AbsMax[pop3ad]: 10000
Options[pop3ad]: gauge
Target[pop3ad]: `GRP=\`date +"%b %d %H:%M" --date "- 10 min" | sed "s/.$//"\` ; 
grep "Info:" /var/log/dovecot.log | grep "$GRP" | grep pop3-login | grep 
"Login: user=" | grep -v ", TLS," | wc -l ; grep "Info:" /var/log/dovecot.log | 
grep "$GRP" | grep pop3-login | grep "Aborted login" | grep -v ", TLS," |  wc 
-l ; echo "" ; echo ""`
PageTop[pop3ad]: <font face=arial size=3><B>FQDN</B> - pop3 
(allow/deny)</font><br>
ShortLegend[pop3ad]: Pop3
YLegend[pop3ad]: Pop3
Legend1[pop3ad]: Pop3
LegendI[pop3ad]: &nbsp;Allow:
LegendO[pop3ad]: &nbsp;Deny:
WithPeak[pop3ad]: ymwd

#-------------------------------------------------------------------

Title[imap4]: FQDN - Qmail (imap4)
MaxBytes[imap4]: 100
AbsMax[imap4]: 500
Options[imap4]: gauge
Target[imap4]: `NUM=\`/usr/bin/netstat -pnt | grep ":143" | wc -l\` ; echo $NUM 
; echo $NUM ; echo "" ; echo "" `
PageTop[imap4]: <font face=arial size=3><B>FQDN</B> - Qmail (imap4)</font><br>
ShortLegend[imap4]: imap4
YLegend[imap4]: imap4
Legend1[imap4]: imap4
LegendI[imap4]: &nbsp;imap4:
LegendO[imap4]: 
WithPeak[imap4]: ymwd

#-------------------------------------------------------------------

Title[imap4ad]: FQDN - imap4 (allow/deny)
MaxBytes[imap4ad]: 1000
AbsMax[imap4ad]: 10000
Options[imap4ad]: gauge
Target[imap4ad]: `GRP=\`date +"%b %d %H:%M" --date "- 10 min" | sed "s/.$//"\` 
; grep "Info:" /var/log/dovecot.log | grep "$GRP" | grep imap-login | grep 
"Login: user=" | grep -v ", TLS," | wc -l ; grep "Info:" /var/log/dovecot.log | 
grep "$GRP" | grep imap-login | grep "Aborted login" | grep -v ", TLS," |  wc 
-l ; echo "" ; echo ""`
PageTop[imap4ad]: <font face=arial size=3><B>FQDN</B> - imap4 
(allow/deny)</font><br>
ShortLegend[imap4ad]: Imap4
YLegend[imap4ad]: Imap4
Legend1[imap4ad]: Imap4
LegendI[imap4ad]: &nbsp;Allow:
LegendO[imap4ad]: &nbsp;Deny:
WithPeak[imap4ad]: ymwd

#-------------------------------------------------------------------

Title[imap4-ssl]: FQDN - Qmail (imap4-ssl)
MaxBytes[imap4-ssl]: 100
AbsMax[imap4-ssl]: 500
Options[imap4-ssl]: gauge
Target[imap4-ssl]: `NUM=\`/usr/bin/netstat -pnt | grep ":993" | wc -l \` ; echo 
$NUM ; echo $NUM ; echo "" ; echo "" `
PageTop[imap4-ssl]: <font face=arial size=3><B>FQDN</B> - Qmail 
(imap4-ssl)</font><br>
ShortLegend[imap4-ssl]: imap4-ssl
YLegend[imap4-ssl]: imap4-ssl
Legend1[imap4-ssl]: imap4-ssl
LegendI[imap4-ssl]: &nbsp;imap4-ssl:
LegendO[imap4-ssl]: 
WithPeak[imap4-ssl]: ymwd

#-------------------------------------------------------------------

Title[imap4-sslad]: FQDN - imap4-ssl (allow/deny)
MaxBytes[imap4-sslad]: 1000
AbsMax[imap4-sslad]: 10000
Options[imap4-sslad]: gauge
Target[imap4-sslad]: `GRP=\`date +"%b %d %H:%M" --date "- 10 min" | sed 
"s/.$//"\` ; grep "Info:" /var/log/dovecot.log | grep "$GRP" | grep imap-login 
| grep "Login: user=" | grep ", TLS," | wc -l ; grep "Info:" 
/var/log/dovecot.log | grep "$GRP" | grep imap-login | grep "Aborted login" | 
grep ", TLS," |  wc -l ; echo "" ; echo ""`
PageTop[imap4-sslad]: <font face=arial size=3><B>FQDN</B> - imap4-ssl 
(allow/deny)</font><br>
ShortLegend[imap4-sslad]: Imap4-ssl
YLegend[imap4-sslad]: Imap4-ssl
Legend1[imap4-sslad]: Imap4-ssl
LegendI[imap4-sslad]: &nbsp;Allow:
LegendO[imap4-sslad]: &nbsp;Deny:
WithPeak[imap4-sslad]: ymwd

#-------------------------------------------------------------------

Title[pop3-ssl]: FQDN - Qmail (pop3-ssl)
MaxBytes[pop3-ssl]: 100
AbsMax[pop3-ssl]: 500
Options[pop3-ssl]: gauge
Target[pop3-ssl]: `NUM=\`/usr/bin/netstat -pnt | grep ":995" | wc -l \` ; echo 
$NUM ; echo $NUM ; echo "" ; echo "" `
PageTop[pop3-ssl]: <font face=arial size=3><B>FQDN</B> - Qmail 
(pop3-ssl)</font><br>
ShortLegend[pop3-ssl]: pop3-ssl
YLegend[pop3-ssl]: pop3-ssl
Legend1[pop3-ssl]: pop3-ssl
LegendI[pop3-ssl]: &nbsp;pop3-ssl:
LegendO[pop3-ssl]: 
WithPeak[pop3-ssl]: ymwd

#-------------------------------------------------------------------

Title[pop3-sslad]: FQDN - pop3-ssl (allow/deny)
MaxBytes[pop3-sslad]: 1000
AbsMax[pop3-sslad]: 10000
Options[pop3-sslad]: gauge
Target[pop3-sslad]: `GRP=\`date +"%b %d %H:%M" --date "- 10 min" | sed 
"s/.$//"\` ; grep "Info:" /var/log/dovecot.log | grep "$GRP" | grep pop3-login 
| grep "Login: user=" | grep ", TLS," | wc -l ; grep "Info:" 
/var/log/dovecot.log | grep "$GRP" | grep pop3-login | grep "Aborted login" | 
grep ", TLS," |  wc -l ; echo "" ; echo ""`
PageTop[pop3-sslad]: <font face=arial size=3><B>FQDN</B> - pop3-ssl 
(allow/deny)</font><br>
ShortLegend[pop3-sslad]: Pop3-ssl
YLegend[pop3-sslad]: Pop3-ssl
Legend1[pop3-sslad]: Pop3-ssl
LegendI[pop3-sslad]: &nbsp;Allow:
LegendO[pop3-sslad]: &nbsp;Deny:
WithPeak[pop3-sslad]: ymwd

---------------------------------------------------------------------
To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com
For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com

Reply via email to