GrafanaJsonDatasource icon indicating copy to clipboard operation
GrafanaJsonDatasource copied to clipboard

When inputting data in the payload, can you prompt me what fields are available and what values are available?

Open MicroOps-cn opened this issue 3 years ago • 3 comments

I have multiple metrics. Each metric may wish to pass in different parameter formats. Different metrics like Prometheus have different labels.

I see that the input box of payload supports JSON schema, but unfortunately, these JSON schemas are built-in, and it seems that they cannot be customized.

I wonder if I can automatically fill a template defined in advance into the payload input box after inputting metric and pressing enter, and when inputting data in the payload, I can be prompted what I can input.

MicroOps-cn avatar Aug 18 '22 06:08 MicroOps-cn

You can try to implement it

We're using Grafana's Codeeditor https://grafana.com/docs/grafana/latest/packages_api/ui/codeeditor/
Looking at the api there's something like getSuggestions function which might be a gateway to what you want.

simPod avatar Aug 18 '22 06:08 simPod

This is a little difficult 😢. Do you have any plans to realize it?

MicroOps-cn avatar Aug 18 '22 07:08 MicroOps-cn

I don't use Grafana UI actually (I sync definitions over api) so it's not a priority I have for future rn.

simPod avatar Aug 18 '22 07:08 simPod

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Nov 29 '22 02:11 github-actions[bot]

This issue has not seen any activity since it was marked stale. Closing.

github-actions[bot] avatar Dec 07 '22 02:12 github-actions[bot]