I am using two telegraf services running on my rpi, but they stop working every time my rpi boots. If I load the token and telegraf cofiguration after boot it will all work fine until next reboot. I checked this thread Telegraf failed to start after reboot, and my telegraf service already shows *** network-online.target`as in the solution for that thread.
not sure if this is the log file for troubleshooting, but here is part of it.
Apr 03 09:33:03 Octopi systemd[1]: Starting Telegraf…
Apr 03 09:33:31 Octopi telegraf[1238]: 2024-04-03T13:33:31Z I! Loading config: /etc/telegraf/telegraf.conf
Apr 03 09:33:32 Octopi telegraf[1238]: 2024-04-03T13:33:32Z E! [telegraf] Error running agent: no outputs found, did you provide a valid config file?
Apr 03 09:33:32 Octopi systemd[1]: telegraf.service: Main process exited, code=exited, status=1/FAILURE
Apr 03 09:33:32 Octopi systemd[1]: telegraf.service: Failed with result ‘exit-code’.
Apr 03 09:33:32 Octopi systemd[1]: Failed to start Telegraf.
Apr 03 09:33:32 Octopi systemd[1]: telegraf.service: Consumed 1.757s CPU time.
Apr 03 09:33:32 Octopi systemd[1]: telegraf.service: Scheduled restart job, restart counter is at 1.
Apr 03 09:33:32 Octopi systemd[1]: Stopped Telegraf.
Apr 03 09:33:32 Octopi systemd[1]: telegraf.service: Consumed 1.757s CPU time.
Apr 03 09:33:32 Octopi systemd[1]: Starting Telegraf…
Apr 03 09:33:33 Octopi telegraf[1702]: 2024-04-03T13:33:33Z I! Loading config: /etc/telegraf/telegraf.conf
Apr 03 09:33:33 Octopi telegraf[1702]: 2024-04-03T13:33:33Z E! [telegraf] Error running agent: no outputs found, did you provide a valid config file?
Apr 03 09:33:33 Octopi systemd[1]: telegraf.service: Main process exited, code=exited, status=1/FAILURE
Apr 03 09:33:33 Octopi systemd[1]: telegraf.service: Failed with result ‘exit-code’.
Apr 03 09:33:33 Octopi systemd[1]: Failed to start Telegraf.
Apr 03 09:33:34 Octopi systemd[1]: telegraf.service: Scheduled restart job, restart counter is at 2.
Apr 03 09:33:34 Octopi systemd[1]: Stopped Telegraf.
Apr 03 09:33:34 Octopi systemd[1]: Starting Telegraf…
Apr 03 09:33:35 Octopi telegraf[1754]: 2024-04-03T13:33:35Z I! Loading config: /etc/telegraf/telegraf.conf
Apr 03 09:33:36 Octopi telegraf[1754]: 2024-04-03T13:33:36Z E! [telegraf] Error running agent: no outputs found, did you provide a valid config file?
Apr 03 09:33:36 Octopi systemd[1]: telegraf.service: Main process exited, code=exited, status=1/FAILURE
Apr 03 09:33:36 Octopi systemd[1]: telegraf.service: Failed with result ‘exit-code’.
Apr 03 09:33:36 Octopi systemd[1]: Failed to start Telegraf.
Apr 03 09:33:36 Octopi systemd[1]: telegraf.service: Scheduled restart job, restart counter is at 3.
Apr 03 09:33:36 Octopi systemd[1]: Stopped Telegraf.
Apr 03 09:33:36 Octopi systemd[1]: Starting Telegraf…
Apr 03 09:33:38 Octopi telegraf[1847]: 2024-04-03T13:33:38Z I! Loading config: /etc/telegraf/telegraf.conf
Apr 03 09:33:38 Octopi telegraf[1847]: 2024-04-03T13:33:38Z E! [telegraf] Error running agent: no outputs found, did you provide a valid config file?
Apr 03 09:33:38 Octopi systemd[1]: telegraf.service: Main process exited, code=exited, status=1/FAILURE
Apr 03 09:33:38 Octopi systemd[1]: telegraf.service: Failed with result ‘exit-code’.
Apr 03 09:33:38 Octopi systemd[1]: Failed to start Telegraf.
Apr 03 09:33:38 Octopi systemd[1]: telegraf.service: Scheduled restart job, restart counter is at 4.
Apr 03 09:33:38 Octopi systemd[1]: Stopped Telegraf.
Apr 03 09:33:38 Octopi systemd[1]: Starting Telegraf…
Apr 03 09:33:39 Octopi telegraf[1902]: 2024-04-03T13:33:39Z I! Loading config: /etc/telegraf/telegraf.conf
Apr 03 09:33:39 Octopi telegraf[1902]: 2024-04-03T13:33:39Z E! [telegraf] Error running agent: no outputs found, did you provide a valid config file?
Apr 03 09:33:39 Octopi systemd[1]: telegraf.service: Main process exited, code=exited, status=1/FAILURE
Apr 03 09:33:39 Octopi systemd[1]: telegraf.service: Failed with result ‘exit-code’.
Apr 03 09:33:39 Octopi systemd[1]: Failed to start Telegraf.
Apr 03 09:33:39 Octopi systemd[1]: telegraf.service: Scheduled restart job, restart counter is at 5.
Apr 03 09:33:39 Octopi systemd[1]: Stopped Telegraf.
Apr 03 09:33:40 Octopi systemd[1]: Starting Telegraf…
Apr 03 09:33:41 Octopi telegraf[1935]: 2024-04-03T13:33:41Z I! Loading config: /etc/telegraf/telegraf.conf
Apr 03 09:33:41 Octopi telegraf[1935]: 2024-04-03T13:33:41Z E! [telegraf] Error running agent: no outputs found, did you provide a valid config file?
Apr 03 09:33:41 Octopi systemd[1]: telegraf.service: Main process exited, code=exited, status=1/FAILURE
Apr 03 09:33:41 Octopi systemd[1]: telegraf.service: Failed with result ‘exit-code’.
Apr 03 09:33:41 Octopi systemd[1]: Failed to start Telegraf.
Apr 03 09:33:41 Octopi systemd[1]: telegraf.service: Scheduled restart job, restart counter is at 6.
Apr 03 09:33:41 Octopi systemd[1]: Stopped Telegraf.
Apr 03 09:33:41 Octopi systemd[1]: telegraf.service: Start request repeated too quickly.
Apr 03 09:33:41 Octopi systemd[1]: telegraf.service: Failed with result ‘exit-code’.
Apr 03 09:33:41 Octopi systemd[1]: Failed to start Telegraf.
Apr 03 16:59:42 Octopi systemd[1]: /lib/systemd/system/telegraf.service:12: Unknown key name ‘ImportCredential’ in section ‘Service’, ignoring.
thanks in advance for any help.