Monitoring a DCF77 NTP Server

Now that you’re monitoring the Linux operating system as well as the NTP server basics, it’s interesting to have a look at some more details about the DCF77 receiver. Honestly, there is only one more variable that gives a few details, namely the Clock Status Word and its Event Field. At least you have one more graph in your monitoring system. ;)

This article is one of many blog posts within this NTP series. Please have a look!

There is an event field within the clock status word that consists of these values:

  • 0 nominal
  • 1 no reply to poll
  • 2 bad timecode format
  • 3 hardware or software fault
  • 4 signal loss
  • 5 bad date format
  • 6 bad time format

You can query this via ntpq and its “clockvar” request. Have a look at the first output line. The fourth number after “status=” is the event field, in this example a zero:

Using grep ‘n sed again you can exempt this single event field id from all the others:

In the end, my MRTG config for this looks like this:

Note that I am using the “routers.cgi*Comment” option to display a single line with some comments underneath the RRD graphs:

Of course, this clockvar graph correlates with other stats out of the DCF77 NTP server, such as the reach graph or the iostats. For example, I had this “bad timecode” in the above graph for about 1 hour. Similarly, the other graphs show some suspicious values as well, while you know now the actual root cause, namely “bad timecode”.

However, to be honest, I am not looking at this clockvar graph that much, since the reach already shows me whether my server is up and running or not. But, you know, because I can… ;)

Featured image “Dusty” by Thomas Hawk is licensed under CC BY-NC 2.0.

Leave a Reply

Your email address will not be published. Required fields are marked *