Skip to main content

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": [
      {"TODO": [
          {"isfinished": false, "title": "todo1"},
          {"isfinished": false, "title": "todo2"}
        ]
      },
      {"DONE": [
          {"isfinished": true, "title": "done1"},
          {"isfinished": true, "title": "done2"}
        ]
      }
  ]
}

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

wekan-logstash-0.1.1.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wekan_logstash-0.1.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file wekan-logstash-0.1.1.tar.gz.

File metadata

  • Download URL: wekan-logstash-0.1.1.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-27-generic

File hashes

Hashes for wekan-logstash-0.1.1.tar.gz
Algorithm Hash digest
SHA256 71f993f86eba0fcd6932c58dc2e4a7afa2205a26e849e25cc64330bbac708a60
MD5 4b3c57c5d973a492940dc25e5ffab3e1
BLAKE2b-256 032164b43c6863242f22f02fff8a7e2ae57052b378397c025daa481a4b0d85d6

See more details on using hashes here.

File details

Details for the file wekan_logstash-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: wekan_logstash-0.1.1-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-27-generic

File hashes

Hashes for wekan_logstash-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c124964effc5e6a59456ab2a7cbbd3a63217e67710463184837b4953412994f9
MD5 a9787e7449ebb993c20612fc026bdf7d
BLAKE2b-256 0f66666133e4e820c7c480e02e1f2f2f306a81c827e8f28f7d2a8f0530dec882

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page