Configure Additional Grafana Destinations¶
Introduction¶
Privacera monitoring stack allows you to configure additional Grafana destinations for uploading dashboards and alerts. This enables you to push monitoring dashboards and alert configurations to multiple Grafana instances or external Grafana servers.
This guide explains how to configure additional Grafana destinations in the vars.monitoring.yml
file within the Privacera monitoring stack.
Prerequisites¶
Prerequisite | Description |
---|---|
Accessible Grafana Instances | All additional Grafana URLs must be accessible from the Privacera monitoring stack |
Valid Credentials | Username and password, or token must have appropriate permissions to create/update dashboards and alerts |
Configuration Procedure¶
Step 1: Access the Configuration Directory¶
-
SSH into the instance where Privacera Manager is installed.
-
Navigate to the configuration directory:
Bash
Step 2: Copy the Monitoring Vars File¶
-
Copy the monitoring vars file if not already copied:
If this file already exists in
custom-vars
folder then you can skip this step.Bash
Step 3: Edit the Monitoring Configuration¶
-
Open the monitoring configuration file:
Bash -
Locate the
GRAFANA_ADDITIONAL_URLS
section in the file.
Step 4: Configure Additional Grafana Destinations¶
- Uncomment and configure the
GRAFANA_ADDITIONAL_URLS
block with your additional Grafana instances:
Option 1: Using Username and Password¶
YAML | |
---|---|
Option 2: Using Grafana Token¶
YAML | |
---|---|
Creating Grafana Tokens
If you need to create a Grafana token for authentication, refer to the Grafana documentation on service accounts and tokens. This guide provides step-by-step instructions for creating service accounts and generating tokens with appropriate permissions for dashboard and alert management.
Configuration Parameters¶
Parameter | Description | Example | Required |
---|---|---|---|
url | The complete URL of your Grafana instance | http://grafana.example.com:3000 | Yes |
username | Username with dashboard/alert management permissions | admin | Conditional* |
password | Password for the specified username | your-secure-password | Conditional* |
token | Grafana token with appropriate permissions to create/update dashboards and alerts | glsa_xxxxxxxxxxxxx | Conditional* |
Conditional
Either the username and password combination OR a token is required for authentication.
Step 5: Save and Exit¶
- Save the file and exit the editor:
Bash
Multiple Destination Configuration¶
You can configure multiple Grafana destinations by adding additional entries to the list. You can mix different authentication methods:
YAML | |
---|---|
Triggering the Post-Install Job¶
To apply your configuration changes and trigger the immediate upload of Grafana dashboards and alerts to the newly configured destinations, run the Privacera Post-Install Job by performing the following steps:
-
Login to the Privacera jumphost and navigate to the
privacera-manager
directory.Bash -
Run Setup Script:
Bash -
Run the following command to trigger the Post-Install Job:
Bash - Verify the Grafana dashboards and alerts are uploaded to the additional Grafana destinations.
What Gets Uploaded¶
When additional Grafana destinations are configured, the following components will be automatically uploaded to each configured Grafana instance:
- Dashboards: All Privacera monitoring dashboards
- Alert Rules: Pre-configured alert rules for monitoring
Troubleshooting¶
If dashboards and alerts are not uploading to additional Grafana destinations, check the following:
-
URL Accessibility: Ensure all configured Grafana URLs are reachable from the Privacera monitoring stack.
-
Authentication: Verify that the username/password combination or token has sufficient permissions to create and update dashboards and alerts.
-
YAML Syntax: Validate the YAML file for correct indentation and syntax. Improper formatting can prevent configuration from loading.
-
Check Logs: Review the Post Install Job logs for any error messages related to Grafana upload failures.
-
Token Permissions: If using tokens, ensure the token has the necessary permissions for dashboard and alert management.
-
Token Expiration: Check if your Grafana token has expired. Expired tokens will cause authentication failures. You may need to create a new token and update your configuration.
Summary¶
By configuring additional Grafana destinations in the vars.monitoring.yml
file, you can automatically upload dashboards and alerts to multiple Grafana instances. You can use either username/password authentication or tokens for secure access to external Grafana instances.