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.5.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.5-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wekan-logstash-0.1.5.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.5.tar.gz
Algorithm Hash digest
SHA256 800e751ce2bdcc8afbf116a17e89fcf8005cc11c2890b4ceb8deef15ecaf2b73
MD5 0da7c90719459d9c278dc033eb85981d
BLAKE2b-256 1e923c92b5d2c368b7899e8596145bb3aebd29b8d668b7ba3ff3ce4dbd302751

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wekan_logstash-0.1.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 fd296256a9c6aaee854008eea85bef2be02b921c60977e1bcfff40aa190975d6
MD5 90aab97b8988849442a49135e79f9449
BLAKE2b-256 546c11b77c6a41ff604779dc7546a95560f6619b8279ffcf77ce906c9fec0aa1

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