Adding NTP Drift as a metric via StatsD

Problem

For critical microservices, NTP sync can be important, and you may want to measure the drift of NTP within Instana. This also serves as template for any additional metrics you might want to consume in Instana.

Solution

Instana offers StatsD metrics collection for any adhoc counts you may want to observe.

  1. Enable StatsD Metric collection in the configuration.yaml (Described here)
  2. Schedule this two liner...

jitter=$(ntpstat | awk 'FNR == 2 {print $5}') echo "Time Offset ms:$jitter|g" | nc -u -w0 127.0.0.1 8125

 

Note:
A gauge rather than counter as it keeps the fixed value.
StatsD Counters appear within the host dashboard.

Have more questions? Submit a request

Comments