agate

command module
v0.9.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

README

agate

Test Build Status

Prometheus alertmanager webhook that responds to alerts by generating tickets, executing ansible roles and running scripts.

state

burn-in

usage

usage: agate [<flags>]

prometheus alertmanager webhook processor

Flags:
  --help                Show context-sensitive help (also try --help-long and
                        --help-man).
  --version             Show application version.
  --config="agate.yml"  config filename
  --addr=":4464"        listen address
  --data="data"         data directory
  --debug               debug output to stdout

The webhook URL, http://hostname:port/alerts?resolve=true, processes alert manager alert groups. http://hostname:port/alerts defaults to false

Prometheus metrics are available via http://hostname:port/metrics,

configuration

See config.good.full.yml

annotations

  • group_title: alert group note (issue, ticket) title
  • agate_title, title, subject: note alert title

labels

use notify_sys and notify_grp in your alertmanager alert grouping

  • notify_sys (mock|gitlab|hpsm) (2.0: alertmanager)

  • notify_grp: {gitlab: project, hpsm: workgroup}

  • agate_node, hostname, node, instance: remediation node

  • agate_title, title, subject: note (issue, ticket) title

  • group_title: note title

api

  • /metrics - prometheus metrics
  • /api/v4/alerts - alertmanager v4 alertgroup
curl $agatehost:$port/metrics

curl -XPOST -d @alert-group.json $agatehost:$port/api/v4/alerts?system=gitlab&group=maul/alerts&no_resolve=true

features

  • create, update & close notes via $notify_sys
  • execute $alertname{script|ansible} (on $instance) remediation
  • hardened

install - systemd only

puppet: puppet-agate ansible: ansible-agate docker: docker-agate source: go get github.com/pahoughton/agate

Todo

  • validate amgr/Manager()

validation - under developement

unit: go test ./...

system (wip):

command: cd test && rake spec requires: rake, ansbile, vagrant, virtualbox

examples

see test dir and *_test.go

contribute

https://github.com/pahoughton/agate

licenses

2018-12-05 (cc) paul4hough@gmail.com

GNU General Public License v3.0

See COPYING for full text.

Documentation

Overview

2018-12-25 (cc) <paul4hough@gmail.com>

agate entry point

Directories

Path Synopsis
2019-02-14 (cc) <paul4hough@gmail.com> alertmanager alert handler add body to data store and notify manager 2019-02-14 (cc) <paul4hough@gmail.com> Single AlertGroup Queue Manager Thread 2019-02-19 (cc) <paul4hough@gmail.com>
2019-02-14 (cc) <paul4hough@gmail.com> alertmanager alert handler add body to data store and notify manager 2019-02-14 (cc) <paul4hough@gmail.com> Single AlertGroup Queue Manager Thread 2019-02-19 (cc) <paul4hough@gmail.com>
alert
2019-01-19 (cc) <paul.houghton.ywi9@statefarm.com> agate models
2019-01-19 (cc) <paul.houghton.ywi9@statefarm.com> agate models
2019-01-07 (cc) <paul4hough@gmail.com> agate configuration
2019-01-07 (cc) <paul4hough@gmail.com> agate configuration
2019-02-13 (cc) <paul4hough@gmail.com> FIXME what is this for? 2019-02-13 (cc) <paul4hough@gmail.com> FIXME what is this for? 2019-04-02 (cc) <paul4hough@gmail.com> FIXME what is this for? 2018-12-31 (cc) <paul4hough@gmail.com> agate alert db stores ticket id's for alerts so that tickets for resolved alerts can be updated.
2019-02-13 (cc) <paul4hough@gmail.com> FIXME what is this for? 2019-02-13 (cc) <paul4hough@gmail.com> FIXME what is this for? 2019-04-02 (cc) <paul4hough@gmail.com> FIXME what is this for? 2018-12-31 (cc) <paul4hough@gmail.com> agate alert db stores ticket id's for alerts so that tickets for resolved alerts can be updated.
2019-01-03 (cc) <paul4hough@gmail.com> simple dump service
2019-01-03 (cc) <paul4hough@gmail.com> simple dump service
2019-01-01 (cc) <paul4hough@gmail.com> FIXME what is this for? 2018-12-21 (cc) <paul4hough@gmail.com> handle unknown http requests 2018-12-21 (cc) <paul4hough@gmail.com> handle unknown http requests 2018-12-26 (cc) <paul4hough@gmail.com> FIXME what is this for? 2018-12-21 (cc) <paul4hough@gmail.com> handle ticket http requests 2018-12-21 (cc) <paul4hough@gmail.com> mock ticketing system 2018-12-31 (cc) <paul4hough@gmail.com> FIXME what is this for?
2019-01-01 (cc) <paul4hough@gmail.com> FIXME what is this for? 2018-12-21 (cc) <paul4hough@gmail.com> handle unknown http requests 2018-12-21 (cc) <paul4hough@gmail.com> handle unknown http requests 2018-12-26 (cc) <paul4hough@gmail.com> FIXME what is this for? 2018-12-21 (cc) <paul4hough@gmail.com> handle ticket http requests 2018-12-21 (cc) <paul4hough@gmail.com> mock ticketing system 2018-12-31 (cc) <paul4hough@gmail.com> FIXME what is this for?
2018-12-27 (cc) <paul4hough@gmail.com> notification system interface 2019-02-19 (cc) <paul4hough@gmail.com>
2018-12-27 (cc) <paul4hough@gmail.com> notification system interface 2019-02-19 (cc) <paul4hough@gmail.com>
gitlab
2019-01-07 (cc) <paul4hough@gmail.com> gitlab issue interface 2019-02-23 (cc) <paul4hough@gmail.com> mock mock-ticket service for testing
2019-01-07 (cc) <paul4hough@gmail.com> gitlab issue interface 2019-02-23 (cc) <paul4hough@gmail.com> mock mock-ticket service for testing
hpsm
2019-02-23 (cc) <paul4hough@gmail.com> mock mock-ticket service for testing
2019-02-23 (cc) <paul4hough@gmail.com> mock mock-ticket service for testing
mock
2018-12-25 (cc) <paul4hough@gmail.com> mock ticket interface 2019-02-23 (cc) <paul4hough@gmail.com> mock mock-ticket service for testing
2018-12-25 (cc) <paul4hough@gmail.com> mock ticket interface 2019-02-23 (cc) <paul4hough@gmail.com> mock mock-ticket service for testing
nid
2019-02-17 (cc) <paul4hough@gmail.com> implements ticket.AlertTid interface
2019-02-17 (cc) <paul4hough@gmail.com> implements ticket.AlertTid interface
2018-12-25 (cc) <paul4hough@gmail.com> process alert ansible remediation - create inventory file w/ node - create playbook with variables from labels - run ansible role - return output 2019-01-07 (cc) <paul4hough@gmail.com> create remed instance 2019-02-14 (cc) <paul4hough@gmail.com> run alert remediation 2018-12-25 (cc) <paul4hough@gmail.com> process alert script remediation
2018-12-25 (cc) <paul4hough@gmail.com> process alert ansible remediation - create inventory file w/ node - create playbook with variables from labels - run ansible role - return output 2019-01-07 (cc) <paul4hough@gmail.com> create remed instance 2019-02-14 (cc) <paul4hough@gmail.com> run alert remediation 2018-12-25 (cc) <paul4hough@gmail.com> process alert script remediation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL