TeamViewer IoT Log Parser Connector template - TeamViewer Support
<main>
<article class="userContent">
<p><br></p><p>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).</p><p>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.</p><p>For more information about the JSON schema see <a href="https://community.teamviewer.com/English/kb/articles/109850-json-schema-for-custom-plugin-connector" rel="nofollow noreferrer ugc">JSON Schema for Custom Plugin Connector</a>.</p><pre class="code codeBlock" spellcheck="false" tabindex="0">
{
"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": ""
}
]
},
...
]
}
</pre><p><br></p><h3></h3>
</article>
</main>