Ad Widget

Collapse

Monitor number of failed Email Actions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TheCookieMonster
    Member
    • Jul 2017
    • 48

    #1

    Monitor number of failed Email Actions

    We keep having the problem that our Zabbix fails to send an email, and the issue is down to the email server returning 'Login denied'
    This is a bug in our email server which we are working on getting solved.
    But in the meantime, im wondering if there is a way of me tracking within zabbix how many actions are failing, and ideally graphing these out within zabbix.
    Does anyone have any suggestions?
  • Daywalker
    Junior Member
    • Nov 2018
    • 6

    #2
    My suggest solution would be to have a local postfix/exim/etc MTA on your Zabbix instance that the zabbix servers sends the mails to.
    this MTA keeps its own queue that can be monitored with a simple UserScript like so:

    For example we have the following UserParameters for our postfix MTA in place (i did not choose the item names...)
    UserParameter=postfix.mail.queue,mailq | grep -v "Mail queue is empty" | egrep -c '^[0-9A-Z]{10} '
    UserParameter=unix_mail.queue_hold,mailq | grep -v "Mail queue is empty" | egrep -c '^[0-9A-F]{10}[$!]'
    UserParameter=unix_mail.queue_active,mailq | grep -v "Mail queue is empty" | egrep -c '^[0-9A-F]{10}[*]'
    UserParameter=unix_mail.queue_deferred,mailq | grep -v "Mail queue is empty" | egrep -c '^[0-9A-F]{10}[^*]'

    Comment

    Working...