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": [
      {
          "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

wekan-logstash-0.1.3.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.3-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wekan-logstash-0.1.3.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

Hashes for wekan-logstash-0.1.3.tar.gz
Algorithm Hash digest
SHA256 d08c0ed7fda534a79d7eedd59dfc1d12a79b37a76ea911971fd99598dba5aac4
MD5 1c1215fa8d83f36a6f747a0f3509eb20
BLAKE2b-256 de5521919d05c9657df472b87dd812ceaa51fec4e444ebb51b93cc3039349ef1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wekan_logstash-0.1.3-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

Hashes for wekan_logstash-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 684c32fecc8e7af767e36e50dd3adcb2ec5b0d6455f16f29acb0097e8b705ff5
MD5 6ff91c0db644ac8222cab17dc64bd1ed
BLAKE2b-256 04aca73a6f7b7e5928424a60776a4f552a8fcf6fdabf1a2451f464ba5a0c3936

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