Simple script that will print cards data for logstash (ELK Kibana) in JSON format
Project description
wekan-logstash
Install
To install the package run the following command
python -m pip install wekan-logstash
After installed the package from PyPi, the script get_cards is available and ready to be running
#get_cards --help
Usage: get_cards [OPTIONS] [BOARDSFILE]
Script to read Wekan cards belonging to one or more boards, directly from
Mongodb in JSON format.
Make a request to Logstash configured to use the HTTP input plugin to ingest
the cards into Elasticsearch.
Options:
--boardId TEXT Single Board ID
--logstash Make a HTTP request to Logstash endpoint, defined at
LOGSTASH SERVER environment variable
-v, --verbose Show cards JSON data
-h, --help Show this message and exit.
Warning: It is necessary before executing the above script that we define the following environment variables used for the connection to the mongodb database and the logstash URL
- MONGODB_USER: Database username
- MONGODB_PWD: Database password
- MONGODB_HOST: Database hostname
- MONGODB_PORT: Database port
- MONGODB_DB: Database name
- LOGSTASH_SERVER: Logstash endpoint url
Data format
To format data for logstash and ELK (Kibana) - Format below :
{
"id": "7WfoXMKnmbtaEwTnn",
"title": "Card title",
"storyPoint": 2.0,
"nbComments": 1,
"createdBy": "fmonthel",
"labels": [
"I-U",
"I-Nu"
],
"assignees": "fmonthel",
"members": [
"fmonthel",
"Olivier"
],
"boardSlug": "test",
"description": "A subtask description",
"startAt": "2021-06-07T20:36:00.000Z",
"endAt": "2021-06-07T20:36:00.000Z",
"requestedBy": "LR",
"assignedBy": "MM",
"receivedAt": "2021-06-07T20:36:00.000Z",
"archivedAt": "2021-06-07T20:36:00.000Z",
"createdAt": "2021-06-07T20:36:00.000Z",
"lastModification": "2017-02-19T03:12:13.740Z",
"list": "Done",
"dailyEvents": 5,
"board": "Test",
"isArchived": true,
"dueAt": "2021-06-07T20:36:00.000Z",
"swimlaneTitle": "Swinline Title",
"customfieldName1": "value1",
"customfieldName2": "value2",
"boardId": "eJPAgty3guECZf4hs",
"cardUrl": "http://localhost/b/xxQ4HBqsmCuP5mYkb/semanal-te/WufsAmiKmmiSmXr9m",
"checklists": [
{
"name": "checklist1",
"items": [
{"title": "item1", "isFinished": true},
{"title": "item2", "isFinished": false}
]
},
{
"name": "checklist2",
"items": [
{"title": "item1", "isFinished": true},
{"title": "item2", "isFinished": true}
]
}
]
}
Goal is to export data into Json format that we can be used as input for Logstash and ElastisSearch / Kibana (ELK)
Import in logstash should be done daily basic (as we have field daily event)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wekan-logstash-0.1.4.tar.gz.
File metadata
- Download URL: wekan-logstash-0.1.4.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.4 Linux/5.15.0-30-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5822b73fb276d28b5c5ed6ce68c448dd5600090acf87ac0cb8d7ffce976bdea9
|
|
| MD5 |
9e8833ad75f8148986cc9b70dde939ba
|
|
| BLAKE2b-256 |
dc7109252caa99091c0898239c39121d879e68db15a4096aa22cdd8a9ee785f8
|
File details
Details for the file wekan_logstash-0.1.4-py3-none-any.whl.
File metadata
- Download URL: wekan_logstash-0.1.4-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.4 Linux/5.15.0-30-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56b5217554cd67d08aaf01d378836462bccd2556b31d8ffc6ba8ea2bd0ab8ffc
|
|
| MD5 |
1a3b560e8f917088f8870fe4479e7d3e
|
|
| BLAKE2b-256 |
c1e0b04ea566c3c82517b222e259fb4da2bdbaff0923fda445f26b7387b8280f
|