m0nhawk/grafana_api

Timeout for snapshot

Closed this issue · 4 comments

Is there any "timeout" option , when creating snapshot using HTTP API, not only via grafana GUI. Because when there are complex queries to execute on background, query is failing without timeout option.

Thanks in advance.

The timeout option is available for GrafanaFace like that:

gapi = GrafanaFace(auth=('admin', 'admin'), host='localhost', port=3000, timeout=30)

Let me know if this answers your question.

No it isn't working like that.

grafana = SnapshotFace(auth=api, host='XXXX', port='443', protocol='https', timeout=30)
TypeError: init() got an unexpected keyword argument 'timeout'
: init() got an unexpected keyword argument 'timeout

And version of grafana_api are you using? This was introduced in 0.8.5, so any version after that should work.

i need an example for create and update dashboard, where i can find the values?