novalabs / grafana-annotations-panel

Annotations panel for Grafana
Apache License 2.0
5 stars 7 forks source link

add non global annotations #3

Open tsn77130 opened 7 years ago

tsn77130 commented 7 years ago

Hi guys I sometimes need to generate non global annotations (ie. annotations linked to a particular resource ; ex events,server=db1 title=reboot,text=i have rebooted this server only).

I was thinking to additionnal optionnal text panel (between timestamp and title for example), which could do the job.

Do you plan to do something like this fot this kind of situations ?

thanks thomas

naiconovalabs commented 7 years ago

Hi!

If I understand the point, you are using a tag called "server". If so, tags field do your job:

In Annotations Options > Column Mapping:

Then, in your dashboard > Annotations settings add new query:

Field mappings:

You can repeat it for another query, like "db2", "db3", ... Now you can insert annotation that respect your line of Influx Line Protocol events,server='db1' title='reboot',text='i have rebooted this server only'

schermata 2017-09-06 alle 14 53 10

Let me know if this is useful! Thanks

tsn77130 commented 7 years ago

Hi @naiconovalabs ,

Thanks for your answer. It ts indeed what I was trying to do, thanks !

Bonus question, is it possible to do the same thing, but with multiple different vales (ex : server, and another one, like region for example) Like we specifically map server on tags, i believe we can't do that ?