Documentation forAppOptics

NTPQ

This plugin is currently being groomed to be an integration. It works, but we haven't spent a lot of time on it yet to optimize the user experience. Feel free to try it out, just keep in mind that we will be enhancing the experience over time.

Overview

This plugin collects standard query metrics from NTPQ.

This plugin is currently only available for x86_64 Linux.

Setup

The ntpq plugin is included with the SolarWinds Snap Agent by default, please follow the directions below to enable it for a agent instance.

Prerequisites

This plugin requires that the ntp daemon is installed and running. Verify you have the package installed, and that the service is queryable.

Copy
$ sudo apt-get install ntp
Copy
$ sudo ntpq -p

Configuration

The agent provides an example configuration file to help you get started quickly. To enable the plugin:

  1. Make a copy of the ntpq example configuration file /opt/SolarWinds/Snap/etc/plugins.d/ntpq.yaml.example, renaming it to /opt/SolarWinds/Snap/etc/plugins.d/ntpq.yaml:

    Copy
    $ sudo cp /opt/SolarWinds/Snap/etc/plugins.d/ntpq.yaml.example /opt/SolarWinds/Snap/etc/plugins.d/ntpq.yaml
  2. Update /opt/SolarWinds/Snap/etc/plugins.d/ntpq.yaml configuration file with settings specific to your NTP configuration, for example:

    Copy
    collector:
      # Get standard NTP query metrics. Requires ntpq executable.
      ntpq:
        all:
          ## If false, set the -n ntpq flag. Can reduce metric gather time. (default=false)
          # dns_lookup: true
          # grpc_timeout sets the maximum time allowed for a gRPC call.
          # Some collector or plublisher plugins require more time to finish a gRPC method call during collection or publishing.
          # When increasing grpc_timeout value with the deadline value specified in
          # manifest task file which controls the total time allocated for the
          # Default value is 10
          grpc_timeout: 30
    load:
      plugin: snap-plugin-collector-bridge-ntpq
      task: task-bridge-ntpq.yaml
  3. Restart the agent:

    Copy
    $ sudo service swisnapd restart
  4. Enable the NTPQ plugin

On the Integrations Page you will see NTPQ available if the previous steps were successful.

Metrics and Tags

The table below lists each of the metrics gathered from the status endpoint.

Metrics

Name Description
ntpq.delay Round trip communication delay to the remote peer or server (milliseconds)
ntpq.jitter Mean deviation (jitter) in the time reported for that remote peer or server (milliseconds);
ntpq.offset Mean offset (phase) in the times reported between this local host and the remote peer or server (milliseconds)
ntpq.poll Polling frequency (seconds)
ntpq.reach An 8-bit left-shift shift register value recording polls (bit set = successful, bit reset = fail)
ntpq.when When last polled (seconds)

Tags

Name Description
remote The remote peer or server being synced to. LOCAL is this local host (included in case there are no remote peers or servers available)
refid Where or what the remote peer or server is itself synchronised to
stratum The remote peer or server Stratum
type Type (u: unicast or manycast client, b: broadcast or multicast client, l: local reference clock, s: symmetric peer, A: manycast server, B: broadcast server, M: multicast server)

The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.