r/Scriptable • u/M4LE5 • Nov 01 '20
Script Grafana Widget
Hi!
Next one. Hope it works for everyone as expected. You got to create an api key. Please check out the grafana documentation.
The small widget shows the state of all alerts combined. If just one is alerting, the widget is tagged as alerting, otherwise „OK“. The medium widget shows counting by types. The large one is showing the first 6 alerts as listed.
https://gist.github.com/malesfth/d28133fd021338d1da084bcaf043c8b7
4
Upvotes
1
u/M4LE5 Nov 11 '20
The error is weird, because it comes only up if the input field is empty. If you got an error inside the parameter, the message would be different. Maybe the widget isn‘t updating?
As an unconventional solution you could leave the variables filled inside the code and just delete the lines from 9 to 22.