Grafana Setup Script#
The influx_grafana_setup script is used during the install or upgrade process to set up, update, and manage the ICE ClusterWare™ monitoring tools. When the script is run, InfluxDB, Telegraf, and Grafana are installed or updated.
The script includes steps for:
Creating the InfluxDB bucket and API token
Installing and setting up Telegraf to write to InfluxDB
Installing Grafana
Setting up the Grafana admin password and API key
Connecting the InfluxDB datasource
Running this script outside of the install or upgrade process is not common, but may be needed to clear the InfluxDB database contents or reset a password back to a known state.
The script is located at /opt/scyld/clusterware/bin/influx_grafana_setup
Arguments#
--purge
: Provides a complete monitoring reset by clearing all telegraf data from InfluxDB and resetting Grafana configuration (password included) to the ClusterWare default.--reset-grafana
: Rebuilds the Grafana sqlite database to base ClusterWare configuration. This includes resetting the admin password, reconnecting the InfluxDB datasource, and clearing any custom configurations including Alerts, Dashboards, API keys, and AdHoc users.--tele-env
: Adds the InfluxDB API token as an environment variable. The environment variable is stored in the/etc/default/telegraf
directory.--tele-input
: This is a legacy/backwards compatible option to insert the InfluxDB API token directly into the telegraf.conf file. Requires both--tele-input
and--tele-output
.--tele-output
: This is a legacy/backwards compatible option to insert the InfluxDB API token directly into the telegraf.conf file. Requires both--tele-input
and--tele-output
.
Example#
Clear existing telemetry data and Grafana configurations and reset to a fresh install configuration:
/opt/scyld/clusterware/bin/influx_grafana_setup --purge
Clear Grafana configurations and return to a fresh install configuration while maintaining telemetry data:
/opt/scyld/clusterware/bin/influx_grafana_setup --reset-grafana