Send data to different influx DB(same box) database instances?

Hello Experts,

Greetings!!

I am working on making graph in Grafana with help of telegraf and influx. I had created 2 different conf files in telegraf. I mentioned 2 different DB names(which reside on same box) in 2 conf files but I am seeing out of 2 conf files(1 out of the box telegraf.conf and test.conf) data is getting written in both DBs, which is not the expecteation here. Expectation here is that respective conf files write data into their respective mentioned dbs only.

Could experts or @Anaisdg please do help me here will be grateful to you.

Thanks,
R. Singh

Hello @Ravinder_Singh,
Can you please share your configs?
If your plugins are in the same config, you’ll need to employ filtering in order to differentiate multiple input and output paths.

1 Like

Hello @Anaisdg Thanks a TON for your reply it’s like my config file is same which I had shown in previous post of mine(apologies I am typing this in mobile so couldn’t paste it right now, it’s late night here)

My main question in a newbie language is: can I place 2 outputs.influx in telegraf.conf?

Why I am saying this is I need to manage multiple apps so I am thinking to have multiple dB(schema) names to manage them easily. It means some of my modules I want them to write one dB and another in other dB on same telegraf.conf file.

I have tried putting multiple outputs.influx but I think I got errors after restarting telegraf instance

PS: For my previous question’s answer I will do a write up tomorrow :slightly_smiling_face:

Thanks a TON again for your reply and guidance here.

Thanks,
R. Singh

Yup you can have two outputs.influx in your telegraf conf. By default, all of your metrics will be writtten to both influxdb outputs.However if you want to send metrics to one influxdb and the rest of the metrics to another influxdb, then you’ll have to use namepass and maybe ‘namedrop’ which is a filtering configuration.
Please include you conf and telegraf logs/errors so we can help debug when you get the chance.

1 Like

@Anaisdg, Wow that’s great, thanks a lot for your guidance here. I will share my config file in morning and who knows after reading this filtering concept it may fix also :slightly_smiling_face:

Appreciate your help and helping attitude :+1: you guys are great forum :slight_smile:

I will get back to you on same.

Thanks,
R. Singh

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.