From 7da3618bf3dfbec19c5f93e367fcb3b607f894ae Mon Sep 17 00:00:00 2001 From: Jan-Piet Mens Date: Sun, 16 Aug 2015 17:28:09 +0200 Subject: [PATCH] describe monitor hook --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 6bd3370..4001a8b 100644 --- a/README.md +++ b/README.md @@ -11,3 +11,21 @@ Recorder 1. Edit `config.h` 2. Edit `config.mk` and select features 2. Type `make` + +## Monitoring + +In order to monitor the _recorder_, whenever an MQTT message is received, the _recorder_ will add an epoch timestamp and the last received topic a Redis key (if configured) or a file otherwise. The Redis key looks like this: + +``` +redis 127.0.0.1:6379> hgetall ot-recorder-monitor +1) "time" +2) "1439738692" +3) "topic" +4) "owntracks/jjolie/ipad" +``` + +The `monitor` file is located relative to STORE and contains a single line, the epoch timestamp at the moment of message reception and the topic separated from eachother by a single space: + +``` +1439738692 owntracks/jjolie/ipad +```