fetzerch/grafana-sunandmoon-datasource

Sunset/Sunrise as text

roykrikke opened this issue · 11 comments

Is it possible to show sunset and sunrise in text? See the example below:
sunriseandsunset

That's a valid request, however I haven't found a nice way of supporting this yet.

For the moment, I think the closest you get is by using a table view and set 'Annotations' in 'Data -> Table Transform'

grafik

Great and thanks for the fast response.

image

For other interested readers I share the dashboard from the image.
Sun and Moon Datasource-1575113429132.txt

@roykrikke I would like to try the dashboard but new to Grafana. I assume the text is json and a dashboard? What do I do with it please.

@roykrikke I would like to try the dashboard but new to Grafana. I assume the text is json and a dashboard? What do I do with it please.

You could import the dashboard example above (Sun and Moon Datasource-1575113429132.txt). The format of the example is in json, do not confuse this with your question if text is in json. If you are new, imported the example with + button on the left side of Grafana and then import.

Is this still working on Grafana 8.3+??
Actually I don't get it running. Grafana asks me to update to the new table panel where I can not find a transformation option for Annotations.
grafik

  • is there a way to continue with the old table panel ?
  • an clue how to show annutations in the updated table view (ver 8) ?

Indeed, this is no longer supported starting since Grafana 7. See (https://community.grafana.com/t/how-to-show-annotations-in-a-table-panel-in-grafana-7/33315).

You could give this external panel plugin a try: https://grafana.com/grafana/plugins/ryantxu-annolist-panel/

This discussion is long time ago... i am also trying to get sunset / sunrise and possibly same data for the moon into a dashboard as number.
Trying a lot of things but up to now did not find a solution

  • can't use annotations, also the above mentioned external plugin does not find any
  • did use "Sun and Moon Datasource-1575113429132.txt" mentioned above: no data
  • when switching type of visualization to "Table" i can see data... rows with "Time" and "Sun altitude" but i cannot manage to shrink that down to the 2 lines which indicate sunset & sunrise
  • as grafana automatically switches the GUI when selecting datasource "Sun and Moon" i cannot check with own SQL code
  • trying to use the query inspector does not give any result
  • did also try to use transform functions... no success.

Isn't there a way to use the data from "Sun and Moon" to fetch correct data via sql? Does anybody know what the syntax would be to access the db?

In the end, the only data i am looking for is the daily sunrise and sunset, moonrise and moonset, and maybe moonphase in %.
Would be happy for any proposal...

#52 Adds support for this.

I'm lost in github, sorry.... should i be able to get that working now or is the new version in a state that i cannot access it?
I did try to update data source and dashboard but did not experience any change...

I'll create a new release in the next days.

Version v0.3.0 is now available via grafana.com. I've also uploaded a new revision to https://grafana.com/grafana/dashboards/630-sun-and-moon-datasource/ that should help you to set things up.