Ad Widget

Collapse

Linux DNS Server monitoring LLD (Bind 9.6.X and high,named)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Linux DNS Server monitoring LLD (Bind 9.6.X and high,named)

    Linux DNS Server (Bind 9.6.X and high,named) http://www.isc.org/software/bind

    I use bind util
    /usr/sbin/rndc stats
    This command write statistics in file /var/named/chroot/var/named/named.stats (run from zabbix_bind.9.6_stats.pl)
    Script /etc/zabbix/zabbix_bind.9.6_stats.pl write statistics for Zabbix in file /tmp/zabbix_named.stats.txt
    Per Zone Query Statistics via Zabbix Low Level Descovery (LLD) (bind option zone-statistics yes) which is only available in Zabbix 2.0 and high.

    Permissions on script /etc/zabbix/zabbix_bind.9.6_stats.pl
    Code:
    -rwsr-xr-x 1 root root 2791 Feb  5 17:43 zabbix_bind.9.6_stats.pl
    Install perl-suidperl rpm!!!!!

    Bind configuration:
    /var/named/chroot/etc/named.conf
    Code:
    options {
    ....
     statistics-file "/var/named/data/named.stats";
     zone-statistics yes;
    ....
    };
    named.stats format is
    Code:
    +++ Statistics Dump +++ (1359454981)
    ++ Incoming Requests ++
                27091010 QUERY
                       6 NOTIFY
                  147613 UPDATE
    ++ Incoming Queries ++
                21391676 A
                  170766 NS
                     571 CNAME
                   32702 SOA
                 2396687 PTR
                       1 HINFO
                 1892715 MX
                  527469 TXT
                       1 RP
                      10 AFSDB
                  497490 AAAA
                   13384 SRV
                       1 NAPTR
                   76700 A6
                       7 DS
                       1 SSHFP
                       7 NSEC
                       1 NSEC3PARAM
                       2 TYPE52
                   87131 SPF
                     564 AXFR
                    3123 ANY
                       1 Others
    ++ Outgoing Queries ++
    [View: default]
                 3538575 A
                   82311 NS
    ....
    zabbix_named.stats.txt format is
    Code:
    date: 1359454981 Tue Jan 29 14:23:01 2013
    Cache_DB_RRsets_View_default_A: 16929
    Cache_DB_RRsets_View_default_AAAA:      1084
    Cache_DB_RRsets_View_default_CNAME:     2195
    Cache_DB_RRsets_View_default_DLV:       3
    Cache_DB_RRsets_View_default_DNSKEY:    199
    Cache_DB_RRsets_View_default_DS:        267
    Cache_DB_RRsets_View_default_MX:        396
    Cache_DB_RRsets_View_default_NS:        13029
    Cache_DB_RRsets_View_default_NSEC:      1587
    Cache_DB_RRsets_View_default_NXDOMAIN:  2956
    Cache_DB_RRsets_View_default_PTR:       2184
    Cache_DB_RRsets_View_default_RRSIG:     2372
    Cache_DB_RRsets_View_default_SPF:       5
    Cache_DB_RRsets_View_default_SRV:       1
    Cache_DB_RRsets_View_default_TXT:       252
    Cache_DB_RRsets_View_default__A:        51
    Cache_DB_RRsets_View_default__AAAA:     12
    Cache_DB_RRsets_View_default__DLV:      18
    Cache_DB_RRsets_View_default__DS:       1607
    Cache_DB_RRsets_View_default__MX:       13
    Cache_DB_RRsets_View_default__NS:       1
    Cache_DB_RRsets_View_default__SPF:      236
    Cache_DB_RRsets_View_default__TXT:      170
    Incoming_Queries_A:     21391676
    Incoming_Queries_A6:    76700
    Incoming_Queries_AAAA:  497490
    Incoming_Queries_AFSDB: 10
    Zabbix_agent configuration:
    /etc/zabbix/zabbix_agentd.conf
    Code:
    Timeout=30
    ## Named monitoring
    UserParameter=named_stat,/etc/zabbix/zabbix_bind.9.6_stats.pl
    UserParameter=named_lld,/etc/zabbix/zabbix_bind.9.6_stats.pl lld
    UserParameter=named[*],egrep -i "$1:" /tmp/zabbix_named.stats.txt|sed 's/.*:\t//'
    UserParameter=named_udp,netstat -nua | grep :53 | wc -l
    UserParameter=named_tcp,netstat -nta | grep :53 | wc -l
    ## End Named monitoring
    P.S. For Linux DNS Server (Bind < 9.6.X) see
    https://www.zabbix.com/forum/showthread.php?t=20550
    7.02.2013 Update template and script.
    18.02.2013 Cache DB RRsets graph is changed.
    Attached Files
    Last edited by dima_dm; 25-02-2013, 09:24. Reason: 7.06.2013 Update template and script.

    #2
    7.02.2013 Update template and script.
    Last edited by dima_dm; 25-02-2013, 09:24.

    Comment


      #3
      18.02.2013
      Cache DB RRsets graph is changed.
      Cache DB RRsets is a number records in DNS cache database, I mistakenly thought that is number requests to DNS cache database.
      I can’t find any description named.stats file for Bind 9.6 and high. Has anyone seen such description?
      Last edited by dima_dm; 25-02-2013, 09:25.

      Comment


        #4
        Help

        Hello dima_dm!

        the values in my graph are not the same of the zabbix_named.stats.txt

        why?
        Last edited by SrTunes; 13-03-2013, 21:00.

        Comment


          #5
          See configuration of items. Store value can be As is, Delta (speed per second), Delta(simple change). In the last 2 case, you can see this effect.

          Comment


            #6
            Thanks

            Originally posted by dima_dm View Post
            See configuration of items. Store value can be As is, Delta (speed per second), Delta(simple change). In the last 2 case, you can see this effect.
            Yes, the configurations of my itens are diferents! Thank you for help!

            Comment


              #7
              perl error

              Can't modify concatenation (.) or string in scalar assignment at zabbix_bind.9.6_stats.pl line 8, near "'/var/named/chroot/var/named/data/named.stats';"
              Execution of zabbix_bind.9.6_stats.pl aborted due to compilation errors.

              Comment


                #8
                RTT can't be graph

                where I find this scripts, and used it ,all graph found except RTT,
                anyone same?

                Comment


                  #9
                  Date field is error on zabbix_named.stats.txt when I run the script on solaris 10.

                  Date field is error on zabbix_named.stats.txt when I run the script on solaris 10.

                  # more /tmp/zabbix_named.stats.txt
                  date: 0 Thu Jan 1 08:00:00 1970


                  how to fix it?
                  thanks.

                  More information: http://stackoverflow.com/questions/2...-pl-on-solaris
                  Originally posted by dima_dm View Post
                  7.02.2013 Update template and script.
                  Last edited by Klinton; 22-09-2014, 09:27. Reason: add more information

                  Comment


                    #10
                    1) Check path to named stat file
                    my $stats='/var/named/chroot/var/named/data/named.stats'
                    2) Check, that size оf one statistics sample < $data in Byte.
                    my $data=10000

                    Comment


                      #11
                      The graphs no displaying any data

                      i am running BIND 9.6-ESV-R11-P3, i have the scrips and uploaded the XML file. the script is giving results every 5 minute but on zabbix it is sowing no data? what could it be that i have missed ?

                      Comment

                      Announcement

                      Collapse
                      No announcement yet.
                      Working...
                      X