Ad Widget

Collapse

Monitoring MX records - trigger

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jdgs
    Junior Member
    • Feb 2016
    • 14

    #1

    Monitoring MX records - trigger

    Hoping someone can help me out with an issue I am having. Pretty new to Zabbix, I am very impressed by the possibilities it offers.

    We manage the mail systems for a number of clients, and depending on the situation, have management access of domain control panels. A situation has arisen a number of times where a third party web developer accesses the panel for a company, and decides to mess around with nameservers, or delete our MX records altogether.

    To combat this, I have set up items in Zabbix to poll client domain MX records every 12 hours.
    net.dns.record[8.8.8.8,domain.com,MX]
    This returns a text value, with the current MX records.

    I created a trigger attached to this item, which will alert if a change is detected.
    {Zabbix server:net.dns.record[8.8.8.8,domain.com,MX].change()}<>0
    However, a problem that I have noticed, is that for some domains where a primary and backup mail record exist, they seem to randomly return the other way around sometimes; for example on a domain that has two records, one priority 10 and one priority 90, on one check, Zabbix returns the 10 record first, on the next check it returns the 90 record first. This causes my trigger to fire as Zabbix has obviously detected that the result returned is not the same as the previous.

    I am wondering whether anyone could suggest a way I could get around this, or perhaps in the trigger some other method in order to achieve the correct alerting. I am not sure what causes it to return the records in a different order sometimes.

    Help much appreciated in advance!
  • jdgs
    Junior Member
    • Feb 2016
    • 14

    #2
    Anyone have any brainwaves on this?

    Comment

    • SBO
      Zabbix Certified Specialist
      Zabbix Certified Specialist
      • Sep 2015
      • 226

      #3
      Someone here had a similar problem, did you try this ?

      Comment

      • jdgs
        Junior Member
        • Feb 2016
        • 14

        #4
        Originally posted by SBO
        Someone here had a similar problem, did you try this ?
        Not sure how I didn't find that. Anyway, I tried this, but got the following response:

        sh: 1: dig: not found

        Comment

        • SBO
          Zabbix Certified Specialist
          Zabbix Certified Specialist
          • Sep 2015
          • 226

          #5
          Install dnsutils through yum or apt, depending of your linux distrib. It should install the dig binary

          Comment

          • jdgs
            Junior Member
            • Feb 2016
            • 14

            #6
            Originally posted by SBO
            Install dnsutils through yum or apt, depending of your linux distrib. It should install the dig binary
            Thank you so much, this looks like it has done the trick. I was not aware that a separate package was required.

            Comment

            Working...