Skip to content

Latest commit

 

History

History
825 lines (633 loc) · 16.2 KB

powerdns-monitoring-integration.mdx

File metadata and controls

825 lines (633 loc) · 16.2 KB
title tags metaDescription redirects freshnessValidatedDate
PowerDNS monitoring integration
Integrations
On-host integrations
On-host integrations list
New Relic's PowerDNS integration: how to enable, configure it, and an explanation of what data it reports.
/docs/integrations/host-integrations/host-integrations-list/powerdns-monitoring-integration
/docs/powerdns-integration-new-relic-infrastructure
never
We're still working on this feature, but we'd love for you to try it out!

It only applies to the versions starting on 0.0.5 released in October 2021.

This feature is currently provided as part of a preview program pursuant to our pre-release policies.

Our PowerDNS integration collects and sends dimensional metrics from PowerDNS. You can view this metric data in pre-built dashboards, create alert policies, and create custom queries and charts.

Read on to install the integration, and to see what data we collect.

Compatibility and requirements [#req]

Our integration is compatible with PowerDNS Recursor and Authoritative Server.

Before installing the integration, make sure that you meet the following requirements:

To get data from PowerDNS infrastructure, our PowerDNS integration uses a third-party Prometheus exporter, which exposes Prometheus metrics on the port specified in the configuration. The integration collects these metrics, transforms them into entities, filters them, and then sends them to New Relic.

To enable the API, the webserver and the HTTP API need to be enabled.

Add these lines to the pdns.conf:

api=yes
api-key=changeme

And restart, the following examples should start working:

curl -v -H 'X-API-Key: changeme' http://127.0.0.1:8081/api/v1/servers/localhost | jq .
curl -v -H 'X-API-Key: changeme' http://127.0.0.1:8081/api/v1

For more information, Enabling Webserver and Api

Install and activate [#install]

To install the PowerDNS integration, choose your setup:

1. Install [the infrastructure agent](/docs/integrations/host-integrations/installation/install-infrastructure-host-integrations/#install), and replace the `INTEGRATION_FILE_NAME` variable with `nri-powerdns`.
2. Change the directory to the integrations folder:

   ```
   cd /etc/newrelic-infra/integrations.d
   ```

3. Copy of the sample configuration file:

   ```
   sudo cp powerdns-config.yml.sample powerdns-config.yml
   ```

4. Edit the `powerdns-config.yml` file as described in the [configuration settings](#config).

<Collapser id="tarball" title="Tarball installation (advanced)"

You can also [install the integration from a tarball file](/docs/integrations/host-integrations/installation/install-host-integrations-built-new-relic#tarball). This gives you full control over the installation and configuration process.

Configure the integration [#config]

To configure the integration, edit the config in the integration's YAML configuration file powerdns-config.yml.

Use the YAML configuration to place required login credentials and configure how your data is collected, depending on your setup and preference.

Since this integration is based on a prometheus exporter, settings applicable to other integrations, like interval, timeout or inventory_source are not supported.

PowerDNS instance settings [#instance-settings]

The following configuration options are available:

  <th>
    Description
  </th>

  <th>
    Default
  </th>
</tr>
  <td>
    API URL of the powerdns service
  </td>

  <td>
    N/A
  </td>
</tr>

<tr>
  <td>
    <DNT>
      **exporter_port**
    </DNT>
  </td>

  <td>
    Port to expose scrape endpoint on, If this is not provided a random port will be used to launch the exporter
  </td>

  <td>
    random-port
  </td>
</tr>

<tr>
  <td>
    <DNT>
      **scrape_timeout**
    </DNT>
  </td>

  <td>
    Time until a scrape request times out
  </td>

  <td>
    5s
  </td>
</tr>

<tr>
  <td>
    <DNT>
      **api_key**
    </DNT>
  </td>

  <td>
    API key used to connect to the PowerDNS server
  </td>

  <td>
    N/A
  </td>
</tr>
Setting
**powerdns_url**

Example configurations [#examples]

This is the basic configuration used to collect metrics from an authoritative and a recursor instance:
```
integrations:
  - name: nri-powerdns
    config:
      api_key: authoritative-secret
      exporter_port: 9121
      powerdns_url: http://localhost:8081/api/v1/
  - name: nri-powerdns
    config:
      api_key: recursor-secret
      exporter_port: 9122
      powerdns_url: http://localhost:8082/api/v1/
```

Find and use data [#find-and-use]

For more on how to find and use your data, see Understand integration data.

Metrics are attached to the Metric sample and event types of the entities POWERDNS_AUTHORITATIVE and POWERDNS_RECURSOR. You can query this data for troubleshooting purposes, or to create custom charts and dashboards.

Metric data [#metrics]

Two entities are created: POWERDNS_AUTHORITATIVE and POWERDNS_RECURSOR.

The following dimensional metrics are captured scraping the exporter and linked to the entity POWERDNS_AUTHORITATIVE:

  <th>
    Description
  </th>

  <th>
    Dimensions
  </th>
</tr>
  <td>
    Uptime in seconds of the daemon.
  </td>

  <td>
    * type
  </td>
</tr>

<tr>
  <td>
    `powerdns_authoritative_packet_cache_size (gauge)`
  </td>

  <td>
    Number of entries in the packet cache.
  </td>

  <td/>
</tr>

<tr>
  <td>
    `powerdns_authoritative_recursive_queries_total (count)`
  </td>

  <td>
    Total number of recursive queries by status.
  </td>

  <td>
    * status
  </td>
</tr>

<tr>
  <td>
    `powerdns_authoritative_remote_queries (count)`
  </td>

  <td>
    Remote server IP addresses.
  </td>

  <td>
    * remote
  </td>
</tr>

<tr>
  <td>
    `powerdns_authoritative_security_status (gauge)`
  </td>

  <td>
    PDNS Server Security status based on `security-status.secpoll.powerdns.com`.
  </td>

  <td/>
</tr>

<tr>
  <td>
    `powerdns_authoritative_exceptions_total (count)`
  </td>

  <td>
    Total number of exceptions by error.
  </td>

  <td>
    * error
  </td>
</tr>

<tr>
  <td>
    `powerdns_authoritative_latency_average_seconds (gauge)`
  </td>

  <td>
    Average number of microseconds a packet spends within PowerDNS.
  </td>

  <td/>
</tr>

<tr>
  <td>
    `powerdns_authoritative_dnsupdate_queries_total (count)`
  </td>

  <td>
    Total number of DNS update queries by status.
  </td>

  <td>
    * status
  </td>
</tr>

<tr>
  <td>
    `powerdns_authoritative_qsize (gauge)`
  </td>

  <td>
    Number of packets waiting for database attention.
  </td>

  <td/>
</tr>

<tr>
  <td>
    `powerdns_authoritative_response_rcodes (count)`
  </td>

  <td>
    Distribution of rcodes.
  </td>

  <td>
    * rcode
  </td>
</tr>

<tr>
  <td>
    `powerdns_authoritative_signature_cache_size (gauge)`
  </td>

  <td>
    Number of entries in the signature cache.
  </td>

  <td/>
</tr>

<tr>
  <td>
    `powerdns_authoritative_queries_unauth (count)`
  </td>

  <td>
    Queries for domains that we are not authoritative for.
  </td>

  <td>
    * record
  </td>
</tr>

<tr>
  <td>
    `powerdns_authoritative_answers_bytes_total (count)`
  </td>

  <td>
    Total number of answer bytes sent over by protocol.
  </td>

  <td>
    * proto
  </td>
</tr>

<tr>
  <td>
    `powerdns_authoritative_queries (count)`
  </td>

  <td>
    UDP Queries Received.
  </td>

  <td>
    * record
  </td>
</tr>

<tr>
  <td>
    `powerdns_authoritative_exporter_json_parse_failures (count)`
  </td>

  <td>
    Number of errors while parsing PowerDNS JSON stats.
  </td>

  <td/>
</tr>

<tr>
  <td>
    `powerdns_authoritative_deferred_cache_actions (count)`
  </td>

  <td>
    Deferred cache actions because of maintenance by type.
  </td>

  <td>
    * type
  </td>
</tr>

<tr>
  <td>
    `powerdns_authoritative_up (gauge)`
  </td>

  <td>
    The last scrape of PowerDNS was successful.
  </td>

  <td/>
</tr>

<tr>
  <td>
    `powerdns_authoritative_query_cache_lookup (count)`
  </td>

  <td>
    Query cache lookups by result.
  </td>

  <td>
    * result
  </td>
</tr>

<tr>
  <td>
    `powerdns_authoritative_key_cache_size (gauge)`
  </td>

  <td>
    Number of entries in the key cache.
  </td>

  <td/>
</tr>

<tr>
  <td>
    `powerdns_authoritative_answers_total (count)`
  </td>

  <td>
    Total number of answers by protocol.
  </td>

  <td>
    * proto
  </td>
</tr>

<tr>
  <td>
    `powerdns_authoritative_packet_cache_lookup (count)`
  </td>

  <td>
    Packet cache lookups by result.
  </td>

  <td>
    * result
  </td>
</tr>

<tr>
  <td>
    `powerdns_authoritative_metadata_cache_size (gauge)`
  </td>

  <td>
    Number of entries in the metadata cache.
  </td>

  <td/>
</tr>

<tr>
  <td>
    `powerdns_authoritative_queries_total (count)`
  </td>

  <td>
    Total number of queries by protocol.
  </td>

  <td>
    * proto
  </td>
</tr>

<tr>
  <td>
    `powerdns_authoritative_cpu_utilisation (count)`
  </td>

  <td>
    Number of CPU milliseconds spent in user, and kernel space.
  </td>

  <td>
    * type
  </td>
</tr>

<tr>
  <td>
    `powerdns_authoritative_dnssec (count)`
  </td>

  <td>
    DNSSEC counters.
  </td>

  <td>
    * type
  </td>
</tr>

<tr>
  <td>
    `powerdns_authoritative_response_sizes (count)`
  </td>

  <td>
    Size distribution of responses.
  </td>

  <td>
    * size
  </td>
</tr>

<tr>
  <td>
    `powerdns_authoritative_exporter_total_scrapes (count)`
  </td>

  <td>
    Current total PowerDNS scrapes.
  </td>

  <td/>
</tr>

<tr>
  <td>
    `powerdns_authoritative_remote_queries_unauth (count)`
  </td>

  <td>
    Remote hosts querying domains for which we are not authoritative.
  </td>

  <td>
    * remote
  </td>
</tr>
Name
`powerdns_authoritative_uptime (count)`

The following dimensional metrics are captured scraping the exporter and linked to the entity POWERDNS_RECURSOR:

  <th>
    Description
  </th>

  <th>
    Dimensions
  </th>
</tr>
  <td>
    Total number of incoming queries by network.
  </td>

  <td>
    * net
  </td>
</tr>

<tr>
  <td>
    `powerdns_recursor_outgoing_queries_total (count)`
  </td>

  <td>
    Total number of outgoing queries by network.
  </td>

  <td>
    * net
  </td>
</tr>

<tr>
  <td>
    `powerdns_recursor_cache_size (gauge)`
  </td>

  <td>
    Number of entries in the cache.
  </td>

  <td/>
</tr>

<tr>
  <td>
    `powerdns_recursor_cache_lookups_total (count)`
  </td>

  <td>
    Total number of cache lookups by result.
  </td>

  <td>
    * result
  </td>
</tr>

<tr>
  <td>
    `powerdns_recursor_exporter_json_parse_failures (count)`
  </td>

  <td>
    Number of errors while parsing PowerDNS JSON stats.
  </td>

  <td/>
</tr>

<tr>
  <td>
    `powerdns_recursor_answers_rcodes_total (count)`
  </td>

  <td>
    Total number of answers by response code.
  </td>

  <td>
    * rcode
  </td>
</tr>

<tr>
  <td>
    `powerdns_recursor_exporter_total_scrapes (count)`
  </td>

  <td>
    Current total PowerDNS scrapes.
  </td>

  <td/>
</tr>

<tr>
  <td>
    `powerdns_recursor_concurrent_queries (gauge)`
  </td>

  <td>
    Number of concurrent queries.
  </td>

  <td/>
</tr>

<tr>
  <td>
    `powerdns_recursor_answers_rtime_total (count)`
  </td>

  <td>
    Total number of answers grouped by response time slots.
  </td>

  <td>
    * timeslot
  </td>
</tr>

<tr>
  <td>
    `powerdns_recursor_latency_average_seconds (gauge)`
  </td>

  <td>
    Exponential moving average of question-to-answer latency.
  </td>

  <td/>
</tr>

<tr>
  <td>
    `powerdns_recursor_exceptions_total (count)`
  </td>

  <td>
    Total number of exceptions by error.
  </td>

  <td>
    * error
  </td>
</tr>

<tr>
  <td>
    `powerdns_recursor_response_time_seconds_sum (count)`
  </td>

  <td>
    Histogram of PowerDNS recursor response times in seconds. (sum metric)
  </td>

  <td/>
</tr>

<tr>
  <td>
    `powerdns_recursor_response_time_seconds_bucket (count)`
  </td>

  <td>
    Histogram of PowerDNS recursor response times in seconds. (bucket metric)
  </td>

  <td>
    * le
  </td>
</tr>

<tr>
  <td>
    `powerdns_recursor_up (gauge)`
  </td>

  <td>
    The last scrape of PowerDNS was successful.
  </td>

  <td/>
</tr>
Name
`powerdns_recursor_incoming_queries_total (count)`

Check the source code [#source-code]

This integration is open source software. This means you can browse its source code and send improvements, or create your own fork and build it.

Moreover this integration leverages an opensource exporter created by the community.