dnsmasq

package
v0.0.0-...-6ade924 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

README

Dnsmasq DNS Forwarder

Dnsmasq is a lightweight, easy to configure DNS forwarder, designed to provide DNS (and optionally DHCP and TFTP) services to a small-scale network.

This module monitors one or more Dnsmasq DNS Forwarder instances, depending on your configuration.

It collects DNS cache statistics by reading the response on the following query:

;; opcode: QUERY, status: NOERROR, id: 37862
;; flags: rd; QUERY: 7, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;cachesize.bind.   CH	 TXT
;insertions.bind.  CH	 TXT
;evictions.bind.   CH	 TXT
;hits.bind.        CH	 TXT
;misses.bind.      CH	 TXT
;servers.bind.     CH	 TXT

Metrics

All metrics have "dnsmasq." prefix.

Metric Scope Dimensions Units
servers_queries global success, failed queries/s
cache_size global size entries
cache_operations global insertions, evictions operations/s
cache_performance global hist, misses events/s

Configuration

Edit the go.d/dnsmasq.conf configuration file using edit-config from the Netdata config directory, which is typically at /etc/netdata.

cd /etc/netdata # Replace this path with your Netdata config directory
sudo ./edit-config go.d/dnsmasq.conf

Needs only address, here is an example with two jobs:

jobs:
  - name: local
    address: '127.0.0.1:53'

  - name: remote
    address: '203.0.113.0:53'

For all available options, see the dnsmasq collector's configuration file.

Troubleshooting

To troubleshoot issues with the dnsmasq collector, run the go.d.plugin with the debug option enabled. The output should give you clues as to why the collector isn't working.

  • Navigate to the plugins.d directory, usually at /usr/libexec/netdata/plugins.d/. If that's not the case on your system, open netdata.conf and look for the plugins setting under [directories].

    cd /usr/libexec/netdata/plugins.d/
    
  • Switch to the netdata user.

    sudo -u netdata -s
    
  • Run the go.d.plugin to debug the collector:

    ./go.d.plugin -d -m dnsmasq
    

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Protocol string       `yaml:"protocol"`
	Address  string       `yaml:"address"`
	Timeout  web.Duration `yaml:"timeout"`
}

type Dnsmasq

type Dnsmasq struct {
	module.Base
	Config `yaml:",inline"`
	// contains filtered or unexported fields
}

func New

func New() *Dnsmasq

func (*Dnsmasq) Charts

func (d *Dnsmasq) Charts() *module.Charts

func (*Dnsmasq) Check

func (d *Dnsmasq) Check() bool

func (Dnsmasq) Cleanup

func (Dnsmasq) Cleanup()

func (*Dnsmasq) Collect

func (d *Dnsmasq) Collect() map[string]int64

func (*Dnsmasq) Init

func (d *Dnsmasq) Init() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL