Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/okomestudio/kikori
Logging message router
https://github.com/okomestudio/kikori
devops logging python3 slack
Last synced: 16 days ago
JSON representation
Logging message router
- Host: GitHub
- URL: https://github.com/okomestudio/kikori
- Owner: okomestudio
- License: mit
- Created: 2017-10-31T02:00:52.000Z (over 7 years ago)
- Default Branch: development
- Last Pushed: 2018-01-16T23:11:48.000Z (about 7 years ago)
- Last Synced: 2024-11-14T19:23:03.712Z (3 months ago)
- Topics: devops, logging, python3, slack
- Language: Python
- Size: 29.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.txt
Awesome Lists containing this project
README
kikori
======Kikori is a logging message routing service. It watches log messages
(via `Watchdog `_) and
routes ones that matches user-provided patterns to another
destinations. Currently the only supported destination is `Slack
`_.Kikori is licensed under the `MIT License
`_.Examples
--------TBD.
App Configuration Specification
-------------------------------The behavior of kikori is fully controlled by a YAML configuration
file. By default, it looks for ``conf.yml`` in the current directory
(where the service is launched), but it can be stored at an arbitrary
location by the use of ``conf`` switch:.. code-block:: bash
$ kikori --conf /path/to/conf.yml
... or ...
$ kikori -c /path/to/conf.ymlThe full app config file looks as follows:
.. code-block:: yaml---
routers:
personal: # Give a unique name to identify a router
type: slack
webhook_url: https://hooks.slack.com/services/XXXXXXXXX/XXX
args:
channel: '@username'
ops:
type: slack
webhook_url: https://hooks.slack.com/services/YYYYYYYYY/YYY
args:
channel: '#ops'watch:
- dir: /var/log/myservice/
filename: '.*\.log$'
text_pattern: ^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+:[A-Z]+:.*
triggers:
- pattern: ^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+:ERROR:.*
routers:
- name: ops
args:
color: '#ff0000'
title: Error logged!
- pattern: ^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+:WARNING:.*
routers:
- name: ops
args:
color: '#ffff00'
title: Warning logged!- dir: /var/log/myotherservice/
filename: '.*\.log$'
text_pattern: ^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+:[A-Z]+:.*
triggers:
- pattern: ^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+:(?(ERROR|WARNING)):.*
routers:
- name: ops
args:
color: '#ff0000'
title: "{level} logged!"
- name: personal
args:
color: '#ff0000'
title: "{level} logged!"Installation
------------Kikori runs on Python 3. To install:
.. code-block:: bash
$ pip install kikori