This Project was designed to read data from Marudor's BahnhofsAbfahrten API every few minutes and write them into an InfluxDB Database.
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
I use this this configuration for my grafana dashboard