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.2.tar.gz (8.0 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.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wekan-logstash-0.1.2.tar.gz
  • Upload date:
  • Size: 8.0 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.2.tar.gz
Algorithm Hash digest
SHA256 31501047170043ed9fb322245a5bcc44a7559f8da1aea1776a1522ddcb345e47
MD5 93a254e5708bc62333120dbf00439085
BLAKE2b-256 22f6e80f988de9b7f3e08675c6ca671d3b169c789d35bc5561639314e1d005b5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wekan_logstash-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 af44bc5128d27044727c812dd916bbb952bc6acbf39f9961ff47c95ec7e50ec7
MD5 080d687b95bdf75f855013367fc321f1
BLAKE2b-256 d1f0713c37d48bcac05eae4dd4c1e3e0c03d36217b7c1466bd85eb4de9c10237

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