Ad Widget

Collapse

Problem with mail.queue.count.last Value as Displayed in Alert EMails

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rob9988
    Junior Member
    • May 2006
    • 10

    #1

    Problem with mail.queue.count.last Value as Displayed in Alert EMails

    We're currently having a great experience with Zabbix v1.1 to date, so thanks to the development team for creating such a great product.

    Unfortunately, we occasionally run into some interesting bugs/problems, and I have one that I can't solve. We are using Zabbix to monitor the total size and number of messages in our mail queue. The items and triggers work fine, but we have discovered that the value for one of the variables sent in the alert email when the trigger is activated is incorrect.

    Here's the message, as defined in the action:
    -------------------------------------------------------------------------------------------
    The queue on {HOSTNAME} is too large.

    # of emails in queue: {HOSTNAME:mail.queue.count.last(0)}
    Size of queue: {HOSTNAME:mail.queue.size.last(0)}
    --------------------------------------------------------------------------------------------

    The problem is that both mail.queue.count.last and mail.queue.size.last show the value of mail.queue.size.last in the alert email. When we look at the values and graphs for these items in the Zabbix interface, mail.queue.count.last shows the correct number of messages in the queue, and mail.queue.size.last shows the correct total size of the mail queue.

    Odd, don't you think? We're stumped. Any suggestions?

    Thanks,

    -Rob
  • rob9988
    Junior Member
    • May 2006
    • 10

    #2
    I obviously (!) forgot to post some information relating to my initial question. Here it is:

    UserParameter=mail.queue.count,ls -l /var/spool/mqueue | wc -l | cut -f1
    UserParameter=mail.queue.size,du -b /var/spool/mqueue | cut -f1

    Thanks,

    =-Rob

    Comment

    • gatrfan
      Junior Member
      • Nov 2006
      • 1

      #3
      Variables in notifications

      Got this working finally, wanted to monitor/graph inbound/outbound mail queues...works great! However, I am sending SMS notifications and it would be nice to have the actual VALUE available in the email message. How would I go about doing that?

      Thanks in advance.
      gatrfan

      Comment

      • Alexei
        Founder, CEO
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2004
        • 5654

        #4
        This should work:

        # of emails in queue: {{HOSTNAME}:mail.queue.count.last(0)}
        Size of queue: {{HOSTNAME}:mail.queue.size.last(0)}

        Not that there was a problem handling "recursive" macros in 1.1.2, so use different release.
        Alexei Vladishev
        Creator of Zabbix, Product manager
        New York | Tokyo | Riga
        My Twitter

        Comment

        Working...