Coder Social home page Coder Social logo

alerter's Introduction

Alerter

Alerter is a tool to manage Splunk alerts, searches and other operations

First steps

Edit the config with the APP, SPLUNK_USERNAME, SPLUNK_PASSWORD and SERVER. FILTER sets the default filter to show alerts. JIRA_USERNAME and JIRA_PASSWORD for JIRA integration.

Example:

APP="app" FILTER="Sev"

Examples

Create an alert sent to alerts with query and the name of the alert.

./alerter -s ap-api.serversc.com.com -m "[email protected],[email protected]" -q "index=index-prod-* source=apigateway.* 'Connection refused'" -c 'Sev3: Dev/Stage API connection refused'

./alerter -s us-api.serversc.com.com -m "[email protected],stage-splunk-based-index-stage-alert.myadwrbo@cloud.pagerduty.com" -q "index=index-dev-* OR index-stage-* source=service* m=bstr_internal_health lvl=error l=103" -e "*" -b "5" -x "50" -c 'Sev3: Dev/Stage Proactive Service Monitoring'

Show alerts

sancheza-macOS:alerter sancheza$ ./alerter -s ap-api.serversc.com.com -a Sev3: Dev/Stage API blockembargoips.conf not found Sev2: Prod API connection refused Sev2: Prod API blockembargoips.conf not found Sev1: Prod Flight is Leaderless Sev3: Dev/Stage API connection refused Sev3: Dev API Service Upstream Server Sev3: Dev/Stage API no memory in vhost_traffic_status_zone Sev3: Dev/Stage API LUA worker error Sev2: Prod API no memory in vhost_traffic_status_zone Sev2: Prod API Service Upstream Server

Run a query

./alerter -s ap-api.serversc.com.com -f 'search=search index=index-dev-* source=apigateway.* "Connection refused"'

Support webhook

./alerter -s ap-api.serversc.com.com -m "[email protected]" -q "index=index-prod-* source=service* m=bstr_internal_health lvl=error l=103" -e "*/15" -b "5" -x "30" -w 'http://www.google.es' -c 'Sev2: Prod Proactive Service Monitoring Example'

Delete alert

./alerter -s ap-api.serversc.com.com -d 'Sev2: Prod Proactive Service Monitoring Example'

Create Jira

./alerter -j

Author

Alejandro Sanchez Acosta [email protected]

alerter's People

Contributors

asancheza avatar filmaj avatar bryceaj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.