Documentation
¶
Overview ¶
Package monitoring handles Grafana dashboard provisioning for nself monitoring plugin. On nself start, this copies the relevant dashboard JSON files based on installed plugins.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyDashboards ¶
CopyDashboards copies the nself-overview and any bundle dashboards whose trigger plugins are present in installedPlugins into destDir. destDir is the Grafana provisioning dashboards directory (e.g. /etc/grafana/provisioning/dashboards). sourceDir is the monitoring plugin's configs/grafana/dashboards/ directory. Returns the list of dashboard filenames copied and any error encountered.
func ReadProvisioningMeta ¶
ReadProvisioningMeta reads the __nself_provisioning block from a dashboard JSON file. Returns nil if the key is absent (overview dashboard and non-nself dashboards).
func SelectDashboards ¶
SelectDashboards returns the list of dashboard filenames that would be copied for the given installed plugins, without performing any file I/O. Useful for unit testing and dry-run output.
Types ¶
This section is empty.