Telegraf to get data from Mongodb

Hi

i am new to influxdata, i had data stored in mongo db (e.g. counts across time) and i am trying to use Telegraf plugin to interface with the mongodb . But judging from the plugin(telegraf/plugins/inputs/mongodb at master · influxdata/telegraf · GitHub), it seem to be a metric type to see how is the mongodb performing,

What i want to have is to be able to extract out the data from the mongodb using Telegraf and write into the influxdata, Is this possible? could show some links or examples? I understand alternatively, is to have a e.g. python program to write straight into the influxdb but this is not what am looking for. Appreciate if there is any examples or link about it, thank you

Yes, this input plugin is for performance monitoring of the mongodb engine itself - not querying the database.
AFAIK there is no Telegraf input plugin available yet, that can query a mongodb database.

One possible solution would be:
With the inputs.execd Plugin you can include your own “plugin” in any programming language.
If you are fluent in Python, this should not be a big problem and be done in a few lines of code.

1 Like