TeamViewer IoT Log Parser Connector Template

TeamViewer IoT Log Parser Connector Template

October 9, 2020
TeamViewer IoT Documentation

Use the following template to add your connector configuration for each sensor to the monitoring configuration file.  The template is an example of adding a single sensor with two (2) metrics (Temperature & Humidity).

Ensure to replace the following placeholders with the specifics of your sensor.  Note:  the frequency in the template is set to 10, which will trigger the Log Parser Connector to run every 10 seconds, aggregating the values from each interval.

For more information about the JSON schema see JSON Schema for Custom Plugin Connector.

{
    "sensors": [
        {
            "name": "temperature_humidity_parser",
            "monitoringService": "python3 /usr/local/teamviewer-iot-agent/monitoring/log_parser/teamviewer_iot_log_parser.py",
            "monitoringParams": "--file /tmp/file.log  --parser metrics -–metrics temperature humidity --aggfunctions max avg –-template ':metric=.(.*?).[\s]'",
            "frequency": 10,
            "metrics": [{
                    "name": "Temperature",
                    "key": "temperature",
                    "valueType": "double",
                    "valueAnnotation": "C"
                }, {
                    "name": "Humidity",
                    "key": "humidity",
                    "valueType": "double",
                    "valueAnnotation": ""
                }
            ]
        },
        ...
    ]
}

Related posts

Want more? Exclusive deals, the latest news: Our Newsletter!