Collectd MQTT:plugin

Hi there I was wondering if you planning to incorporated collectd MQTT:plugin in to the openwrt Project.. as I have started using openwrt as my IOT Base currently I run nodejs version of freeboard on it or node-red Dashboard -- but I like freeboard as you can do things much easier within it . and it working very well and i am very happy with it an how it operates.. but it would be nice to have collectd Mqtt plugin then i could visualize and store mqtt sends for historic info easier instead of building it in the background.. but another reason I would not mind the collectd MQTT plugin is that i can use the small software package i built for it that will send colectd Data to an inffuxdb server..

if you are curious here an image of the IOT management via openwrt device

if you want a copy of my Collectd software it pretty simple.. let me know and I will upload it to github

1 Like

and sending data to Influxdb and a grafana frontend from openwrt

No, as there has been no interest for it...

but nothing prevents you from modifying the collectd Makefile in Openwrt, enabling mqtt plugin and then compiling a personal version of collectd and the mqtt plugin for yourself.

Looks like it has a dependency on libmosquitto, but nothing else.

So, the needed changes should be rather small:

But note that that will only enabled the collectd data collection side. If you want graphs in LuCI, you need to define them separately in LuCI statistics sources, or elsewhere as you already seem to be planning.

okay never compile a version of openwrt - so I will see what I can do..
so basically move the MQTT from the disabled side to enabled side
and add this line
$(eval $(call BuildPlugin,mqtt,read variables through libmosquitto,mqtt,+PACKAGE_collectd-mod-mqtt:libmosquitto)).

I would not mind defining them in luci statistic for easier configuration. i assume the luci-statistic sources are found in the same github repository .

okay thank you for you help--

oh my that's a lot to install to compile a 30 kb file

hi hnymne.. i tried compiling but i get errors

is this the format that i follow
make menuconfig

make menuconfig -> check collect-mod-mqtt and libmosquitto
make tools/install
make toolchain/install
make target/compile

make package/feeds/packages/collectd/compile
make package/feeds/packages/collectd/install
make package/index

i get warning
WARNING: Makefile 'package/feeds/packages/openvswitch/Makefile' has a dependency on 'openvswitch-base', which does not exist

but it seams to work for collectd compile but fails at collectd install

make[1]: *** No rule to make target 'package/feeds/packages/collectd/install'. Stop.

also it seams to compile in mips i guess i need to go a different route sdk for armcodex7 family

and follow this page "Using the SDK"

Looks strange that you have two times feeds/packages in the command.
It should be just
make package/collectd/compile
That should generate the ipk file that you can install with opkg.

Are you using SDK or full source toolchain?
The commands look like you are using full source toolchain. That is ok, as I do always it with full sources.

But you need to specify the correct router device in menuconfig, so that the correct arm mips x86 target architecture gets selected.

I pushed the change to packages feed repo:

Buildbot will now build it automatically as collectd 5.8.0-3

thank you for the push to the feed repo - but I am a dog with a bone i still can not get it to compile for me
even with make package/collectd/compile i get error now it looks like it says nothing to compile error where as before it compiled with no error

make[2]: Entering directory '/home/stephen/openwrt/feeds/packages/utils/collectd'
make[2]: Nothing to be done for 'compile'.
make[2]: Leaving directory '/home/stephen/openwrt/feeds/packages/utils/collectd'

I must be missing a step somewhere -- perhaps i will start fresh with a new openwrt download and try again in case I messed something up when I used the wrong compile instruction earlier any suggestions ??? as i am doing the full source toolchain

have you selected the collect-mod-mqtt package in menuconfig?

Well, above you said that you did check that option, so that is likely ok.

You might start over.

git clone ...
cd to buildroot dir
./scripts/feeds update
./scripts/feeds/install -a
make menuconfig (select device and packages)
make (to make a full firmware (and naturally also the collectd .ipk files that you can install separately)

i did at first but I see when I switched target they were removed from selection.. I tried again and it seams too have worked this time .. but i see I have to upgrade all of collectd mods that i use they all changed to version 5.8 i looked at luci statistics it does not seam to be to hard to to introduce mqtt to it but I will see once I look at that a little deeper.. okay thank you for your help greatly appreciated

Hello Sash99,

I have a TP-Link Archer C7 with OpenWRT onboard.
I would like to monitor it with Grafana but as I am new to collectd, influx, grafana, I do some research on Googland and have found your topic :wink:

Do you think you can help me to do this?

Many thanks in advance!

PS: I plan to install all the "server" parts for collectd, Influx and Grafana on a Debian VM in a Proxmox node.

did you try this software I hope it works for you as my development was on BPI R1 and not a TP-Link Archer C7