|
| 1 | +.. _chrony-receiver: |
| 2 | + |
| 3 | +**************************** |
| 4 | +Chrony receiver |
| 5 | +**************************** |
| 6 | + |
| 7 | +.. meta:: |
| 8 | + :description: Go implementation of the command chronyc tracking to allow for portability across systems and platforms. |
| 9 | + |
| 10 | +The Chrony receiver is a pure Go implementation of the command ``chronyc tracking`` to allow for portability across systems and platforms. The receiver produces all of the metrics that would typically be captured by the tracking command. |
| 11 | + |
| 12 | +For more information about Chrony, see :new-page:`Red Hat's Chrony suite documentation <https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-configuring_ntp_using_the_chrony_suite>`. |
| 13 | + |
| 14 | +Get started |
| 15 | +====================== |
| 16 | + |
| 17 | +Follow these steps to configure and activate the component: |
| 18 | + |
| 19 | +1. Deploy the Splunk Distribution of the OpenTelemetry Collector to your host or container platform: |
| 20 | + |
| 21 | + - :ref:`otel-install-linux` |
| 22 | + - :ref:`otel-install-windows` |
| 23 | + - :ref:`otel-install-k8s` |
| 24 | + |
| 25 | +2. Configure the Chrony receiver as described in the next section. |
| 26 | +3. Restart the Collector. |
| 27 | + |
| 28 | +Default configuration |
| 29 | +-------------------------------- |
| 30 | + |
| 31 | +To activate the receiver, add ``chrony`` to the ``receivers`` section of your configuration file: |
| 32 | + |
| 33 | +.. code:: yaml |
| 34 | +
|
| 35 | + receivers: |
| 36 | + chrony/defaults: |
| 37 | + endpoint: unix:///var/run/chrony/chronyd.sock # The default port by chronyd to allow cmd access |
| 38 | + timeout: 10s # Allowing at least 10s for chronyd to respond before giving up |
| 39 | +
|
| 40 | +Next, include the receiver in the ``metrics`` pipeline of the ``service`` section of your configuration file: |
| 41 | + |
| 42 | +.. code:: yaml |
| 43 | +
|
| 44 | + service: |
| 45 | + pipelines: |
| 46 | + metrics: |
| 47 | + receivers: |
| 48 | + - chrony |
| 49 | +
|
| 50 | +Advanced configuration |
| 51 | +----------------------------------------------- |
| 52 | + |
| 53 | +You can use the following settings: |
| 54 | + |
| 55 | +* ``endpoint``. Required. The address where ``chrony`` communicates to. Allowed formats are: |
| 56 | + |
| 57 | + * udp://hostname:port |
| 58 | + |
| 59 | + * unixgram:///path/to/chrony/sock |
| 60 | + |
| 61 | + * unix:///path/to/chrony.sock - Note the triple slash. Unix is converted to unixgram. |
| 62 | + |
| 63 | +* ``timeout``. Optional. The total amount of time allowed to read and process the data from chronyd. Use at least 1 second. |
| 64 | + |
| 65 | +* ``collection_interval``. Determines how often to query Chrony. |
| 66 | + |
| 67 | +* ``initial_delay``. Optional. ``1s`` by default. Defines how long this receiver waits before starting. See more in :new-page:`Red Hat's Chrony suite documentation <https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-configuring_ntp_using_the_chrony_suite>`. |
| 68 | + |
| 69 | + |
| 70 | +* ``metrics``. Optional. Metrics to export. See the :new-page:`metric documentation in GitHub <https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/chronyreceiver/documentation.md>`. |
| 71 | + |
| 72 | +Configuration example |
| 73 | +----------------------------------------------- |
| 74 | + |
| 75 | +See the following configuration example: |
| 76 | + |
| 77 | +.. code:: yaml |
| 78 | +
|
| 79 | + receivers: |
| 80 | + chrony: |
| 81 | + endpoint: unix:///var/run/chrony/chronyd.sock |
| 82 | + timeout: 10s |
| 83 | + collection_interval: 30s |
| 84 | + metrics: |
| 85 | + ntp.skew: |
| 86 | + enabled: true |
| 87 | + ntp.stratum: |
| 88 | + enabled: true |
| 89 | +
|
| 90 | +.. _chrony-receiver-settings: |
| 91 | + |
| 92 | +Settings |
| 93 | +====================== |
| 94 | + |
| 95 | +The following table shows the configuration options for the Chrony receiver: |
| 96 | + |
| 97 | +.. raw:: html |
| 98 | + |
| 99 | + <div class="metrics-standard" category="included" url="https://raw.githubusercontent.com/splunk/collector-config-tools/main/cfg-metadata/receiver/chrony.yaml"></div> |
| 100 | + |
| 101 | +.. _metrics-receiver-settings: |
| 102 | + |
| 103 | +Metrics |
| 104 | +======================= |
| 105 | + |
| 106 | +The following metrics, resource attributes, and attributes, are available. |
| 107 | + |
| 108 | +.. raw:: html |
| 109 | + |
| 110 | + <div class="metrics-component" category="included" url="https://raw.githubusercontent.com/splunk/collector-config-tools/main/metric-metadata/chronyreceiver.yaml"></div> |
| 111 | + |
| 112 | +See also the :new-page:`metric documentation in GitHub <https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/chronyreceiver/documentation.md>`. |
| 113 | + |
| 114 | +.. include:: /_includes/activate-deactivate-native-metrics.rst |
| 115 | + |
| 116 | +Troubleshooting |
| 117 | +====================== |
| 118 | + |
| 119 | +.. include:: /_includes/troubleshooting-components.rst |
0 commit comments