And until this command runs my telegraf grabs data from sensors and I see them on the dashboards. But when I break to run this command then data from my sensors aren’t delivered to the telegraf.
So my question is: what do I have to do to my MQTT scrapper start when my server starts or after rebooting, without my intervention?
To simplify my question. I want to have my telegraf scrapper running as a service. And it can restart when any error occurs. For example something like that:
Hi @marekpow,
The service looks great. You can install Telegraf directly as a service though you would still have to edit the service file to point at your hosted Telegraf config in InfluxDB. In default installations the service will look for the Telegraf config at /etc/telegraf/telegraf.conf
@Jay_Clifford I have the Telegraf service installed as a service by default. I’m asked what to do with the MQTT scrapper. And finally, I found such a solution.
Yes, I do. I use it on several Debian & Devuan machines to manage services
like rsyslog, Apache, Icinga, Asterisk, FreeSwitch, InfluxDB, Mosquitto,
OpenVPN, telegraf, Grafana, MariaDB and corosync (which in turn manages
clusters of HA resources). I also use it to manage non-standard applications
and general scripts.
In my opinion monit is simple to configure, light on resources, and produces
helpful log file entries.