Metadata-Version: 2.1
Name: delatore
Version: 0.2.0
Summary: Telegram bot for CSM jobs notifications
Home-page: https://github.com/opentelekomcloud-infra/delatore
License: Apache-2.0
Author: OTC customer service monitoring team
Requires-Python: >=3.7,<4.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Dist: aiodns (>=2.0.0,<3.0.0)
Requires-Dist: aiogram (>=2.5.3,<3.0.0)
Requires-Dist: aiohttp (>=3.6.2,<4.0.0)
Requires-Dist: aiohttp-socks (>=0.3.4,<0.4.0)
Requires-Dist: apubsub (>=0.2.1,<0.3.0)
Requires-Dist: influxdb (>=5.2.3,<6.0.0)
Requires-Dist: ocomone (>=0.4.3,<0.5.0)
Project-URL: Repository, https://github.com/opentelekomcloud-infra/delatore
Description-Content-Type: text/markdown

# Delatore
[![Build Status](https://travis-ci.org/opentelekomcloud-infra/delatore.svg?branch=master)](https://travis-ci.org/opentelekomcloud-infra/delatore)
[![codecov](https://codecov.io/gh/opentelekomcloud-infra/delatore/branch/master/graph/badge.svg)](https://codecov.io/gh/opentelekomcloud-infra/delatore)

Monitor and report status of customer service monitoring scenarios

## State
Given project is just a concept

## Architecture

### Gather events (CSM)
1. AWX (web hooks)
1. Test scripts (direct http API calls)
1. Telegraf (http output)

### Process reports (server)
1. Unify input (telegraf reports in fixed format)
1. Running on `test_host`, created by [kapellmeister](https://github.com/opentelekomcloud-infra/csm-kapellmeister)
1. Running in dedicated container
1. No storage

### Report (Telegram)
1. Configured telegram chanel
1. Direct messages to configured users
1. Control target user/channel by severity map

## Bot commands

Telegram bot accepts following commands:

### `/status`
Bot reply to the message with last status(-es) retrieved from given source

Status has following syntax:

`/status <source> [detailed_source] [history_depth]`

If some argument contains spaces, it should be surrounded by quotes, either `'...'` or `"..."`

#### AWX Source

Status command for AWX source has following syntax:

`/status awx [template_name] [history_depth]`

Examples:
 - `/status awx` — return last job status for all _scenarios_
 - `/status awx 'Buld test host'` — return last job status for AWX template which called 'Buld test host'
 - `/status awx 'Scenario 1.5' 3` — return status of last 3 jobs for AWX template which called  `Scenario 1.5`

