Trail Register is a usage tracking tool. Named after the log books placed at trailheads that are used partly to track trail usage.
Trail Register can be run via docker or with the standalone jar directly.
Docker:
docker run -d -p 4567:4567 -v /data/trail-register:/data reicoop/trail-register
Java
java -jar trail-register.jar
Trail register can also be run in a clustered mode for high availability. In this mode writes are independent to each node in the cluster, since this a write heavy system. Reads are done by the node doing the same read to all of its peers and adding them together.
Load balancing must be handled externally by some other tool such as HA-Proxy, nginx, or an F5.
Docker:
docker run -d -p 4567:4567 -e PEERS=${HOST}:4567,${HOST}:4568 reicoop/trail-register
docker run -d -p 4568:4567 -e PEERS=${HOST}:4567,${HOST}:4568 reicoop/trail-register
lists applications
Example Response: ["app1", "app2"]
lists environments for an application
Example Response: ["env1", "env2"]
lists categories used in an environment
Example Response: ["category1", "category2"]
lists all usages by key for a given category.
Example Response: {"key1": 7, "key2":25}
lists all usages for given key for a given category.
Example Response: 12
Example Response (by date): {"20150910": 7, "20150919":5}
records a single usage for the given key
records usages for the given keys
Example Request: {"key1": 7, "key2":5}
records usages for the given keys by category
Example Request: {"category1": {"key1": 7, "key2":5}, "category2": {"key1": 4, "key2":8}}
Example Response: UP
returns timing info per endpoint