This is gtfs-rt-metrics
, a project to collect metrics on GTFS-realtime feeds and log them to an InfluxDB time-series database, where they can be visualized with Grafana, Chronograf, or other tools.
gtfs-rt-metrics
is most easily deployed with Docker and Docker Compose:
- Copy
config-sample.ini
toconfig.ini
and edit as desired. You may want to edit the list of feeds being monitored, change the polling interval, or alter the InfluxDB configuration parameters. - Copy
docker-compose-sample.yml
todocker-compose.yml
. Edit as desired (although no changes are required for the default configuration). - Build the
gtfs-rt-metrics
image withdocker-compose build
. - Start
gtfs-rt-metrics
, InfluxDB, and Grafana withdocker-compose up -d
. - If required, create the
rtmetrics
InfluxDB database (launch theinflux
client and runCREATE DATABASE rtmetrics
).
gtfs-rt-metrics
will begin collecting the following metrics for each feed into InfluxDB every 20 seconds:
- count of feed entities
- count of trip updates, vehicle positions, and alerts
- count of trip updates per route
- age of feed header timestamp
- average age of feed entity timestamp (only applicable to trip updates and vehicle positions)
- feed response time
- feed response size
All of the above are stored in an InfluxDB series called feed_fetch
, except for the count of trip updates per route, which are stored in the route_fetch
series.