- What Grafana version and what operating system are you using?
My version: 9.5 - What are you trying to achieve?
I’m quite new to Graphan and I’m just starting to learn its functionality, at the moment I don’t really understand how to rename my values to what I’d like, I’ve already seen and used the approach of outputting instead of value the value via “Display Name” and it’s great works, but currently I have only numeric IDs in my tags and I have a list in variables with a value in the form of the same id (of numeric type) and the corresponding tag in value, can I somehow match one with the other and output what I need? Is it possible there is some other lean way but through the influx console through which grafana receives data.
Not sure that I understood correctly what you were trying to achieve, but here are some ideas that probably worth looking at:
- Use map function in your InfluxDB query so as to create mapping “numeric ID - text”
- Use value mapping feature of Grafana:
I was thinking about the map method, my problem is that in the points I store tags by which I group them as numerical identifiers, and I have names for these identifiers that are in PostgreSQL and I want to somehow, if possible, equate tag_id to name_in_db_by_tag_id or, as an option, it is possible to get data from Variables in the graph itself, in which I conditionally already used the Query selector type and wrote something like SELECT tag_id as __value, tag_name as __name FROM table
.
Like, I don’t want to store the value of the name, which is hidden behind the ID because it can either change, and this is a lot of data that will be stored in influx in one line, unlike a number.
Like all I want to take from the record:
measuremant, tagKey=10, tagKey2=20 value=0.56
in the legend instead of:
value={tagKey=10,tagKey2=20} 0.56
to display something like
value={tagKey=NameById10,tagKey2=NameById20} 0.56
And in general
NameById10 | NameById20 0.56
But until the last option, I will be able to convert through regular expressions, but how can I, having the identifier in my tags, map the name that is stored in my Postgres database