When to use multiple databases?

Wondering what the best practice is for when to create multiple databases, vs. storing all measurements in a single database.

Thanks!

1 Like

I’m also very curious about this. @dcdadwallader, did you find any other resources to answer this question?

When we first built our TIG stack, we made separate databases for different metrics sets (such as default windows performance counters vs. SQL Server data) - but I’m wondering if it would have made more sense just to have all metrics in one DB for the application.

I was just wondering this exact same thing. Sadly this topic hasn’t been answered yet. Can anybody suggest what they have done?

One disadvantage I see to having your TIC stack across multiple databases is that you then have to go into adding multiple data sources in Grafana. It just adds one extra level of selection making dashboard a little longer to create.

However for performance I’m not sure if there is any negative impact in throwing all your measurements into a single database.

This is a super old thread so maybe next time we should consider opening a new thread up?

To answer the question: there is no answer. It all depends on your data, your users, etc. Typically what we do(at scale) is pipe all “standard” metrics into the telegraf database. Basically anything that Telegraf collects naturally and is structured goes into that database. Any custom metrics go into their own database

For example, if you use the httpjson then we would pipe that to a separate database. This prevents “custom” metrics from polluting the core Telegraf data.

Another example is if you are using the logparser input plugin. If you had a retention period set for 365 days and then added in the logparser input plugin, that will drastically increase your storage needs so instead you send logparser to the “logs” database with a retention period of 14 days and standard Telegraf data to the telegraf database.

Let me know if that makes sense