Skip to content

Commit

Permalink
Document new 'reach_format' setting.
Browse files Browse the repository at this point in the history
  • Loading branch information
srebhan committed Aug 3, 2022
1 parent 35ee9a2 commit 2865066
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
15 changes: 12 additions & 3 deletions plugins/inputs/ntpq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,25 @@ server (RMS of difference of multiple time samples, milliseconds);
```toml @sample.conf
# Get standard NTP query metrics, requires ntpq executable.
[[inputs.ntpq]]
## Servers to query with ntpq.
## If no server is given, the local machine is queried.
# servers = []

## If false, set the -n ntpq flag. Can reduce metric gather time.
## DEPRECATED since 1.24.0: add '-n' to 'options' instead to skip DNS lookup
# dns_lookup = true

## Options to pass to the ntpq command.
# options = "-p"

## Servers to query with ntpq.
## If no server is given, the local machine is queried.
# servers = []
## Output format for the 'reach' field.
## Available values are
## octal -- output as is in octal representation e.g. 377 (default)
## decimal -- convert value to decimal representation e.g. 371 -> 249
## count -- count the number of bits in the value. This represents
## the number of successful reaches, e.g. 37 -> 5
## ratio -- output the ratio of successful attempts e.g. 37 -> 5/8 = 0.625
# reach_format = "octal"
```

You can pass arbitrary options accepted by the `ntpq` command using the
Expand Down
15 changes: 12 additions & 3 deletions plugins/inputs/ntpq/sample.conf
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
# Get standard NTP query metrics, requires ntpq executable.
[[inputs.ntpq]]
## Servers to query with ntpq.
## If no server is given, the local machine is queried.
# servers = []

## If false, set the -n ntpq flag. Can reduce metric gather time.
## DEPRECATED since 1.24.0: add '-n' to 'options' instead to skip DNS lookup
# dns_lookup = true

## Options to pass to the ntpq command.
# options = "-p"

## Servers to query with ntpq.
## If no server is given, the local machine is queried.
# servers = []
## Output format for the 'reach' field.
## Available values are
## octal -- output as is in octal representation e.g. 377 (default)
## decimal -- convert value to decimal representation e.g. 371 -> 249
## count -- count the number of bits in the value. This represents
## the number of successful reaches, e.g. 37 -> 5
## ratio -- output the ratio of successful attempts e.g. 37 -> 5/8 = 0.625
# reach_format = "octal"

0 comments on commit 2865066

Please sign in to comment.