Service: Grafana - EyevinnOSC/community GitHub Wiki
Grafana
Grafana (serviceId grafana-grafana) is the open source analytics and monitoring platform for visualizing metrics, logs and traces. In Eyevinn Open Source Cloud (OSC) it is a long-running service instance with up to 10 GiB of storage per instance. License: AGPL-3.0.
What it can do
- Build dashboards and explore metrics, logs and traces from many data sources.
- Pre-install plugins at startup.
- Auto-provision a data source at startup, so a new instance is connected to for example Prometheus or InfluxDB right away.
- Allow anonymous (unauthenticated) viewing of dashboards, and allow embedding Grafana in an iframe from a chosen origin.
Creating an instance
Create the instance with create-service-instance using serviceId: "grafana-grafana" and a config object. The instance name must be alphanumeric and at most 20 characters. Grafana has no dependencies on other OSC services. If you auto-provision a data source from another OSC service (for example Prometheus), create that service first and confirm it is running.
{
"name": "mygrafana",
"PluginsPreinstall": "grafana-clock-panel",
"AnonymousEnabled": true
}
All options except name are optional. Wait for the instance with wait-for-service-ready and get the URL with describe-service-instance. The default login is username admin, password admin; Grafana prompts for a new password on first login, so change it before adding data sources.
With the OSC CLI:
osc create grafana-grafana mygrafana
osc create grafana-grafana mygrafana \
-o PluginsPreinstall="grafana-clock-panel" \
-o AnonymousEnabled=true
osc list grafana-grafana
osc remove grafana-grafana mygrafana
Options
| Option | Required | Type | Meaning |
|---|---|---|---|
| name | Yes | string | Name of the instance. Alphanumeric, at most 20 characters. |
| PluginsPreinstall | No | string | Plugins to install at startup. Comma-separated plugin IDs, for example grafana-clock-panel,grafana-worldmap-panel. |
| AllowEmbedOrigins | No | string | Web origin allowed to embed Grafana in an iframe, for example https://myapp.example.com. |
| AnonymousEnabled | No | boolean | Enable anonymous access so users can view dashboards without signing in. Grafana's default is disabled. |
| Datasources | No | string | Data source to provision at startup, in the form alias:type:url;username;password, for example influx:influxdb:http://influxdb:8086;admin;secret. Several data sources can be separated with |. The username and password parts are optional, for example prom:prometheus:https://myname.birme-osc-prometheus.auto.prod-se.osaas.io. |
| DashboardUrls | No | string | URL or URLs of dashboards to provision at startup. The exact list format is not documented in the catalog. |
Datasources is not marked sensitive in the catalog and can carry a password, so the value is stored as given.
Using the instance
- Add a data source manually under Connections, Data Sources, Add new data source, or provision one at creation time with the
Datasourcesoption. - Grafana can be used to visualize metrics from Prometheus. See the HLS Stream Monitor page for a dashboard example.