grafanarmadillo.flow¶
Pieces for templating multiple dashboards at once.
- class grafanarmadillo.flow.Alert(name_obj: str, name_tmpl: str, templator: Templator)[source]¶
Flowable request for an Alert.
- class grafanarmadillo.flow.Dashboard(name_obj: str, name_tmpl: str, templator: Templator)[source]¶
Flowable request for a Dashboard.
- class grafanarmadillo.flow.FileStore(root: Path)[source]¶
Store and retrieve Grafana objects in the filesystem.
Objects will be stored under the same path as in Grafana. For example, a dashboard titled “MyDashboard” in a folder titled “MyFolder” will appear at {root}/MyFolder/MyDashboard.json.
- class grafanarmadillo.flow.Flow(store_obj: ~grafanarmadillo.flow.Store, store_tmpl: ~grafanarmadillo.flow.Store, flows: ~typing.List[~grafanarmadillo.flow.Alert | ~grafanarmadillo.flow.Dashboard] = <class 'list'>)[source]¶
A collection of templating actions to do.
- flows¶
alias of
list
- obj_to_tmpl() FlowResult[source]¶
Import from the source to the destination.
- run(obj_to_tmpl: bool) FlowResult[source]¶
Run the flow.
- tmpl_to_obj() FlowResult[source]¶
Export from the destination to the source.
- exception grafanarmadillo.flow.FlowException(item: Alert | Dashboard, cause: BaseException | None = None)[source]¶
Wrapped Exception of running a Flow.
- class grafanarmadillo.flow.FlowResult(successes: List[Alert | Dashboard], failures: List[FlowException])[source]¶
Result of running a Flow.
- class grafanarmadillo.flow.GrafanaStore(gfn: GrafanaApi)[source]¶
Store and retrieve objects from a Grafana instance.