Git Product home page Git Product logo

bahn-exporter's Introduction

DB Exporter

This Project was designed to read data from Marudor's BahnhofsAbfahrten API every few minutes and write them into an InfluxDB Database.

Setup

If you want to use this yourself here's a quick setup guide.

build the docker image and run it with a volume going to /user/app/exporter.json, this is your config file.

when you run it for the first time, the program will generate this basic config, or at least something similar:

{
    "influx_address": "",
    "influx_token": "",
    "influx_org": "",
    "influx_bucket": "",
    "interval": 5,
    "targets": [
        {
            "name": "Frankfurt(Main)Hbf",
            "id": "8000105"
        }
    ]
}

Fill the values in the config files with the values of your choice. You can also add base_api_url if you dont wanna use marudor.de and train_regex if you don't want to use the default value of ICE|RE|IC|IRE|RB|EC|ECE.

If you don't know how to set up influx (and optionally grafana) you can go to this guide. You can pretty much use the same setup here.

You can also change the value of lookbehind and lookahead

Grafana Dashboard

I use this this configuration for my grafana dashboard

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.