Ad Widget

Collapse

Complete recipe for monitoring DNS and NTP on your Network

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #31
    Sorry, I misread your message. Please ignore my post!
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • OneLoveAmaru
      Member
      • Jan 2008
      • 41

      #32
      No worries. When I get time I will throw my version up on the WIKI as well.

      Comment

      • Tenzer
        Senior Member
        • Nov 2007
        • 316

        #33
        Originally posted by OneLoveAmaru
        If anyone is interested in how I did it, I think my way is better than all of these other ways...
        [...]
        Questions comments, I'm here.
        Ehm, how is your "way" different from what I proposed in my previous post?

        The only difference I can see, is in the end where you write:
        PHP Code:
        if($failed)
        {
        $val 1;
        } else {
        $val 0;
        }
        echo 
        $val."\n"
        Instead of my approach:
        PHP Code:
        if($failed
        {
        echo 
        "0\n";
        } else {
        echo 
        "1\n";

        The switching of 0/1 doesn't make any difference in how the script works. In my experience most of the default items in Zabbix return 0 when something is wrong.

        And the fact that you have attached a template for the item, doesn't really make any difference in my opinion, as it is very easy to just create one item, and then a trigger which acts upon the value of the item.

        Comment

        • OneLoveAmaru
          Member
          • Jan 2008
          • 41

          #34
          Originally posted by Tenzer
          Ehm, how is your "way" different from what I proposed in my previous post?

          The only difference I can see, is in the end where you write:
          PHP Code:
          if($failed)
          {
          $val 1;
          } else {
          $val 0;
          }
          echo 
          $val."\n"
          Instead of my approach:
          PHP Code:
          if($failed
          {
          echo 
          "0\n";
          } else {
          echo 
          "1\n";

          The switching of 0/1 doesn't make any difference in how the script works. In my experience most of the default items in Zabbix return 0 when something is wrong.

          And the fact that you have attached a template for the item, doesn't really make any difference in my opinion, as it is very easy to just create one item, and then a trigger which acts upon the value of the item.
          Any difference to what? It may be very easy for you to create one item and a trigger for it to act upon but I followed tokind's directions to the T and it did not work for me. I tried implementing your script to work with his trigger, which he did not provide instructions on how to create the item, which I alerted him to. Still, the "Complete Recipe..." did not work for me, for whatever reason, with or without your script.

          For the other people like myself who tried following this thread to get DNS monitoring working and for whatever reason it won't work for them, instead of them scratching their heads, I give them an alternative which they can follow and hopefully avoid the hours of playing I had to do, to get it working. My instructions are for the people who are not great at code but still need to get DNS monitoring working with zabbix.

          So if you meant no difference in the script, yes, I apologize, the guy I had look at it said that he changed the code around a lot, which is why I did not give you props and I also failed to compare the code when he was done.

          But if you meant no difference in the information that I gave to set up DNS monitoring, I beg to differ as mine has the zabbix agent code, items and triggers which are unique to this thread, like your script was unique to tokind's original script.

          Thank you for your php script, I'm sure people will appreciate it.

          Comment

          • Tenzer
            Senior Member
            • Nov 2007
            • 316

            #35
            Well, it was the "I think my way is better than all of these other ways" I was wondering about, as I couldn't see any other differences code-wise than the one mentioned, and that didn't make any difference on how well the script checked DNS servers.

            I think that your choice of wording is wrong, compared to what you made different from the original post, but that may just be me...

            Comment

            • OneLoveAmaru
              Member
              • Jan 2008
              • 41

              #36
              Originally posted by Tenzer
              Well, it was the "I think my way is better than all of these other ways" I was wondering about, as I couldn't see any other differences code-wise than the one mentioned, and that didn't make any difference on how well the script checked DNS servers.

              I think that your choice of wording is wrong, compared to what you made different from the original post, but that may just be me...
              "Wrong" would be understandable if my words read "I think my SCRIPT is better than all of these other ways". But my words did not say nor read that way.

              Since you focused only on the code in your script and not the completely different and unique code from the zabbix_agentd.conf, items and triggers, it's understandable on how you formed that opinion.

              The code contained in the template, no matter how easy or hard you say they are to write, is found no where else on this entire forum but in my post.

              To me the differences contained in my post are enough to warrant saying "..my way is better..", since the way the zabbix server and zabbix agent communicate with your script is completely different than any code contained before then.

              Comment

              Working...