VMware vSphere

 View Only
  • 1.  Monitoring DNS server with lookupname

    Posted Jan 23, 2009 03:27 PM
    Hi,
    I'm trying to monitor a DNS server and in particular a specific lookupname

    I've added a new platform service and it is talking to my DNS server ok.

    I understand that I need a match property to verify that the lookupname is available, however I don't know what my match property gets applied to.
    Am I looking for the lookupname in the response? Or am I looking for a specific token in the response? etc etc

    Ultimately I want to generate an alert if a particular DNS address is unavailable.

    I've looked through the docs & forum, but can't seem to find any info.
    Any help would be appreciated

    Regards
    Steve


  • 2.  RE: Monitoring DNS server with lookupname

    Posted Jan 23, 2009 07:16 PM
    Pattern is a value you expect to found from dns lookup answer. Record type (A,ANY,CNAME,MX,NS,TXT) is the querytype. What those types actually means, check this wiki page: http://en.wikipedia.org/wiki/List_of_DNS_record_types

    Remember that some query types are mostly related to domain names, not host names.

    And here's examples against google

    $ nslookup -querytype=A www.google.com
    Server: 10.11.0.5
    Address: 10.11.0.5#53

    Non-authoritative answer:
    www.google.com canonical name = www.l.google.com.
    Name: www.l.google.com
    Address: 209.85.135.99
    Name: www.l.google.com
    Address: 209.85.135.103
    Name: www.l.google.com
    Address: 209.85.135.104
    Name: www.l.google.com
    Address: 209.85.135.147
    ---------------------------------------------------------
    $ nslookup -querytype=ANY www.google.com
    Server: 10.11.0.5
    Address: 10.11.0.5#53

    Non-authoritative answer:
    www.google.com canonical name = www.l.google.com.

    Authoritative answers can be found from:
    www.l.google.com internet address = 209.85.135.103
    www.l.google.com internet address = 209.85.135.104
    www.l.google.com internet address = 209.85.135.147
    www.l.google.com internet address = 209.85.135.99

    ---------------------------------------------------------
    $ nslookup -querytype=CNAME google.com
    Server: 10.11.0.5
    Address: 10.11.0.5#53

    Non-authoritative answer:
    *** Can't find google.com: No answer

    Authoritative answers can be found from:
    google.com
    origin = ns1.google.com
    mail addr = dns-admin.google.com
    serial = 2009011501
    refresh = 7200
    retry = 1800
    expire = 1209600
    minimum = 300

    ---------------------------------------------------------
    $ nslookup -querytype=MX google.com
    Server: 10.11.0.5
    Address: 10.11.0.5#53

    Non-authoritative answer:
    google.com mail exchanger = 10 smtp2.google.com.
    google.com mail exchanger = 10 smtp3.google.com.
    google.com mail exchanger = 10 smtp4.google.com.
    google.com mail exchanger = 10 smtp1.google.com.

    Authoritative answers can be found from:
    smtp2.google.com internet address = 64.233.165.25
    smtp3.google.com internet address = 64.233.183.25
    smtp4.google.com internet address = 72.14.221.25
    smtp1.google.com internet address = 209.85.237.25

    ---------------------------------------------------------
    $ nslookup -querytype=NS google.com
    Server: 10.11.0.5
    Address: 10.11.0.5#53

    Non-authoritative answer:
    google.com nameserver = ns2.google.com.
    google.com nameserver = ns3.google.com.
    google.com nameserver = ns4.google.com.
    google.com nameserver = ns1.google.com.

    Authoritative answers can be found from:
    ns2.google.com internet address = 216.239.34.10
    ns3.google.com internet address = 216.239.36.10
    ns4.google.com internet address = 216.239.38.10
    ns1.google.com internet address = 216.239.32.10


    ---------------------------------------------------------
    $ nslookup -querytype=TXT www.google.com
    Server: 10.11.0.5
    Address: 10.11.0.5#53

    Non-authoritative answer:
    www.google.com canonical name = www.l.google.com.

    Authoritative answers can be found from:
    l.google.com
    origin = g.l.google.com
    mail addr = dns-admin.google.com
    serial = 1369708
    refresh = 900
    retry = 900
    expire = 1800
    minimum = 60


    --------

    Just pick your choice. Not sure what you actually want to check.


  • 3.  RE: Monitoring DNS server with lookupname

    Posted Jan 27, 2009 05:19 PM
    Thanks for your help.

    I want to check that a local DNS entry is actually resolvable.

    i.e. Testserver = 192.168.0.45
    I'd like Hyperic to periodically check that testserver resolves to 192.168.0.45

    So I've set the record type to A, as this returns the address only

    I take it that I need to write regex to parse the output of nslookup? Is that what Hyperic uses internally?

    Thanks again


  • 4.  RE: Monitoring DNS server with lookupname

    Posted Jan 28, 2009 02:26 AM
    Hi,

    so if you just set the option field pattern to 192.168.0.45 you should be fine.

    Cheers,
    Mirko


  • 5.  RE: Monitoring DNS server with lookupname

    Posted Jan 28, 2009 02:26 AM
    Hi,

    so if you just set the option field pattern to 192.168.0.45 you should be fine.

    Cheers,
    Mirko


  • 6.  RE: Monitoring DNS server with lookupname

    Posted Jan 28, 2009 11:16 AM
    Hi,

    I've added the IP address into the pattern field, but the service availability is still reporting at the warning level.

    I've checked that the name is still resolvable, and that the address is being returned by nslookup.

    Any ideas what could be wrong?

    Thanks again for your help