A question on collectd (ntpd stats)

I downloaded collectd-mod-ntpd via opkg and went to `LuCI Statistics/Setup to config/enable the plugin, only to find one didn't exist.

opkg list-installed returns collectd-mod-ntpd - 5.12.0-9 and opkg tells me the file exists at /usr/lib/collectd/ntpd.so that appears to be a shared library. Obviously unreadable but I also couldn't find a collectd ntpd plugin which I expected.

Oddly, there is no ntpd plugin in the repository
packages/utils/collectd/files/usr/share/collectd/plugin/ and looking at the makefile I see that ntpd is in the list of COLLECTD_PLUGINS_SELECTED.

Now I know why, but the question is how to get what I want.

I'm thinking I can create the requisite plugin to my own needs and just plop it in locally and update configs. Is that possible?

Ask a stupid question and . . . :roll_eyes:

Missed the obvious - needs a ntpd.js script in luci-app-statistics to render the form and I’m not sure I want to go down that road.

Note that there is already LuCI support for the chrony ntpd daemon. You could replace the buildbot ntpd with chrony and use those stats.

See discussion in
Help create graph description for collectd-mod-chrony

collectd-mod-ntpd seems to be built quite ok.
e.g. https://downloads.openwrt.org/snapshots/packages/arm_cortex-a15_neon-vfpv4/packages/collectd-mod-ntpd_5.12.0-9_arm_cortex-a15_neon-vfpv4.ipk

But no LuCI support for it has ever been created. Collectd has tons of plugins, but support for LuCI statistics has been built only for some.

It should be rather easy to create LuCI support also for the normal ntpd by replicating / modifying this commit to suit the collectd ntpd plugin needs:

Out of curiosity, have you verified that the busybox ntpd does actually provide the statistics query interface that collectd could use?

Not so sure about that...

I wasn't aware of chrony. Thanks for that, I'll take a look.

Yes, I selected it in make menuconfig figuring it was a usable plugin in Openwrt and went searching when it didn't show up in luci-app-statistics. Maybe the makefile could be updated to enable only support for plugins that LuCI statistics have been built?

Well, that appears to be definitive.

I will mark this Solved. Thanks, it answered my question. Still got my issue with recent rrd issue saying it can't update because last update was in the future. I'll see what other options I can dig up.

Nice! I'm thinking it might be wise to run it as a server on my main box (with a real RTC) that is on the same UPS as the router, and serve it to my local subnet(s) (rather than polling the servers through the router) and see if things improve/sync.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.