Can I use multiple data sources in one graph?

I want to mimic down sampling feature by federation.

Here’s how I planned it.

  1. run two prometheus instance with distinct retention. Instance A is for collecting raw data and instance B is for collecting down sampling data.

  2. A collects metrics every 5 seconds. B collects metrics every 30 seconds via federation.

It works well. However, a separate graph from the raw data is required for down sampling data.

I’d like to draw a graph by taking the old data from B and the latest data from A. Is this possible?

You can not have a single graph fetching data from two different data sources. Although you can query data with multiple queries but they are on same data source.

Well, for aggregation, you dont have to have separate instance of db, it can be same and then right a logic to query from certain tables if the selected interval is more than certain interval.

Not sure if this gives you some direction. But surely for same panel its not possible to fetch data from two different sources.

1 Like