Re: [chrony-users] Monitoring Chrony

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


It makes sense, but the real problem is the there are ordering issues with the way things are processed in most of the stats outputs.

For example in the sources/sourcestats, the code walks each source and outputs all the stats for each source.

Prometheus expects metrics to be output in order of metric.  For example all of the offsets for each source.

I had a discussion with another person over the weekend, and I think what we're going to do is to abandon the text metrics output idea and implement the chronyd protocol (probably in Go) so that we can build a direct Prometheus exporter.

- Ben Kochie

On Mon, Feb 29, 2016 at 10:10 AM, Miroslav Lichvar <mlichvar@xxxxxxxxxx> wrote:
(this discussion would better fit the chrony-devel list)

On Sat, Feb 27, 2016 at 03:08:12PM +0100, Ben Kochie wrote:
> So I started work on adding a "metrics" command to client.c.  It's pretty
> hacky, but works.
>
> https://github.com/SuperQ/chrony/pull/1
>
> Comments welcome.

Ok, so you implemented the metrics command as a new function which
does the same as the serverstats command, but uses a different output
format. I assume you would extend it later to include also the
tracking, sources and sourcestats data. That would be a lot of
duplicated code.

As I said in the previous mail, I'd rather see it implemented as a
different output format for the existing commands. A new chronyc
option could be added to select the format, with default being the
currently used human-readable output. A new printf-like function would
be added, which would support printing hostnames or IP addresses, time
intervals, offsets, and all other data that need to be printed.
Depending on what output mode chronyc was running in, it would print
the labels, align the columns, print the values with units, print end
of lines, etc. All functions that implement the individual commands
would then be modified to use this new function.

I'm planning to look into this in the next few weeks. At this point
I'm mainly interested in adding the CSV format to allow easy parsing
in shell, but I think the Prometheus format could be added too.

Does this make sense?

--
Miroslav Lichvar

--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/