Grafana Datasource with Redundancy

Hello,

I’d like to know if there is redundancy while connecting datasources on Grafana. I have two redundancy SCADAs with separate servers and on that servers we have two SQL databases which redundancy by SCADA application. (Architecture is in below.) It means SCADA replicate two database each other. But when SCADA is turned off, database is not replicating anymore. (SCADAs are replicating by period (every day at 00:00 am)). I installed Grafana on one server (Let’s say Server 1) not both of them. I can reach one datasource on server where I installed Grafana.

(last 7 days)

So, while Server 1 is turned off, I can’t reach Grafana. Normal

While Server 1 is turned on, but if Scada 1 is turned off, I reach no data values. That’s not ok.

I want that,

while Server 1 is turned off, I can’t reach Grafana. That’s ok.

While Server 1 is turned on but if Scada 1 is turned off, I should reach values. ( By redundancy I should reach Server 2’s datasource.)

Is there anyway to make redundancy two datasource?

My architecture is in below.

architecture

Scenario:

senario

Hi @banudur, I don’t believe that Grafana natively supports datasource redundancy - i.e. the ability to define multiple servers for a single datasource, and fall back to a different one if the first one is not responsive.

That said, there are plenty of approaches out there that should allow you to achieve what you need - namely, failover between two SQL instances. What would work best for you will depend on the specific flavor of SQL database you’re using, and will be separate from Grafana itself. Maybe check out some online resources like Automatic Failover | Microsoft Docs for ideas.

Without setting up a separate failover service, one “quick and dirty” (very dirty!) solution within Grafana may be to define both databases as separate datasources, and have your charts query both (i.e. duplicate all your queries). That way, if at least one of the sources is available, data will show up. (though if both of them are available, data will show up twice)