Open senpro-ingwersenk opened 2 weeks ago
You can find the code for the datetime parsing here: https://github.com/divinity666/ruby-grafana-reporter/blob/f7abedc3878c092604be988dcc8728f2aac9f897/lib/grafana_reporter/abstract_query.rb#L342
You may provide UTC times or the grafana relative time expressions. For current month you can provide something like now-M/M
or now-1M/M
for previous month as to and from times.
Hope this helps.
Hello there!
I am almost done writing the report automation; it took forever to get the information I wanted out of Grafana... Last step now is to set the start and end time of the time window for which the report should be generated.
I saw some descriptions here: https://github.com/divinity666/ruby-grafana-reporter/blob/master/lib/grafana_reporter/asciidoctor/help.rb#L156-L166
From looking at the logs, Grafana sends momentjs-ish timestamps:
When I pass time values myself, do I just pass them as ISO formatted values? My goal is to preset the start and end to the start and end of a month to generate monthly reports.
You can find my current client implementation here: https://github.com/senpro-it/grafana-report-generator/blob/master/grafana-ruby-reporter-client.go
It's far from done, but I am actively working on it. According to our ticketing system I already put roughly 50 hours into this, most of this however was prep and research. Still, I hope to finish this project soon. :)
Thank you and kind regards!