Skip to content

ops-center/alertmanager-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Alertmanager-Demo

Step 1: Get your slack webhook URL

Step 2: Download prometheus alert manager and move the binary to project directory

Step 3: Configure alert manager for sending alert to specified slack URL

alertmanager.yaml

global:
  slack_api_url: 'https://hooks.slack.com/services/../../...'

route:
  receiver: 'slack-notifications'
  group_by: [alertname, datacenter, app]

receivers:
  - name: 'slack-notifications'
    slack_configs:
      - channel: '#alerts'
        text: 'https://mywebsite.com/alerts/{{ .GroupLabels.app }}/{{ .GroupLabels.alertname }}'

Step 4: Run alert manager

./alertManager/alertmanager --config.file=alertManager/alertmanager.yaml

Step 5: Run main.go to send alert to alert manager by POST request

go run alertSender/main.go

Step 6: Run alertLister to list all alerts

go run alertLister/listAlert.go

Architecture

https://github.com/prometheus/alertmanager#architecture

API Reference

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages