How to monitor DNS query response time

Hello comunity
I just discovered netdata and i want to use it to monitor the response time of BIND9 DNS servers I followed this linkhttps://blog.netdata.cloud/dns-query-response-time/ but “The DNS query response time” was not added to Netdata overview tab.
My configuration file is as follows

update_every: 10
jobs:
 - name: latency
   record_types:
    - A
    - AAAA
   domains:
    - google.com
    - github.com
    - reddit.com
    - netdata.cloud
   servers:
    - 8.8.8.8
    - 9.9.9.9
    - 1.1.1.1
    - 208.67.222.222
    - 94.140.14.14
    - 192.168.1.56.110

I use Centos7 and BIND9.16.42
Someone has an idea please

Hey, try debug mode.

1 Like

Hello ilyam thank you for your feedback.
This is the result of debugging

bash-4.2$ ./go.d.plugin -d -m dns_query
[ DEBUG ] main[main] main.go:115 plugin: name=go.d, version=v0.54.1
[ DEBUG ] main[main] main.go:117 current user: name=netdata, uid=497
[ INFO  ] main[main] main.go:121 env HTTP_PROXY '', HTTPS_PROXY '' (both upper and lower case are respected)
[ INFO  ] main[main] agent.go:140 instance is started
[ INFO  ] main[main] setup.go:43 loading config file
[ INFO  ] main[main] setup.go:51 looking for 'go.d.conf' in [/etc/netdata /usr/lib/netdata/conf.d]
[ INFO  ] main[main] setup.go:58 found '/usr/lib/netdata/conf.d/go.d.conf
[ INFO  ] main[main] setup.go:65 config successfully loaded
[ INFO  ] main[main] agent.go:144 using config: enabled 'true', default_run 'true', max_procs '0'
[ INFO  ] main[main] setup.go:70 loading modules
[ INFO  ] main[main] setup.go:89 enabled/registered modules: 1/79
[ INFO  ] main[main] setup.go:94 building discovery config
[ INFO  ] main[main] setup.go:141 looking for 'dns_query.conf' in [/etc/netdata/go.d /usr/lib/netdata/conf.d/go.d]
[ INFO  ] main[main] setup.go:157 found '/etc/netdata/go.d/dns_query.conf
[ INFO  ] main[main] setup.go:162 dummy/read/watch paths: 0/1/0
[ INFO  ] discovery[manager] manager.go:92 registered discoverers: [file discovery: [file reader]]
[ INFO  ] main[main] setup.go:176 looking for 'vnodes/' in [/etc/netdata /usr/lib/netdata/conf.d]
[ INFO  ] main[main] setup.go:188 found '/usr/lib/netdata/conf.d/vnodes' (0 vhosts)
[ INFO  ] discovery[manager] manager.go:97 instance is started
[ INFO  ] run[manager] run.go:32 instance is started
[ INFO  ] build[manager] build.go:117 instance is started
[ INFO  ] discovery[file manager] discovery.go:73 instance is started
[ INFO  ] discovery[file reader] read.go:41 instance is started
[ WARN  ] discovery[file reader] read.go:65 parse '/etc/netdata/go.d/dns_query.conf': unknown file format: '/etc/netdata/go.d/dns_query.conf'
[ INFO  ] discovery[file reader] read.go:42 instance is stopped
[ DEBUG ] run[manager] run.go:43 tick 0
[ DEBUG ] run[manager] run.go:43 tick 1
[ DEBUG ] run[manager] run.go:43 tick 2
[ DEBUG ] run[manager] run.go:43 tick 3
[ DEBUG ] run[manager] run.go:43 tick 4
[ DEBUG ] run[manager] run.go:43 tick 5
[ DEBUG ] run[manager] run.go:43 tick 6
[ DEBUG ] run[manager] run.go:43 tick 7
[ DEBUG ] run[manager] run.go:43 tick 8
[ DEBUG ] run[manager] run.go:43 tick 9
[ DEBUG ] run[manager] run.go:43 tick 10

Regards

There is a problem with YAML syntax in /etc/netdata/go.d/dns_query.conf. Can you show the exact content?

cat /etc/netdata/go.d/dns_query.conf

Hello

# netdata go.d.plugin configuration for dns_query
#
# This file is in YAML format. Generally the format is:
#
# name: value
#
# There are 2 sections:
#  - GLOBAL
#  - JOBS
#
#
# [ GLOBAL ]
# These variables set the defaults for all JOBs, however each JOB may define its own, overriding the defaults.
#
# The GLOBAL section format:
# param1: value1
# param2: value2
#
# Currently supported global parameters:
#  - update_every
#    Data collection frequency in seconds. Default: 1.
#
#  - autodetection_retry
#    Re-check interval in seconds. Attempts to start the job are made once every interval.
#    Zero means not to schedule re-check. Default: 0.
#
#  - priority
#    Priority is the relative priority of the charts as rendered on the web page,
#    lower numbers make the charts appear before the ones with higher numbers. Default: 70000.
#
#
# [ JOBS ]
# JOBS allow you to collect values from multiple sources.
# Each source will have its own set of charts.
#
# IMPORTANT:
#  - Parameter 'name' is mandatory.
#  - Jobs with the same name are mutually exclusive. Only one of them will be allowed running at any time.
#
# This allows autodetection to try several alternatives and pick the one that works.
# Any number of jobs is supported.
#
# The JOBS section format:
#
# jobs:
#   - name: job1
#     param1: value1
#     param2: value2
#
#   - name: job2
#     param1: value1
#     param2: value2
#
#   - name: job2
#     param1: value1
#
#
# [ List of JOB specific parameters ]:
#  - domains
#    Domain or subdomains to query. Module choose random domain from the list on every iteration.
#    Syntax:
#      domains: [python.org, golang.org, ruby-lang.org]
#
#  - servers
#    Servers to query.
#      servers: [8.8.8.8, 8.8.4.4]
#
#  - port
#    DNS server port.
#    Syntax:
#      port: 53
#
#  - network
#    Network protocol name. Available options: udp, tcp, tcp-tls. Default: udp.
#    Syntax:
#      network: udp
#
#  - record_types
#    Query record type. Available options: A, AAAA, CNAME, MX, NS, PTR, TXT, SOA, SPF, TXT, SRV. Default: A.
#    Syntax:
#      record_type:
#        - A
#        - AAAA
#
#  - timeout
#    Query read timeout.
#    Syntax:
#      timeout: 2
#
#
# [ JOB defaults ]:
#  port: 53
#  network: udp
#  record_type: A
#  timeout: 2
#  update_every: 5
#
#
# [ JOB mandatory parameters ]:
#  - name
#  - domains
#  - servers
#
# ------------------------------------------------MODULE-CONFIGURATION--------------------------------------------------

# update_every: 1
# autodetection_retry: 0
# priority: 70000

#jobs:
# - name: example
#    record_types:
#      - A
#   domains:
#     - google.com
#     - github.com
#     - reddit.com
#   servers:
#     - 8.8.8.8
#     - 8.8.4.4

update_every: 10
jobs:
 - name: latency
   record_types:
    - A
    - AAAA
   domains:
    - google.com
    - github.com
    - reddit.com
    - netdata.cloud
   servers:
    - 8.8.8.8
    - 9.9.9.9
    - 1.1.1.1
    - 208.67.222.222
    - 94.140.14.14
    - 192.168.1.56.110



try this: (apologies, edited)

update_every: 10
jobs:
  - name: latency
    record_types:
      - A
      - AAAA
    domains:
      - google.com
      - github.com
      - reddit.com
      - netdata.cloud
    servers:
      - 8.8.8.8
      - 9.9.9.9
      - 1.1.1.1
      - 208.67.222.222
      - 94.140.14.14
      - 192.168.1.56.110
2 Likes

Thank you Luis It works :slight_smile: