The dnsmasq_exporter_config block configures the dnsmasq_exporter integration, which is an embedded version of dnsmasq_exporter. This allows for the collection of metrics from dnsmasq servers.

    Note that currently, an Agent can only collect metrics from a single dnsmasq server. If you want to collect metrics from multiple servers, you can run multiple Agents and add labels using relabel_configs to differentiate between the servers:

    1. dnsmasq_exporter:
    2. enabled: true
    3. dnsmasq_address: dnsmasq-a:53
    4. relabel_configs:
    5. - source_labels: [__address__]
    6. target_label: instance
    7. replacement: dnsmasq-a

    Full reference of options:

    1. # Enables the dnsmasq_exporter integration, allowing the Agent to automatically
    2. # collect system metrics from the configured dnsmasq server address
    3. [enabled: <boolean> | default = false]
    4. # Sets an explicit value for the instance label when the integration is
    5. # self-scraped. Overrides inferred values.
    6. #
    7. # The default value for this integration is inferred from the dnsmasq_address
    8. # value.
    9. [instance: <string>]
    10. # Automatically collect metrics from this integration. If disabled,
    11. # the dnsmasq_exporter integration will be run but not scraped and thus not
    12. # remote-written. Metrics for the integration will be exposed at
    13. # /integrations/dnsmasq_exporter/metrics and can be scraped by an external
    14. # process.
    15. [scrape_integration: <boolean> | default = <integrations_config.scrape_integrations>]
    16. # How often should the metrics be collected? Defaults to
    17. # prometheus.global.scrape_interval.
    18. [scrape_interval: <duration> | default = <global_config.scrape_interval>]
    19. # The timeout before considering the scrape a failure. Defaults to
    20. # prometheus.global.scrape_timeout.
    21. [scrape_timeout: <duration> | default = <global_config.scrape_timeout>]
    22. # Allows for relabeling labels on the target.
    23. relabel_configs:
    24. [- <relabel_config> ... ]
    25. # Relabel metrics coming from the integration, allowing to drop series
    26. # from the integration that you don't care about.
    27. metric_relabel_configs:
    28. [ - <relabel_config> ... ]
    29. # How frequent to truncate the WAL for this integration.
    30. [wal_truncate_frequency: <duration> | default = "60m"]
    31. # Monitor the exporter itself and include those metrics in the results.
    32. [include_exporter_metrics: <bool> | default = false]
    33. #
    34. # Exporter-specific configuration options
    35. #
    36. # Address of the dnsmasq server in host:port form.
    37. [dnsmasq_address: <string> | default = "localhost:53"]
    38. # Path to the dnsmasq leases file. If this file doesn't exist, scraping
    39. # dnsmasq # will fail with an warning log message.
    40. [leases_path: <string> | default = "/var/lib/misc/dnsmasq.leases"]