Adafruit Industries, Essential service and business: NYC – Executive Order 202.6 - Read more.
0

Unable to configure Telegraf MQTT Output
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

Unable to configure Telegraf MQTT Output

by MinusMyX on Tue Mar 03, 2020 5:38 am

Hi, im new in Adafruit , made some python Projects and working perfectly. But when i move some other sensor information througt Telegraf-SNMP-MQTT , im unable to publish .

I've tried some options to fit Adafruit IO naming conventions, but when i think it's configured none of the debug tells me nothing even in Monitor Section.

Sometimes i say that Telegraf Adds my hostname in my feed name, so instead MYUSERNAME/feeds/FeedName i have seen MYUSERNAME/feeds/HOSTNAME/FeedName when firstly configuring, but even using a group named like the hostname that telegraf adds. But that does not match correctly to the feed name, because it would be MYUSERNAME/feeds/HOSTNAME.FeedName

¿Any idea how to renaming topics with Telegraf?

[[inputs.snmp]]
agents = [ "192.168.1.99:161" ]
version = 2
community = "$MYSNMPCOMMUNITY"

[[outputs.mqtt]]
## URLs of mqtt brokers
servers = ["io.adafruit.com:1883"]

## topic for producer messages
topic_prefix = "$MYADAFRUITUSERNAME/feeds/"

## QoS policy for messages
## 0 = at most once
## 1 = at least once
## 2 = exactly once
qos = 1

MinusMyX
 
Posts: 1
Joined: Tue Mar 03, 2020 5:36 am

Re: Unable to configure Telegraf MQTT Output

by brubell on Tue Mar 03, 2020 10:31 am

It should be:

Code: Select all | TOGGLE FULL SIZE
USERNAME/feeds/FeedName


If you're publishing to an invalid feed with an error, the io monitor page (http://io.adafruit.com/monitor) should display a live-feed of errors.


Does Telegraf-SNMP-MQTT have any type of debugging output where you can view what the topic string looks like when it publishes? Does it return an authorization error?

brubell
 
Posts: 792
Joined: Fri Jul 17, 2015 10:33 pm

Please be positive and constructive with your questions and comments.