Question: Does AWS CloudWatch Logs or Metrics work as a Datasource? #163
-
Hey there, question is more or less as said in the title. My company would like to try and parse out automated test results from Cloudwatch logs and display them using this status map to show failures/passes/etc over time. I spent a few hours last week reading through the codebase and reading your documentation but was unable to make any progress. Any help/advice you could provide would be lovely! Or just letting me know that this won't work 😅 Cheers! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello! I've just checked a CloudWatch datasource documentation and see no problems displaying results from it. There is one idea to consider when you write queries: most Grafana datasources return arrays of datapoints: a float value and a timestamp for each point. This data is great to display graphs. But there is no metadata to get "Failure/Pass/Warning" string for a human-readable status label. Also, there can be multiple statuses for a single time interval (or "period"). To work around these issues you should define queries for each possible status to map unique string statuses to unique float values for Grafana and then use "Discrete mode mapping" in panel setting to map float values back to string statuses to display as buckets. This technique seems cumbersome, but it is compatible with most Grafana datasources. |
Beta Was this translation helpful? Give feedback.
Hello!
I've just checked a CloudWatch datasource documentation and see no problems displaying results from it.
There is one idea to consider when you write queries: most Grafana datasources return arrays of datapoints: a float value and a timestamp for each point. This data is great to display graphs. But there is no metadata to get "Failure/Pass/Warning" string for a human-readable status label. Also, there can be multiple statuses for a single time interval (or "period"). To work around these issues you should define queries for each possible status to map unique string statuses to unique float values for Grafana and then use "Discrete mode mapping" in panel setting to map float values …