Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gustavohenrique/elasticlog
A RESTful API to store and search log data in Elasticsearch
https://github.com/gustavohenrique/elasticlog
Last synced: about 2 months ago
JSON representation
A RESTful API to store and search log data in Elasticsearch
- Host: GitHub
- URL: https://github.com/gustavohenrique/elasticlog
- Owner: gustavohenrique
- Created: 2015-07-30T21:31:28.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-06-01T21:44:35.000Z (over 3 years ago)
- Last Synced: 2024-04-16T03:18:22.570Z (9 months ago)
- Language: Python
- Homepage:
- Size: 740 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Elasticlog
---
> A RESTful API to store and search log data in Elasticsearch[![Demo](https://github.com/gustavohenrique/elasticlog/raw/master/screenshot.png)](http://github.com/gustavohenrique/elasticlog)
First, you need to send the log's data to storage in Elasticsearch. You can configure any app to that just making a `POST` to Elasticlog. You need to configure an Elasticsearch server too and change the hostname variable defined into `settings.py` file.
## Running
```bash
git clone
pip install -r requirements.txt
python server.py
```You can run using the Docker way:
```bash
make build
make docker-run
make fixtures
make run
```To send the log's data, just make a `POST` to the API:
```bash
curl -X POST -H 'content-type:application/json' http://`boot2docker ip`/v1/logs/index1 -d '{
"created_at": "2015-07-30",
"filename": "connection.py",
"level": "ERROR",
"message": "Error connecting to database"
}'
```The API can also list all log's data:
```bash
# basic usage
curl -H 'content-type:application/json' http://`boot2docker ip`/v1/logs/index1# pagination support
curl -H 'content-type:application/json' http://`boot2docker ip`/v1/logs/index1?page=1&per_page=5# order by asc or desc
curl -H 'content-type:application/json' http://`boot2docker ip`/v1/logs/index1?sort=-created_at# group by level
curl -H 'content-type:application/json' http://`boot2docker ip`/v1/logs/index1?group_by=ERROR
```## Frontend
There is a web interface to see the log's data.
```bash
open http://`boot2docker ip`/html/dist
```## More
The `Marvel` plugin is installed into Docker instance. You can access by:
```bash
open http://`boot2docker ip`:9200/_plugin/marvel
```## License
MIT