Code Monkey home page Code Monkey logo

imperva-exporter's Introduction

imperva-exporter

usage: imperva_exporter.py [-h] [-w] [-i N] [-o N] [-t N] [-v]
                           [--prom-port PORT] [--prom-init-hours N]
                           [--slack-room room-name]
                           [--slack-team <!subteam^ID|@team>]
                           prefix [prefix ...]

Check DDoS events on prefixes protected by Imperva

positional arguments:
  prefix                ip prefix(es), separated by space

optional arguments:
  -h, --help            show this help message and exit
  -w, --watch           keep running and and collect events continuously
  -i N, --interval N    check last N seconds, default: 300
  -o N, --overlap N     compensate latency and event reporting delays, default: 300 sec (watch mode only)
  -t N, --threshold N   report after N fails, default: 100 (watch mode only)
  -v, --debug           enable debug output

Prometheus metrics (watch mode only, needs prometheus_client module):
  --prom-port PORT      export Prometheus metrics on this port
  --prom-init-hours N   preload N hours of historical context, default: 24

Slack notifications (watch mode only):
  --slack-room room-name
                        send event notifications to this Slack channel,
                        SLACK_HOOK_URL env must be set
  --slack-team <!subteam^ID|@team>
                        mention this team in the Slack notification

required env vars: IMPERVA_API_ID, IMPERVA_API_KEY, IMPERVA_ACC_ID

Exported Prometheus metrics

Metric Name Description
imperva_prefix_ddos_status 0 or 1 when the prefix is under attack
imperva_prefix_ddos_total Recorded attacks on the prefix (count)
imperva_api_failure_duration Current failure duration in seconds
imperva_api_errors_total Recorded API/network errors (count)

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.