Adding upstream version 1.34.4.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e393c3af3f
commit
4978089aab
4963 changed files with 677545 additions and 0 deletions
108
plugins/inputs/ntpq/README.md
Normal file
108
plugins/inputs/ntpq/README.md
Normal file
|
@ -0,0 +1,108 @@
|
|||
# Network Time Protocol Query Input Plugin
|
||||
|
||||
This plugin gathers metrics about [Network Time Protocol][ntp] queries.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> This plugin requires the `ntpq` executable to be installed on the system.
|
||||
|
||||
⭐ Telegraf v0.11.0
|
||||
🏷️ network
|
||||
💻 all
|
||||
|
||||
[ntp]: https://ntp.org/
|
||||
|
||||
## Global configuration options <!-- @/docs/includes/plugin_config.md -->
|
||||
|
||||
In addition to the plugin-specific configuration settings, plugins support
|
||||
additional global and plugin configuration settings. These settings are used to
|
||||
modify metrics, tags, and field or create aliases and configure ordering, etc.
|
||||
See the [CONFIGURATION.md][CONFIGURATION.md] for more details.
|
||||
|
||||
[CONFIGURATION.md]: ../../../docs/CONFIGURATION.md#plugins
|
||||
|
||||
## Configuration
|
||||
|
||||
```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"
|
||||
|
||||
## 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
|
||||
`options` setting. In case you want to skip DNS lookups use
|
||||
|
||||
```toml
|
||||
options = "-p -n"
|
||||
```
|
||||
|
||||
for example.
|
||||
|
||||
Below is the documentation of the various headers returned from the NTP query
|
||||
command when running `ntpq -p`.
|
||||
|
||||
- `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;
|
||||
- `st` (stratum) – The remote peer or server Stratum
|
||||
- `t` (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, see “Automatic Server Discovery“);
|
||||
- `when` – When last polled (seconds ago, “h” hours ago, or “d” days ago);
|
||||
- `poll` – Polling frequency: rfc5905 suggests this ranges in NTPv4 from 4 (16s)
|
||||
to 17 (36h) (log2 seconds), however observation suggests the actual
|
||||
displayed value is seconds for a much smaller range of 64 (26) to 1024
|
||||
(210) seconds;
|
||||
- `reach` – An 8-bit left-shift shift register value recording polls
|
||||
(bit set = successful, bit reset = fail) displayed in octal;
|
||||
- `delay` – Round trip communication delay to the remote peer or server
|
||||
(milliseconds);
|
||||
- `offset` – Mean offset (phase) in the times reported between this local host
|
||||
and the remote peer or server (RMS, milliseconds);
|
||||
- `jitter` – Mean deviation (jitter) in the time reported for that remote peer
|
||||
or server (RMS of difference of multiple time samples, milliseconds);
|
||||
|
||||
## Metrics
|
||||
|
||||
- `ntpq`
|
||||
- delay (float, milliseconds)
|
||||
- jitter (float, milliseconds)
|
||||
- offset (float, milliseconds)
|
||||
- poll (int, seconds)
|
||||
- reach (int)
|
||||
- when (int, seconds)
|
||||
|
||||
### Tags
|
||||
|
||||
All measurements have the following tags:
|
||||
|
||||
- refid
|
||||
- remote
|
||||
- type
|
||||
- stratum
|
||||
|
||||
In case you are specifying `servers`, the measurement has an
|
||||
additional `source` tag.
|
||||
|
||||
## Example Output
|
||||
|
||||
```text
|
||||
ntpq,refid=.GPSs.,remote=*time.apple.com,stratum=1,type=u delay=91.797,jitter=3.735,offset=12.841,poll=64i,reach=377i,when=35i 1457960478909556134
|
||||
```
|
314
plugins/inputs/ntpq/ntpq.go
Normal file
314
plugins/inputs/ntpq/ntpq.go
Normal file
|
@ -0,0 +1,314 @@
|
|||
//go:generate ../../../tools/readme_config_includer/generator
|
||||
package ntpq
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
_ "embed"
|
||||
"fmt"
|
||||
"math/bits"
|
||||
"os/exec"
|
||||
"regexp"
|
||||
"slices"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/kballard/go-shellquote"
|
||||
|
||||
"github.com/influxdata/telegraf"
|
||||
"github.com/influxdata/telegraf/plugins/inputs"
|
||||
)
|
||||
|
||||
//go:embed sample.conf
|
||||
var sampleConfig string
|
||||
|
||||
// Due to problems with a parsing, we have to use regexp expression in order
|
||||
// to remove string that starts from '(' and ends with space
|
||||
// see: https://github.com/influxdata/telegraf/issues/2386
|
||||
var reBrackets = regexp.MustCompile(`\s+\([\S]*`)
|
||||
|
||||
type elementType int64
|
||||
|
||||
const (
|
||||
none elementType = iota
|
||||
tag
|
||||
fieldFloat
|
||||
fieldDuration
|
||||
fieldIntDecimal
|
||||
fieldIntOctal
|
||||
fieldIntRatio8
|
||||
fieldIntBits
|
||||
)
|
||||
|
||||
type NTPQ struct {
|
||||
DNSLookup bool `toml:"dns_lookup" deprecated:"1.24.0;1.35.0;add '-n' to 'options' instead to skip DNS lookup"`
|
||||
Options string `toml:"options"`
|
||||
Servers []string `toml:"servers"`
|
||||
ReachFormat string `toml:"reach_format"`
|
||||
|
||||
runQ func(string) ([]byte, error)
|
||||
}
|
||||
|
||||
type column struct {
|
||||
name string
|
||||
etype elementType
|
||||
}
|
||||
|
||||
// Mapping of ntpq header names to tag keys
|
||||
var tagHeaders = map[string]string{
|
||||
"remote": "remote",
|
||||
"refid": "refid",
|
||||
"st": "stratum",
|
||||
"t": "type",
|
||||
}
|
||||
|
||||
// Mapping of fields
|
||||
var fieldElements = map[string]elementType{
|
||||
"delay": fieldFloat,
|
||||
"jitter": fieldFloat,
|
||||
"offset": fieldFloat,
|
||||
"reach": fieldIntDecimal,
|
||||
"poll": fieldDuration,
|
||||
"when": fieldDuration,
|
||||
}
|
||||
|
||||
func (*NTPQ) SampleConfig() string {
|
||||
return sampleConfig
|
||||
}
|
||||
|
||||
func (n *NTPQ) Init() error {
|
||||
if len(n.Servers) == 0 {
|
||||
n.Servers = []string{""}
|
||||
}
|
||||
|
||||
if n.runQ == nil {
|
||||
options, err := shellquote.Split(n.Options)
|
||||
if err != nil {
|
||||
return fmt.Errorf("splitting options failed: %w", err)
|
||||
}
|
||||
if !n.DNSLookup {
|
||||
if !slices.Contains(options, "-n") {
|
||||
options = append(options, "-n")
|
||||
}
|
||||
}
|
||||
if !slices.Contains(options, "-p") {
|
||||
options = append(options, "-p")
|
||||
}
|
||||
|
||||
n.runQ = func(server string) ([]byte, error) {
|
||||
bin, err := exec.LookPath("ntpq")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Needs to be last argument
|
||||
args := make([]string, 0, len(options)+1)
|
||||
args = append(args, options...)
|
||||
if server != "" {
|
||||
args = append(args, server)
|
||||
}
|
||||
cmd := exec.Command(bin, args...)
|
||||
return cmd.Output()
|
||||
}
|
||||
}
|
||||
|
||||
switch n.ReachFormat {
|
||||
case "", "octal":
|
||||
n.ReachFormat = "octal"
|
||||
// Interpret the field as decimal integer returning
|
||||
// the raw (octal) representation
|
||||
fieldElements["reach"] = fieldIntDecimal
|
||||
case "decimal":
|
||||
// Interpret the field as octal integer returning
|
||||
// decimal number representation
|
||||
fieldElements["reach"] = fieldIntOctal
|
||||
case "count":
|
||||
// Interpret the field as bits set returning
|
||||
// the number of bits set
|
||||
fieldElements["reach"] = fieldIntBits
|
||||
case "ratio":
|
||||
// Interpret the field as ratio between the number of
|
||||
// bits set and the maximum available bits set (8).
|
||||
fieldElements["reach"] = fieldIntRatio8
|
||||
default:
|
||||
return fmt.Errorf("unknown 'reach_format' %q", n.ReachFormat)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *NTPQ) Gather(acc telegraf.Accumulator) error {
|
||||
for _, server := range n.Servers {
|
||||
n.gatherServer(acc, server)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *NTPQ) gatherServer(acc telegraf.Accumulator, server string) {
|
||||
var msgPrefix string
|
||||
if server != "" {
|
||||
msgPrefix = fmt.Sprintf("[%s] ", server)
|
||||
}
|
||||
out, err := n.runQ(server)
|
||||
if err != nil {
|
||||
acc.AddError(fmt.Errorf("%s%w", msgPrefix, err))
|
||||
return
|
||||
}
|
||||
|
||||
scanner := bufio.NewScanner(bytes.NewReader(out))
|
||||
|
||||
// Look for the header
|
||||
var columns []column
|
||||
for scanner.Scan() {
|
||||
line := scanner.Text()
|
||||
|
||||
if line == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
_, elements := processLine(line)
|
||||
if len(elements) < 2 {
|
||||
continue
|
||||
}
|
||||
|
||||
for _, el := range elements {
|
||||
// Check if the element is a tag
|
||||
if name, isTag := tagHeaders[el]; isTag {
|
||||
columns = append(columns, column{
|
||||
name: name,
|
||||
etype: tag,
|
||||
})
|
||||
continue
|
||||
}
|
||||
|
||||
// Add a field
|
||||
if etype, isField := fieldElements[el]; isField {
|
||||
columns = append(columns, column{
|
||||
name: el,
|
||||
etype: etype,
|
||||
})
|
||||
continue
|
||||
}
|
||||
|
||||
// Skip the column if not found
|
||||
columns = append(columns, column{etype: none})
|
||||
}
|
||||
break
|
||||
}
|
||||
for scanner.Scan() {
|
||||
line := scanner.Text()
|
||||
|
||||
if line == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
prefix, elements := processLine(line)
|
||||
if len(elements) != len(columns) {
|
||||
continue
|
||||
}
|
||||
|
||||
tags := make(map[string]string)
|
||||
fields := make(map[string]interface{})
|
||||
|
||||
if prefix != "" {
|
||||
tags["state_prefix"] = prefix
|
||||
}
|
||||
if server != "" {
|
||||
tags["source"] = server
|
||||
}
|
||||
|
||||
for i, raw := range elements {
|
||||
col := columns[i]
|
||||
|
||||
switch col.etype {
|
||||
case none:
|
||||
continue
|
||||
case tag:
|
||||
tags[col.name] = raw
|
||||
case fieldFloat:
|
||||
value, err := strconv.ParseFloat(raw, 64)
|
||||
if err != nil {
|
||||
msg := fmt.Sprintf("%sparsing %q (%v) as float failed", msgPrefix, col.name, raw)
|
||||
acc.AddError(fmt.Errorf("%s: %w", msg, err))
|
||||
continue
|
||||
}
|
||||
fields[col.name] = value
|
||||
case fieldDuration:
|
||||
// Ignore fields only containing a minus
|
||||
if raw == "-" {
|
||||
continue
|
||||
}
|
||||
factor := int64(1)
|
||||
suffix := raw[len(raw)-1:]
|
||||
switch suffix {
|
||||
case "d":
|
||||
factor = 24 * 3600
|
||||
case "h":
|
||||
factor = 3600
|
||||
case "m":
|
||||
factor = 60
|
||||
default:
|
||||
suffix = ""
|
||||
}
|
||||
value, err := strconv.ParseInt(strings.TrimSuffix(raw, suffix), 10, 64)
|
||||
if err != nil {
|
||||
msg := fmt.Sprintf("%sparsing %q (%v) as duration failed", msgPrefix, col.name, raw)
|
||||
acc.AddError(fmt.Errorf("%s: %w", msg, err))
|
||||
continue
|
||||
}
|
||||
fields[col.name] = value * factor
|
||||
case fieldIntDecimal:
|
||||
value, err := strconv.ParseInt(raw, 10, 64)
|
||||
if err != nil {
|
||||
acc.AddError(fmt.Errorf("parsing %q (%v) as int failed: %w", col.name, raw, err))
|
||||
continue
|
||||
}
|
||||
fields[col.name] = value
|
||||
case fieldIntOctal:
|
||||
value, err := strconv.ParseInt(raw, 8, 64)
|
||||
if err != nil {
|
||||
acc.AddError(fmt.Errorf("parsing %q (%v) as int failed: %w", col.name, raw, err))
|
||||
continue
|
||||
}
|
||||
fields[col.name] = value
|
||||
case fieldIntBits:
|
||||
value, err := strconv.ParseUint(raw, 8, 64)
|
||||
if err != nil {
|
||||
acc.AddError(fmt.Errorf("parsing %q (%v) as int failed: %w", col.name, raw, err))
|
||||
continue
|
||||
}
|
||||
fields[col.name] = bits.OnesCount64(value)
|
||||
case fieldIntRatio8:
|
||||
value, err := strconv.ParseUint(raw, 8, 64)
|
||||
if err != nil {
|
||||
acc.AddError(fmt.Errorf("parsing %q (%v) as int failed: %w", col.name, raw, err))
|
||||
continue
|
||||
}
|
||||
fields[col.name] = float64(bits.OnesCount64(value)) / float64(8)
|
||||
}
|
||||
}
|
||||
|
||||
acc.AddFields("ntpq", fields, tags)
|
||||
}
|
||||
}
|
||||
|
||||
func processLine(line string) (string, []string) {
|
||||
// if there is an ntpq state prefix, remove it and make it it's own tag
|
||||
// see https://github.com/influxdata/telegraf/issues/1161
|
||||
var prefix string
|
||||
if strings.ContainsAny(string(line[0]), "*#o+x.-") {
|
||||
prefix = string(line[0])
|
||||
line = strings.TrimLeft(line, "*#o+x.-")
|
||||
}
|
||||
line = reBrackets.ReplaceAllString(line, "")
|
||||
|
||||
return prefix, strings.Fields(line)
|
||||
}
|
||||
|
||||
func init() {
|
||||
inputs.Add("ntpq", func() telegraf.Input {
|
||||
return &NTPQ{
|
||||
DNSLookup: true,
|
||||
}
|
||||
})
|
||||
}
|
166
plugins/inputs/ntpq/ntpq_test.go
Normal file
166
plugins/inputs/ntpq/ntpq_test.go
Normal file
|
@ -0,0 +1,166 @@
|
|||
package ntpq
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/influxdata/telegraf"
|
||||
"github.com/influxdata/telegraf/config"
|
||||
"github.com/influxdata/telegraf/plugins/inputs"
|
||||
"github.com/influxdata/telegraf/plugins/parsers/influx"
|
||||
"github.com/influxdata/telegraf/testutil"
|
||||
)
|
||||
|
||||
func TestInitInvalid(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
plugin *NTPQ
|
||||
expected string
|
||||
}{
|
||||
{
|
||||
name: "invalid reach_format",
|
||||
plugin: &NTPQ{ReachFormat: "garbage"},
|
||||
expected: `unknown 'reach_format' "garbage"`,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
require.EqualError(t, tt.plugin.Init(), tt.expected)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestCases(t *testing.T) {
|
||||
// Get all directories in testdata
|
||||
folders, err := os.ReadDir("testcases")
|
||||
require.NoError(t, err)
|
||||
|
||||
// Register the plugin
|
||||
inputs.Add("ntpq", func() telegraf.Input {
|
||||
return &NTPQ{}
|
||||
})
|
||||
|
||||
// Prepare the influx parser for expectations
|
||||
parser := &influx.Parser{}
|
||||
require.NoError(t, parser.Init())
|
||||
|
||||
for _, f := range folders {
|
||||
// Only handle folders
|
||||
if !f.IsDir() {
|
||||
continue
|
||||
}
|
||||
testcasePath := filepath.Join("testcases", f.Name())
|
||||
configFilename := filepath.Join(testcasePath, "telegraf.conf")
|
||||
expectedFilename := filepath.Join(testcasePath, "expected.out")
|
||||
expectedErrorFilename := filepath.Join(testcasePath, "expected.err")
|
||||
|
||||
// Compare options
|
||||
options := []cmp.Option{
|
||||
testutil.IgnoreTime(),
|
||||
testutil.SortMetrics(),
|
||||
}
|
||||
|
||||
t.Run(f.Name(), func(t *testing.T) {
|
||||
// Read the input data
|
||||
inputData, inputErrors, err := readInputData(testcasePath)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Read the expected output if any
|
||||
var expected []telegraf.Metric
|
||||
if _, err := os.Stat(expectedFilename); err == nil {
|
||||
var err error
|
||||
expected, err = testutil.ParseMetricsFromFile(expectedFilename, parser)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
// Read the expected output if any
|
||||
var expectedErrors []string
|
||||
if _, err := os.Stat(expectedErrorFilename); err == nil {
|
||||
var err error
|
||||
expectedErrors, err = testutil.ParseLinesFromFile(expectedErrorFilename)
|
||||
require.NoError(t, err)
|
||||
require.NotEmpty(t, expectedErrors)
|
||||
}
|
||||
|
||||
// Configure the plugin
|
||||
cfg := config.NewConfig()
|
||||
require.NoError(t, cfg.LoadConfig(configFilename))
|
||||
require.Len(t, cfg.Inputs, 1)
|
||||
|
||||
// Fake the reading
|
||||
plugin := cfg.Inputs[0].Input.(*NTPQ)
|
||||
plugin.runQ = func(server string) ([]byte, error) {
|
||||
return inputData[server], inputErrors[server]
|
||||
}
|
||||
require.NoError(t, plugin.Init())
|
||||
|
||||
var acc testutil.Accumulator
|
||||
require.NoError(t, plugin.Gather(&acc))
|
||||
if len(acc.Errors) > 0 {
|
||||
var actualErrorMsgs []string
|
||||
for _, err := range acc.Errors {
|
||||
actualErrorMsgs = append(actualErrorMsgs, err.Error())
|
||||
}
|
||||
require.ElementsMatch(t, actualErrorMsgs, expectedErrors)
|
||||
}
|
||||
|
||||
// Check the metric nevertheless as we might get some metrics despite errors.
|
||||
actual := acc.GetTelegrafMetrics()
|
||||
testutil.RequireMetricsEqual(t, expected, actual, options...)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func readInputData(path string) (map[string][]byte, map[string]error, error) {
|
||||
// Get all elements in the testcase directory
|
||||
entries, err := os.ReadDir(path)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
data := make(map[string][]byte)
|
||||
errs := make(map[string]error)
|
||||
for _, e := range entries {
|
||||
if e.IsDir() || !strings.HasPrefix(e.Name(), "input") {
|
||||
continue
|
||||
}
|
||||
|
||||
filename := filepath.Join(path, e.Name())
|
||||
ext := filepath.Ext(e.Name())
|
||||
server := strings.TrimPrefix(e.Name(), "input")
|
||||
server = strings.TrimPrefix(server, "_") // This needs to be separate for non-server cases
|
||||
server = strings.TrimSuffix(server, ext)
|
||||
|
||||
switch ext {
|
||||
case ".txt":
|
||||
// Read the input data
|
||||
d, err := os.ReadFile(filename)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("reading %q failed: %w", filename, err)
|
||||
}
|
||||
data[server] = d
|
||||
case ".err":
|
||||
// Read the input error message
|
||||
msgs, err := testutil.ParseLinesFromFile(filename)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("reading error %q failed: %w", filename, err)
|
||||
}
|
||||
if len(msgs) != 1 {
|
||||
return nil, nil, fmt.Errorf("unexpected number of errors: %d", len(msgs))
|
||||
}
|
||||
errs[server] = errors.New(msgs[0])
|
||||
default:
|
||||
return nil, nil, fmt.Errorf("unexpected input %q", filename)
|
||||
}
|
||||
}
|
||||
|
||||
return data, errs, nil
|
||||
}
|
21
plugins/inputs/ntpq/sample.conf
Normal file
21
plugins/inputs/ntpq/sample.conf
Normal file
|
@ -0,0 +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"
|
||||
|
||||
## 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,0 +1 @@
|
|||
parsing "offset" (foobar) as float failed: strconv.ParseFloat: parsing "foobar": invalid syntax
|
|
@ -0,0 +1 @@
|
|||
ntpq,remote=uschi5-ntp-002.,state_prefix=*,refid=10.177.80.46,stratum=2,type=u when=2i,poll=256i,reach=37i,delay=51.016,jitter=17.462 0
|
3
plugins/inputs/ntpq/testcases/bad_float_parse/input.txt
Normal file
3
plugins/inputs/ntpq/testcases/bad_float_parse/input.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
*uschi5-ntp-002. 10.177.80.46 2 u 2 256 37 51.016 foobar 17.462
|
|
@ -0,0 +1 @@
|
|||
[[inputs.ntpq]]
|
1
plugins/inputs/ntpq/testcases/bad_header/expected.out
Normal file
1
plugins/inputs/ntpq/testcases/bad_header/expected.out
Normal file
|
@ -0,0 +1 @@
|
|||
ntpq,remote=uschi5-ntp-002.,state_prefix=*,refid=10.177.80.46,type=u when=101i,poll=256i,reach=37i,delay=51.016,offset=233.010,jitter=17.462 0
|
3
plugins/inputs/ntpq/testcases/bad_header/input.txt
Normal file
3
plugins/inputs/ntpq/testcases/bad_header/input.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
remote refid foobar t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
*uschi5-ntp-002. 10.177.80.46 2 u 101 256 37 51.016 233.010 17.462
|
1
plugins/inputs/ntpq/testcases/bad_header/telegraf.conf
Normal file
1
plugins/inputs/ntpq/testcases/bad_header/telegraf.conf
Normal file
|
@ -0,0 +1 @@
|
|||
[[inputs.ntpq]]
|
1
plugins/inputs/ntpq/testcases/bad_int_parse/expected.err
Normal file
1
plugins/inputs/ntpq/testcases/bad_int_parse/expected.err
Normal file
|
@ -0,0 +1 @@
|
|||
parsing "poll" (foobar) as duration failed: strconv.ParseInt: parsing "foobar": invalid syntax
|
1
plugins/inputs/ntpq/testcases/bad_int_parse/expected.out
Normal file
1
plugins/inputs/ntpq/testcases/bad_int_parse/expected.out
Normal file
|
@ -0,0 +1 @@
|
|||
ntpq,remote=uschi5-ntp-002.,state_prefix=*,refid=10.177.80.46,stratum=2,type=u when=101i,reach=37i,delay=51.016,offset=233.010,jitter=17.462 0
|
3
plugins/inputs/ntpq/testcases/bad_int_parse/input.txt
Normal file
3
plugins/inputs/ntpq/testcases/bad_int_parse/input.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
*uschi5-ntp-002. 10.177.80.46 2 u 101 foobar 37 51.016 233.010 17.462
|
|
@ -0,0 +1 @@
|
|||
[[inputs.ntpq]]
|
1
plugins/inputs/ntpq/testcases/bad_when/expected.err
Normal file
1
plugins/inputs/ntpq/testcases/bad_when/expected.err
Normal file
|
@ -0,0 +1 @@
|
|||
parsing "when" (2q) as duration failed: strconv.ParseInt: parsing "2q": invalid syntax
|
1
plugins/inputs/ntpq/testcases/bad_when/expected.out
Normal file
1
plugins/inputs/ntpq/testcases/bad_when/expected.out
Normal file
|
@ -0,0 +1 @@
|
|||
ntpq,remote=uschi5-ntp-002.,state_prefix=*,refid=10.177.80.46,stratum=2,type=u poll=256i,reach=37i,delay=51.016,offset=233.010,jitter=17.462 0
|
3
plugins/inputs/ntpq/testcases/bad_when/input.txt
Normal file
3
plugins/inputs/ntpq/testcases/bad_when/input.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
*uschi5-ntp-002. 10.177.80.46 2 u 2q 256 37 51.016 233.010 17.462
|
1
plugins/inputs/ntpq/testcases/bad_when/telegraf.conf
Normal file
1
plugins/inputs/ntpq/testcases/bad_when/telegraf.conf
Normal file
|
@ -0,0 +1 @@
|
|||
[[inputs.ntpq]]
|
1
plugins/inputs/ntpq/testcases/days/expected.out
Normal file
1
plugins/inputs/ntpq/testcases/days/expected.out
Normal file
|
@ -0,0 +1 @@
|
|||
ntpq,remote=uschi5-ntp-002.,state_prefix=*,refid=10.177.80.46,stratum=2,type=u when=172800i,poll=256i,reach=37i,delay=51.016,offset=233.010,jitter=17.462 0
|
3
plugins/inputs/ntpq/testcases/days/input.txt
Normal file
3
plugins/inputs/ntpq/testcases/days/input.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
*uschi5-ntp-002. 10.177.80.46 2 u 2d 256 37 51.016 233.010 17.462
|
1
plugins/inputs/ntpq/testcases/days/telegraf.conf
Normal file
1
plugins/inputs/ntpq/testcases/days/telegraf.conf
Normal file
|
@ -0,0 +1 @@
|
|||
[[inputs.ntpq]]
|
1
plugins/inputs/ntpq/testcases/failed/expected.err
Normal file
1
plugins/inputs/ntpq/testcases/failed/expected.err
Normal file
|
@ -0,0 +1 @@
|
|||
test failure
|
1
plugins/inputs/ntpq/testcases/failed/input.err
Normal file
1
plugins/inputs/ntpq/testcases/failed/input.err
Normal file
|
@ -0,0 +1 @@
|
|||
test failure
|
3
plugins/inputs/ntpq/testcases/failed/input.txt
Normal file
3
plugins/inputs/ntpq/testcases/failed/input.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
*uschi5-ntp-002. 10.177.80.46 2 u 101 256 37 51.016 233.010 17.462
|
1
plugins/inputs/ntpq/testcases/failed/telegraf.conf
Normal file
1
plugins/inputs/ntpq/testcases/failed/telegraf.conf
Normal file
|
@ -0,0 +1 @@
|
|||
[[inputs.ntpq]]
|
1
plugins/inputs/ntpq/testcases/hours/expected.out
Normal file
1
plugins/inputs/ntpq/testcases/hours/expected.out
Normal file
|
@ -0,0 +1 @@
|
|||
ntpq,remote=uschi5-ntp-002.,state_prefix=*,refid=10.177.80.46,stratum=2,type=u when=7200i,poll=256i,reach=37i,delay=51.016,offset=233.010,jitter=17.462 0
|
3
plugins/inputs/ntpq/testcases/hours/input.txt
Normal file
3
plugins/inputs/ntpq/testcases/hours/input.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
*uschi5-ntp-002. 10.177.80.46 2 u 2h 256 37 51.016 233.010 17.462
|
1
plugins/inputs/ntpq/testcases/hours/telegraf.conf
Normal file
1
plugins/inputs/ntpq/testcases/hours/telegraf.conf
Normal file
|
@ -0,0 +1 @@
|
|||
[[inputs.ntpq]]
|
5
plugins/inputs/ntpq/testcases/issue_2386/expected.out
Normal file
5
plugins/inputs/ntpq/testcases/issue_2386/expected.out
Normal file
|
@ -0,0 +1,5 @@
|
|||
ntpq,remote=SHM(0),state_prefix=*,refid=.PPS.,stratum=1,type=u when=60i,poll=64i,reach=377i,delay=0.0,offset=0.045,jitter=1.012 0
|
||||
ntpq,remote=SHM(1),state_prefix=-,refid=.GPS.,stratum=1,type=u when=121i,poll=128i,reach=377i,delay=0.0,offset=10.105,jitter=2.012 0
|
||||
ntpq,remote=37.58.57.238,state_prefix=+,refid=192.53.103.103,stratum=2,type=u when=10i,poll=1024i,reach=377i,delay=1.748,offset=0.373,jitter=0.101 0
|
||||
ntpq,remote=37.58.57.238,state_prefix=+,refid=192.53.103.103,stratum=2,type=u when=10i,poll=1024i,reach=377i,delay=1.748,offset=0.373,jitter=0.101 0
|
||||
ntpq,remote=37.58.57.238,state_prefix=+,refid=192.53.103.103,stratum=2,type=u when=10i,poll=1024i,reach=377i,delay=1.748,offset=0.373,jitter=0.101 0
|
7
plugins/inputs/ntpq/testcases/issue_2386/input.txt
Normal file
7
plugins/inputs/ntpq/testcases/issue_2386/input.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
*SHM(0) .PPS. 1 u 60 64 377 0.000 0.045 1.012
|
||||
+37.58.57.238 (d 192.53.103.103 2 u 10 1024 377 1.748 0.373 0.101
|
||||
+37.58.57.238 (domain) 192.53.103.103 2 u 10 1024 377 1.748 0.373 0.101
|
||||
+37.58.57.238 ( 192.53.103.103 2 u 10 1024 377 1.748 0.373 0.101
|
||||
-SHM(1) .GPS. 1 u 121 128 377 0.000 10.105 2.012
|
3
plugins/inputs/ntpq/testcases/issue_2386/telegraf.conf
Normal file
3
plugins/inputs/ntpq/testcases/issue_2386/telegraf.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Test related to
|
||||
# https://github.com/influxdata/telegraf/issues/2386
|
||||
[[inputs.ntpq]]
|
1
plugins/inputs/ntpq/testcases/long_poll/expected.out
Normal file
1
plugins/inputs/ntpq/testcases/long_poll/expected.out
Normal file
|
@ -0,0 +1 @@
|
|||
ntpq,remote=uschi5-ntp-002.,state_prefix=-,refid=10.177.80.46,stratum=3,type=u when=617i,poll=4080i,reach=377i,delay=9.145,offset=2.849,jitter=1.192 0
|
3
plugins/inputs/ntpq/testcases/long_poll/input.txt
Normal file
3
plugins/inputs/ntpq/testcases/long_poll/input.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
-uschi5-ntp-002. 10.177.80.46 3 u 617 68m 377 9.145 +2.849 1.192
|
1
plugins/inputs/ntpq/testcases/long_poll/telegraf.conf
Normal file
1
plugins/inputs/ntpq/testcases/long_poll/telegraf.conf
Normal file
|
@ -0,0 +1 @@
|
|||
[[inputs.ntpq]]
|
1
plugins/inputs/ntpq/testcases/minutes/expected.out
Normal file
1
plugins/inputs/ntpq/testcases/minutes/expected.out
Normal file
|
@ -0,0 +1 @@
|
|||
ntpq,remote=uschi5-ntp-002.,state_prefix=*,refid=10.177.80.46,stratum=2,type=u when=120i,poll=256i,reach=37i,delay=51.016,offset=233.010,jitter=17.462 0
|
3
plugins/inputs/ntpq/testcases/minutes/input.txt
Normal file
3
plugins/inputs/ntpq/testcases/minutes/input.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
*uschi5-ntp-002. 10.177.80.46 2 u 2m 256 37 51.016 233.010 17.462
|
1
plugins/inputs/ntpq/testcases/minutes/telegraf.conf
Normal file
1
plugins/inputs/ntpq/testcases/minutes/telegraf.conf
Normal file
|
@ -0,0 +1 @@
|
|||
[[inputs.ntpq]]
|
|
@ -0,0 +1 @@
|
|||
ntpq,remote=uschi5-ntp-002.,state_prefix=*,refid=10.177.80.46,type=u when=101i,poll=256i,reach=37i,offset=233.010,jitter=17.462 0
|
|
@ -0,0 +1,3 @@
|
|||
remote refid foobar t when poll reach offset jitter
|
||||
==============================================================================
|
||||
*uschi5-ntp-002. 10.177.80.46 2 u 101 256 37 233.010 17.462
|
|
@ -0,0 +1 @@
|
|||
[[inputs.ntpq]]
|
5
plugins/inputs/ntpq/testcases/multi/expected.out
Normal file
5
plugins/inputs/ntpq/testcases/multi/expected.out
Normal file
|
@ -0,0 +1,5 @@
|
|||
ntpq,refid=10.177.80.37,remote=83.137.98.96,stratum=2,type=u delay=54.033,offset=243.426,jitter=449514,when=740i,poll=1024i,reach=377i 0
|
||||
ntpq,refid=10.177.80.37,remote=81.7.16.52,stratum=2,type=u reach=377i,delay=60.785,offset=232.597,jitter=449539,when=739i,poll=1024i 0
|
||||
ntpq,refid=10.177.80.37,remote=131.188.3.221,stratum=2,type=u when=783i,poll=1024i,reach=377i,delay=111.82,offset=261.921,jitter=449528 0
|
||||
ntpq,refid=10.177.80.37,remote=5.9.29.107,stratum=2,type=u reach=377i,delay=205.704,offset=160.406,jitter=449602,when=703i,poll=1024i 0
|
||||
ntpq,refid=10.177.80.37,remote=91.189.94.4,stratum=2,type=u offset=274.726,jitter=449445,when=673i,poll=1024i,reach=377i,delay=143.047 0
|
7
plugins/inputs/ntpq/testcases/multi/input.txt
Normal file
7
plugins/inputs/ntpq/testcases/multi/input.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
83.137.98.96 10.177.80.37 2 u 740 1024 377 54.033 243.426 449514.
|
||||
81.7.16.52 10.177.80.37 2 u 739 1024 377 60.785 232.597 449539.
|
||||
131.188.3.221 10.177.80.37 2 u 783 1024 377 111.820 261.921 449528.
|
||||
5.9.29.107 10.177.80.37 2 u 703 1024 377 205.704 160.406 449602.
|
||||
91.189.94.4 10.177.80.37 2 u 673 1024 377 143.047 274.726 449445.
|
1
plugins/inputs/ntpq/testcases/multi/telegraf.conf
Normal file
1
plugins/inputs/ntpq/testcases/multi/telegraf.conf
Normal file
|
@ -0,0 +1 @@
|
|||
[[inputs.ntpq]]
|
2
plugins/inputs/ntpq/testcases/no_ref_id/expected.out
Normal file
2
plugins/inputs/ntpq/testcases/no_ref_id/expected.out
Normal file
|
@ -0,0 +1,2 @@
|
|||
ntpq,remote=83.137.98.96,refid=10.177.80.37,stratum=2,type=u when=740i,poll=1024i,reach=377i,delay=54.033,offset=243.426,jitter=449514 0
|
||||
ntpq,remote=131.188.3.221,refid=10.177.80.37,stratum=2,type=u when=783i,poll=1024i,reach=377i,delay=111.820,offset=261.921,jitter=449528 0
|
5
plugins/inputs/ntpq/testcases/no_ref_id/input.txt
Normal file
5
plugins/inputs/ntpq/testcases/no_ref_id/input.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
83.137.98.96 10.177.80.37 2 u 740 1024 377 54.033 243.426 449514.
|
||||
91.189.94.4 2 u 673 1024 377 143.047 274.726 449445.
|
||||
131.188.3.221 10.177.80.37 2 u 783 1024 377 111.820 261.921 449528.
|
4
plugins/inputs/ntpq/testcases/no_ref_id/telegraf.conf
Normal file
4
plugins/inputs/ntpq/testcases/no_ref_id/telegraf.conf
Normal file
|
@ -0,0 +1,4 @@
|
|||
# It is possible for the output of ntqp to be missing the refid column. This
|
||||
# is believed to be http://bugs.ntp.org/show_bug.cgi?id=3484 which is fixed
|
||||
# in ntp-4.2.8p12 (included first in Debian Buster).
|
||||
[[inputs.ntpq]]
|
|
@ -0,0 +1,2 @@
|
|||
ntpq,remote=0.eu.pool.ntp.o,refid=.POOL.,stratum=16,type=p poll=64i,reach=0i,delay=0.0,offset=0.0,jitter=0.0 0
|
||||
ntpq,remote=195.201.19.162,refid=187.182.182.166,stratum=3,type=u poll=64i,reach=1i,delay=12.692,offset=1.283,jitter=0.0 0
|
4
plugins/inputs/ntpq/testcases/pool_when_minus/input.txt
Normal file
4
plugins/inputs/ntpq/testcases/pool_when_minus/input.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
0.eu.pool.ntp.o .POOL. 16 p - 64 0 0.000 +0.000 0.000
|
||||
195.201.19.162 187.182.182.166 3 u - 64 1 12.692 +1.283 0.000
|
|
@ -0,0 +1 @@
|
|||
[[inputs.ntpq]]
|
6
plugins/inputs/ntpq/testcases/servers/expected.out
Normal file
6
plugins/inputs/ntpq/testcases/servers/expected.out
Normal file
|
@ -0,0 +1,6 @@
|
|||
ntpq,source=serverA,refid=10.177.80.46,remote=uschi5-ntp-002.,state_prefix=*,stratum=2,type=u when=101i,poll=256i,reach=37i,delay=51.016,offset=233.010,jitter=17.462 0
|
||||
ntpq,source=serverB,refid=10.177.80.37,remote=83.137.98.96,stratum=2,type=u delay=54.033,offset=243.426,jitter=449514,when=740i,poll=1024i,reach=377i 0
|
||||
ntpq,source=serverB,refid=10.177.80.37,remote=81.7.16.52,stratum=2,type=u reach=377i,delay=60.785,offset=232.597,jitter=449539,when=739i,poll=1024i 0
|
||||
ntpq,source=serverB,refid=10.177.80.37,remote=131.188.3.221,stratum=2,type=u when=783i,poll=1024i,reach=377i,delay=111.82,offset=261.921,jitter=449528 0
|
||||
ntpq,source=serverB,refid=10.177.80.37,remote=5.9.29.107,stratum=2,type=u reach=377i,delay=205.704,offset=160.406,jitter=449602,when=703i,poll=1024i 0
|
||||
ntpq,source=serverB,refid=10.177.80.37,remote=91.189.94.4,stratum=2,type=u offset=274.726,jitter=449445,when=673i,poll=1024i,reach=377i,delay=143.047 0
|
3
plugins/inputs/ntpq/testcases/servers/input_serverA.txt
Normal file
3
plugins/inputs/ntpq/testcases/servers/input_serverA.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
*uschi5-ntp-002. 10.177.80.46 2 u 101 256 37 51.016 233.010 17.462
|
7
plugins/inputs/ntpq/testcases/servers/input_serverB.txt
Normal file
7
plugins/inputs/ntpq/testcases/servers/input_serverB.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
83.137.98.96 10.177.80.37 2 u 740 1024 377 54.033 243.426 449514.
|
||||
81.7.16.52 10.177.80.37 2 u 739 1024 377 60.785 232.597 449539.
|
||||
131.188.3.221 10.177.80.37 2 u 783 1024 377 111.820 261.921 449528.
|
||||
5.9.29.107 10.177.80.37 2 u 703 1024 377 205.704 160.406 449602.
|
||||
91.189.94.4 10.177.80.37 2 u 673 1024 377 143.047 274.726 449445.
|
2
plugins/inputs/ntpq/testcases/servers/telegraf.conf
Normal file
2
plugins/inputs/ntpq/testcases/servers/telegraf.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
[[inputs.ntpq]]
|
||||
servers = ["serverA", "serverB"]
|
|
@ -0,0 +1 @@
|
|||
[serverC] not authorized
|
|
@ -0,0 +1,6 @@
|
|||
ntpq,source=serverA,refid=10.177.80.46,remote=uschi5-ntp-002.,state_prefix=*,stratum=2,type=u when=101i,poll=256i,reach=37i,delay=51.016,offset=233.010,jitter=17.462 0
|
||||
ntpq,source=serverB,refid=10.177.80.37,remote=83.137.98.96,stratum=2,type=u delay=54.033,offset=243.426,jitter=449514,when=740i,poll=1024i,reach=377i 0
|
||||
ntpq,source=serverB,refid=10.177.80.37,remote=81.7.16.52,stratum=2,type=u reach=377i,delay=60.785,offset=232.597,jitter=449539,when=739i,poll=1024i 0
|
||||
ntpq,source=serverB,refid=10.177.80.37,remote=131.188.3.221,stratum=2,type=u when=783i,poll=1024i,reach=377i,delay=111.82,offset=261.921,jitter=449528 0
|
||||
ntpq,source=serverB,refid=10.177.80.37,remote=5.9.29.107,stratum=2,type=u reach=377i,delay=205.704,offset=160.406,jitter=449602,when=703i,poll=1024i 0
|
||||
ntpq,source=serverB,refid=10.177.80.37,remote=91.189.94.4,stratum=2,type=u offset=274.726,jitter=449445,when=673i,poll=1024i,reach=377i,delay=143.047 0
|
|
@ -0,0 +1,3 @@
|
|||
remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
*uschi5-ntp-002. 10.177.80.46 2 u 101 256 37 51.016 233.010 17.462
|
|
@ -0,0 +1,7 @@
|
|||
remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
83.137.98.96 10.177.80.37 2 u 740 1024 377 54.033 243.426 449514.
|
||||
81.7.16.52 10.177.80.37 2 u 739 1024 377 60.785 232.597 449539.
|
||||
131.188.3.221 10.177.80.37 2 u 783 1024 377 111.820 261.921 449528.
|
||||
5.9.29.107 10.177.80.37 2 u 703 1024 377 205.704 160.406 449602.
|
||||
91.189.94.4 10.177.80.37 2 u 673 1024 377 143.047 274.726 449445.
|
|
@ -0,0 +1 @@
|
|||
not authorized
|
|
@ -0,0 +1,2 @@
|
|||
[[inputs.ntpq]]
|
||||
servers = ["serverA", "serverB", "serverC"]
|
1
plugins/inputs/ntpq/testcases/single/expected.out
Normal file
1
plugins/inputs/ntpq/testcases/single/expected.out
Normal file
|
@ -0,0 +1 @@
|
|||
ntpq,remote=uschi5-ntp-002.,state_prefix=*,refid=10.177.80.46,stratum=2,type=u when=101i,poll=256i,reach=37i,delay=51.016,offset=233.010,jitter=17.462 0
|
3
plugins/inputs/ntpq/testcases/single/input.txt
Normal file
3
plugins/inputs/ntpq/testcases/single/input.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
*uschi5-ntp-002. 10.177.80.46 2 u 101 256 37 51.016 233.010 17.462
|
1
plugins/inputs/ntpq/testcases/single/telegraf.conf
Normal file
1
plugins/inputs/ntpq/testcases/single/telegraf.conf
Normal file
|
@ -0,0 +1 @@
|
|||
[[inputs.ntpq]]
|
|
@ -0,0 +1 @@
|
|||
ntpq,remote=uschi5-ntp-002.,state_prefix=*,refid=10.177.80.46,stratum=2,type=u when=101i,poll=256i,reach=5i,delay=51.016,offset=233.010,jitter=17.462 0
|
|
@ -0,0 +1,3 @@
|
|||
remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
*uschi5-ntp-002. 10.177.80.46 2 u 101 256 37 51.016 233.010 17.462
|
|
@ -0,0 +1,2 @@
|
|||
[[inputs.ntpq]]
|
||||
reach_format = "count"
|
|
@ -0,0 +1 @@
|
|||
ntpq,remote=uschi5-ntp-002.,state_prefix=*,refid=10.177.80.46,stratum=2,type=u when=101i,poll=256i,reach=31i,delay=51.016,offset=233.010,jitter=17.462 0
|
|
@ -0,0 +1,3 @@
|
|||
remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
*uschi5-ntp-002. 10.177.80.46 2 u 101 256 37 51.016 233.010 17.462
|
|
@ -0,0 +1,2 @@
|
|||
[[inputs.ntpq]]
|
||||
reach_format = "decimal"
|
|
@ -0,0 +1 @@
|
|||
ntpq,remote=uschi5-ntp-002.,state_prefix=*,refid=10.177.80.46,stratum=2,type=u when=101i,poll=256i,reach=37i,delay=51.016,offset=233.010,jitter=17.462 0
|
|
@ -0,0 +1,3 @@
|
|||
remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
*uschi5-ntp-002. 10.177.80.46 2 u 101 256 37 51.016 233.010 17.462
|
|
@ -0,0 +1,2 @@
|
|||
[[inputs.ntpq]]
|
||||
reach_format = "octal"
|
|
@ -0,0 +1 @@
|
|||
ntpq,remote=uschi5-ntp-002.,state_prefix=*,refid=10.177.80.46,stratum=2,type=u when=101i,poll=256i,reach=0.625,delay=51.016,offset=233.010,jitter=17.462 0
|
|
@ -0,0 +1,3 @@
|
|||
remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
*uschi5-ntp-002. 10.177.80.46 2 u 101 256 37 51.016 233.010 17.462
|
|
@ -0,0 +1,2 @@
|
|||
[[inputs.ntpq]]
|
||||
reach_format = "ratio"
|
Loading…
Add table
Add a link
Reference in a new issue