I have a QuestDB Enterprise cluster, and I would like to be able to know if I am working with a primary or a replica from the web console.
I can execute a query like select value from (show parameters) where property_path='replication.role';
to get back primary
or replica
, but what I would like is some way of adding visually to the web console the label directly, in the same way that at the bottom right it shows the QuestDB version I am using.
There is a trick that works both for QuestDB Open Source and for QuestDB Enterprise.
These two environment variables are picked by the web console:
export QDB_INSTANCE_NAME=WhatEverName
export QDB_INSTANCE_RGB=b
The second option needs to be lowercase r
,g
, or ,b
and it will set the background for the text you enter for the first variable. This displays at the top left of your web console, as in this screenshot.