Discover Packages
github.com/target/goalert
grafana
package
Version:
v0.30.1
Opens a new window with list of versions in this module.
Published: Nov 2, 2022
License: Apache-2.0
Opens a new window with license information.
Imports: 16
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
Grafana Development
To test the Grafana integration, ensure you have a service with a configured integration key and click "Copy Grafana Webhook URL" to add the webhook URL to your clipboard.
Grafana 7
Start Grafana: docker run -it --rm -p 3000:3000 grafana/grafana:7.5.13
Login at http://localhost:3000 with admin/admin
Add a datasource
Hover over gear icon
Click Data sources
Click Add data source
Select TestData DB
Click Save & Test
Add a notification channel
Hover over bell icon
Click Notification Channels
Click Add Channel
name=test, type=webhook, url=paste from GoAlert
Click Test and ensure an alert is created (you can close it)
Click Save
Add a Dashboard
Hover over "+" Plus icon
Click Dashboard
Click Add an Empty Panel
Click Save
Add alert
Click panel title
Edit
Scenario=Predictible Pulse, Step=1, on count=10, off count=10
Click Alert tab
Click Create Alert
Evaluate every=1s, For=3s, WHEN=last(), IS ABOVE=1.5, Send to=test
Click Apply at the top of the page
Click the Save icon at the top of the page
Alerts should be created and closed regularly
Grafana 8
Start Grafana: docker run -it --rm -p 3000:3000 grafana/grafana:8.3.4
Login at http://localhost:3000 with admin/admin
Add a datasource
Hover over gear icon
Click Data sources
Click Add data source
Select TestData DB
Click Save & Test
Add a Contact Point
Hover over bell icon
Click Contact Points
Click New Contact Point
name=test, Contact point type=webhook, Url=paste from GoAlert
Click Test, then Send Test Notification and ensure an alert is created (you can close it)
Click Save contact point
Create a folder
Hover over "+" Icon
Click Folder
Folder name=default
Click Create
Add alert rule
Hover over bell icon
Click Alert rules
Click New alert rule
Rule name=test, rule type=Grafana managed alert, folder=default
Scenario=predictable pulse, Step=1, on count=30, off count=30
IS ABOVE=1.5
Evaluate every=10s, for=15s
summary=some alert summary
Click Save & Exit
Update notification policy
Hover over bell icon
Click Notification policies
Click Edit for root policy
Default contact point=test
Click Save
Alerts should be created and closed regularly
Expand ▾
Collapse ▴
Documentation
¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.