Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/expediadotcom/adaptive-alerting-detector-build
Adaptive Alerting detector build library
https://github.com/expediadotcom/adaptive-alerting-detector-build
Last synced: 1 day ago
JSON representation
Adaptive Alerting detector build library
- Host: GitHub
- URL: https://github.com/expediadotcom/adaptive-alerting-detector-build
- Owner: ExpediaDotCom
- License: apache-2.0
- Created: 2019-12-12T11:17:18.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-26T21:37:39.000Z (almost 2 years ago)
- Last Synced: 2023-02-27T00:32:40.693Z (over 1 year ago)
- Language: Python
- Size: 395 KB
- Stars: 4
- Watchers: 10
- Forks: 2
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# adaptive-alerting-detector-build
Adaptive Alerting Detector Build Python Library
```
pip install git+https://github.com/ExpediaDotCom/adaptive-alerting-detector-build.git#egg=adaptive-alerting-detector-build
```# Usage
## Configuration
```sh
# may also be passed when creating an instance of DetectorClient
MODEL_SERVICE_URL=http://modelservice
MODEL_SERVICE_USER=awesome_user# optional, default=INFO
LOG_LEVEL=DEBUG
```## Read Metrics JSON File and Build Detectors
```
# Load metric configuration Metric(config, datasource_config, optional: model_service_url)
metric = Metric({"tags": {"app": "myApplication", "type": "REQUEST_COUNT", "metric": "request_count"}}, {"url": "http://graphite"})# Get detectors assocated to the metric
metric.detectors# Build detectors for a metric
metric.build_detectors()
```# User Environment
## Setup
### Install `pipenv````$ brew install pipenv```
### Create virtual environment
```$ pipenv install```
## Install tools
```$ pipenv run setup.py```
## Use
### Use CLI tool```$ adaptive-alerting -h```
# Development Environment
## Setup
### Install `pipenv````$ brew install pipenv```
### Setup environment and install dependencies
```$ make install```
## Run tests
```$ make test```
## Enter the pipenv shell
(See https://realpython.com/pipenv-guide/ for more info.)
```$ pipenv shell```
## Build
```$ make build```