Skip to content
Snippets Groups Projects
Commit d79ea28f authored by Jan Philipp Timme's avatar Jan Philipp Timme
Browse files

Add Readme.md, fix broken line

parent bf4456cb
No related branches found
No related tags found
No related merge requests found
# check-mk-postfix-logstats
This is a fairly simple plugin for linux check_mk agents which parses your postfix logfile and returns a bunch of numbers.
# Installation
* Clone this repository into e.g. `/opt/check-mk-postfix-stats`.
* Edit the `settings.sh` (There is not much to do)
* Symlink `postfix-stats.sh` to `/usr/lib/check_mk_agent/plugins`
...@@ -81,8 +81,7 @@ mo_deferred=$( sed -n "$old_log_position","$new_log_position"p $LOGFILE ...@@ -81,8 +81,7 @@ mo_deferred=$( sed -n "$old_log_position","$new_log_position"p $LOGFILE
mo_deliverable=$( sed -n "$old_log_position","$new_log_position"p $LOGFILE | grep '\/smtp\[' | grep 'status=deliverable' | grep -v 'relay=127\.0\.0\.1\|relay=localhost\|relay=::1' | wc -l) mo_deliverable=$( sed -n "$old_log_position","$new_log_position"p $LOGFILE | grep '\/smtp\[' | grep 'status=deliverable' | grep -v 'relay=127\.0\.0\.1\|relay=localhost\|relay=::1' | wc -l)
mo_undeliverable=$( sed -n "$old_log_position","$new_log_position"p $LOGFILE | grep '\/smtp\[' | grep 'status=undeliverable' | grep -v 'relay=127\.0\.0\.1\|relay=localhost\|relay=::1' | wc -l) mo_undeliverable=$( sed -n "$old_log_position","$new_log_position"p $LOGFILE | grep '\/smtp\[' | grep 'status=undeliverable' | grep -v 'relay=127\.0\.0\.1\|relay=localhost\|relay=::1' | wc -l)
mo_bncd_total=$( sed -n "$old_log_position","$new_log_position"p $LOGFILE | grep '\/smtp\[' | grep 'status=bounced' | grep -v 'relay=127\.0\.0\.1\|relay=localhost\|relay=::1' | wc -l) mo_bncd_total=$( sed -n "$old_log_position","$new_log_position"p $LOGFILE | grep '\/smtp\[' | grep 'status=bounced' | grep -v 'relay=127\.0\.0\.1\|relay=localhost\|relay=::1' | wc -l)
mo_bncd_spam=$( sed -n "$old_log_position","$new_log_position"p $LOGFILE | grep '\/smtp\[' | grep 'status=bounced' | grep -i 'spam' | grep -v 'relay=127\.0\.0\.1\|relay=localhost\|relay=::1' | wc mo_bncd_spam=$( sed -n "$old_log_position","$new_log_position"p $LOGFILE | grep '\/smtp\[' | grep 'status=bounced' | grep -i 'spam' | grep -v 'relay=127\.0\.0\.1\|relay=localhost\|relay=::1' | wc -l)
-l)
mo_bncd_reputation=$( sed -n "$old_log_position","$new_log_position"p $LOGFILE | grep '\/smtp\[' | grep -i 'reputation' | grep -v 'relay=127\.0\.0\.1\|relay=localhost\|relay=::1' | wc -l) mo_bncd_reputation=$( sed -n "$old_log_position","$new_log_position"p $LOGFILE | grep '\/smtp\[' | grep -i 'reputation' | grep -v 'relay=127\.0\.0\.1\|relay=localhost\|relay=::1' | wc -l)
# Collect inbound email statistics # Collect inbound email statistics
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment