Hello everyone,
I have a problem with latest Grafana (9.0.5) run on linux machine (Ubuntu 14.04.5 LTS (GNU/Linux 4.4.0-103-generic x86_64)). We are using Grafana API to post cloud services upgrades/patches annotations. After migration to the newest version and setup new API methods, we still can’t make http links working fine in annotations, they are shown as plain text. I think I did all setup correctly in the grafana.ini file. Any help much appreciated.
Hi @mosukando,
Thank you for your post. I would like to ask a question about the issue.
Just to confirm the issue: You were trying to use grafana api to add/modify annotations. In this annotation api post request, you were adding the text above as a payload?
If that is the case, could you please share a sample payload you were sending to annotations/api.
If not, could you please provide another example or add additional information about your issue?
Thanks
hello @leodegariopasakdal
thanks for the response. So here is typical content that we are using:
{
"dashboardUID": "b4lSpnZVz",
"panelId": 9,
"tags": [
"cloudop",
"mf11saas100",
"hypertron",
"S2",
"->",
"S6"
],
"time": 1661356631000,
"text": "Tenant: hypertron; database: mf11saas100hypertron has been scaled by james.doe@hyppp.com, scale down date: 2022-08-25, reason: <a href=https://hyppp.atlassian.net/browse/PSP-1999><u>PSP-1999</u></a> Scaling up for the time of update"
}
We are using Powershell script for handling this, by Invoke-WebRequest:
Invoke-WebRequest -Uri $uri -method Post -ContentType ‘application/json’ -Body $eventConverted -UseBasicParsing
where $eventConverted is a string variable that contains the payload above
Hi @mosukando ,
Thanks for the quick response. I did try using your payload using in postman and run it against grafana:9.0.5 and I was able to see the link from my side.
I am wondering if you could try escaping the href value with backslash. My suspicious could be related to that
<a href="https://hyppp.atlassian.net/browse/PSP-1999\">PSP-1999
hello,
Actually, links in annotations on the graph are working fine. Problem exists in annotation panel, where all of them are showing as a plain text. Was trying your advice, unfortunately its still same issue.
1 Like
Hi @mosukando ,
Thanks for your response. Would you mind to sharing which grafana version you’ve seen this link working? I’ve tried up until version 8.1.3 but same got the same behavior.
Thanks a lot
Hi, that was quite big “jump” for our organization. Recent update was from version 5.0.2 → 9.0.5. We needed to change the logic for annotations, previously we were using Grafana Events. We can’t find a way to attach Grafana Events as Annotations source, so we decide to switch into built-in grafana annotations
Hi @mosukando ,
This is a bug in AnnotationList that needs to be fix. @usman.ahmad shared a similar issue about this topic.
1 Like
hi @leodegariopasakdal thanks for the update, (sorry for late response - holidays ) I’ll watch the progress of the fix, and update our environment once sorted.
1 Like