Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anistark/logging_server
A central logging server in python
https://github.com/anistark/logging_server
Last synced: 14 days ago
JSON representation
A central logging server in python
- Host: GitHub
- URL: https://github.com/anistark/logging_server
- Owner: anistark
- License: mit
- Created: 2016-06-28T23:23:03.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-02-02T06:12:48.000Z (almost 2 years ago)
- Last Synced: 2023-08-03T17:22:56.388Z (over 1 year ago)
- Language: HTML
- Size: 12.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple Message Based Central Logging System in python
For starters, used mysql for db. But can be replaced with ElasticSearch as to enhance performance on scaling.
## Setup
- Clone the repo
- install dependecies
```
pip install -r requirements.txt
```
- Setup Flask env
```
export FLASK_APP=server.py
```
- Create config file
```
cp config_example.py config.py
```## Configuration
1. Add all necessary config data in config.py
2. Create a database with the provided name and table accordingly with the column (client, log_level, message, created_at).
## Execution
1. Run the
```
python zmqclient.py
```
on the client systems, i.e. various different machines where the logs are scattered2. Run the
```
python zmqserver.py
```
on our central server where we want to centralise the logging system3. (Optional) To debug run :
```
export FLASK_DEBUG=1
```4. Run the Flask web server
```
flask run
```5. Open **localhost:5000** on local system and view it as a table
6. To view statistics, go to **localhost:5000/stats**
## Server Stats
To view server server stats, just visit **localhost:5000/stats** and the data can be refreshed by clicking on the refresh button.