Is there a way within the infinity datasource plugin to be able to customize the error messages returned? I can have the api endpoint that I’m querying return a 403 but is there a way to change the text of FORBIDDEN to something like “Please refresh your login”? I have access to the api server so I can return different status codes but I’m not sure if it’s hardcoded to return FORBIDDEN for a 403 or if this is customisation. Fantastic Plugin!
why does it return 403? instead of 403 just return the text ypu want to display from your api
it returns a 403 status code like the following json. Is there a way to customize the text that grafana uses so that it returns the text “Please Login” when you hover over the above red icon?
{
"code": 403,
"error": "Please login"
}
I do not think there is, that is grafana objecting to receiving an error from the api. would be a cool feature though
the infinity plugin allows to search input for that error string.
apply calculations or grafana transforms to remap to or relabel it.
having a bad time trying to convert JSON data into useful numbers/bools for calculations myself; s1==s2 should return 0 or 1 which can then be counted into c1. e.g. c1 = (bool(“string1”==“string2”)).
s1=date(“MM/DD/YYYY HH:MM:SS[:000][a|p][TZ]”)
s2=date(“MM/DD/YYYY HH:MM:SS[:000][a|p][TZ]”)
d1 = s2 - s1 ; d is then MINUTES, or Seconds which autoscales when displayed, etc.
its cool but not quite there yet. i did create a text only dashboard of the data which was okay, but grafana is for information not data (change data to information).