Skip to content

ojoeth/RTT-API-telegraf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RTT-API-telegraf

This program is a script meant to be called from Telegraf which queries RealTimeTrains' UK train API, and counts cancelled, late and on-time trains per-day in an sqlite database. It outputs the data in a format readable from Telegraf and I intend to use it to feed in to Influx, and draw pretty graphs of cancelled trains in Grafana.

Requirements

  • telegraf
  • python 3
  • python module "requests"
  • API account with realtimetrains

Usage

[[inputs.exec]]
commands = [ "/bin/bash /opt/RTT_API/run.sh rttapi_username rttapi_password stationcode"]
  timeout = "60s"
  name_suffix = "traindata"
  data_format = "logfmt"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published