Grafana Provider
Grafana Provider allows either pull/push alerts from Grafana to Keep.
Inputs
Grafana Provider does not currently support the notify
function.
Outputs
Grafana Provider does not currently support the query
function.
Authentication Parameters
The Grafana Provider uses API token authentication. You need to provide the following authentication parameters to connect to Grafana:
- token (required): Your Grafana API Token.
- host (required): The URL of your Grafana host (e.g., https://keephq.grafana.net).
Connecting with the Provider
To connect to Grafana, you need to create an API Token:
- Log in to your Grafana account.
- Go to the Service Accounts page (cmd+k -> service).
- Click the Add service account button and provide a name for your service account.
- Grant “alerting” permissions:
- Now generate Service Account Token:
- Use the token value in the
authentication
section in the Grafana Provider configuration.
Post Installation Validation
You can check that the Grafana Provider works by testing Keep’s contact point (which was installed via the webhook integration).
- Go to Contact Points (cmd k -> contact).
- Find the keep-grafana-webhook-integration:
- Click on the View contact point:
- Click on Test:
- Go to Keep – you should see an alert from Grafana!
Alternative Validation Methods (When Keep is Not Accessible Externally):
If Keep is not accessible externally and the webhook cannot be created, you can manually validate the Grafana provider setup using the following methods:
-
Manual Test Alerts in Grafana:
- Create a manual test alert in Grafana.
- Set up a contact point within Grafana that would normally send alerts to Keep.
- Trigger the alert and check Grafana’s logs for errors or confirmation that the alert was sent.
-
Check Logs in Grafana:
- Access Grafana’s log files or use the Explore feature to query logs related to the alerting mechanism.
- Ensure there are no errors related to the webhook integration and that alerts are processed correctly.
-
Verify Integration Status:
- Navigate to the Alerting section in Grafana.
- Confirm that the integration status shows as active or functioning.
- Monitor any outbound HTTP requests to verify that Grafana is attempting to communicate with Keep.
-
Network and Connectivity Check:
- Use network monitoring tools to ensure Grafana can reach Keep or any alternative endpoint configured for alerts.
Webhook Integration Modifications
The webhook integration adds Keep as a contact point in the Grafana instance. This integration can be located under the “Contact Points” section. Keep also gains access to the following scopes:
alert.provisioning:read
alert.provisioning:write