|
| 1 | +<!-- Filename: IoTConnector-Config.xml --> |
| 2 | +<!-- Refer to https://techdocs.zebra.com/dcs/scanners/iot-connector/about/ for IoT Connector info --> |
| 3 | +<config name="IoT Connector"> |
| 4 | + <settings> |
| 5 | + <spd_log> |
| 6 | + <!-- Sinks section - define output target(s) of IoT Connector --> |
| 7 | + <!-- Multiple sink types are supported. Refer to https://github.com/gabime/spdlog/wiki/4.-Sinks --> |
| 8 | + <sinks> |
| 9 | + <!-- HTTP Post endpoint --> |
| 10 | + <sink type="http_sink_mt" name="http_sink_mt"> |
| 11 | + <!-- URL of the server instance --> |
| 12 | + <property key="url" value="http://localhost:3000/" /> |
| 13 | + <!-- HTTP headers for the request. Use semicolon(;) to separate multiple headers. Eg : header1;header2 --> |
| 14 | + <property key="request_header" value="Host;Content-Type;Accept" /> |
| 15 | + <!-- Set the value to "true" to enable the batch mode. You can set the logging time interval and/or number of log entries(batch size) per batch --> |
| 16 | + <property key="batch_mode" value="false" /> |
| 17 | + <!-- Number of logs per batch --> |
| 18 | + <property key="batch_size" value="0" /> |
| 19 | + <!-- Set the value to true to get HTTP request/response information in a file named "logs/iotConnector-verbose.log"--> |
| 20 | + <property key="verbose_mode" value="false" /> |
| 21 | + <!-- Pattern of a single log entry. Please refer to https://github.com/gabime/spdlog/wiki/3.-Custom-formatting for more information. --> |
| 22 | + <property key="log_pattern" value='{"event":{"time": "%Y-%m-%d %H:%M:%S", "level": "%^%l%$", "hostname": "%J", "message": "%v"}}' /> |
| 23 | + <!-- Log level to be recorded. 2 = INFO, 3 = WARNING, 4 = ERROR, 5 = CRITICAL 6 = LOG_OFF, 0,1 = TRACE,DEBUG (Works only with debug build) --> |
| 24 | + <property key="log_level" value="2" /> |
| 25 | + </sink> |
| 26 | + <!-- Command line output (only when IoTConnector executable run in this mode) --> |
| 27 | + <sink type="stdout_color_sink_mt" name="stdout_color_sink_mt"> |
| 28 | + <property key="log_pattern" value="[%Y-%m-%d %H:%M:%S] %v" /> |
| 29 | + <property key="log_level" value="2" /> |
| 30 | + </sink> |
| 31 | + </sinks> |
| 32 | + </spd_log> |
| 33 | + <!-- Log Elements section --> |
| 34 | + <!-- Regular expression wildcards for model and serial may be defined --> |
| 35 | + <!-- Refer to https://www.freeformatter.com/cron-expression-generator-quartz.html for the schedule pattern --> |
| 36 | + <log-elements> |
| 37 | + <!-- Configure get-statistics entries - intended for collection of scanner data --> |
| 38 | + <get-statistics enabled="true"> |
| 39 | + <!-- Daily at 2am --> |
| 40 | + <group model=".*" serial=".*" schedule="0 2 0 * * *"> |
| 41 | + <!-- Scanner-attribute-ids to be retrieved --> |
| 42 | + <scanner-attribute-ids>25003</scanner-attribute-ids> |
| 43 | + </group> |
| 44 | + </get-statistics> |
| 45 | + <!-- Configure check-health entries - intended to periodically confirm scanner availability --> |
| 46 | + <check-health enabled="false"> |
| 47 | + <!-- Every 30 mins --> |
| 48 | + <group model=".*" serial=".*" schedule="0 0/30 * * * *"> |
| 49 | + <!-- Scanner-attribute-ids to be retrieved --> |
| 50 | + <scanner-attribute-ids>534,533</scanner-attribute-ids> |
| 51 | + </group> |
| 52 | + </check-health> |
| 53 | + <!-- Configure an on-agent-startup entry --> |
| 54 | + <on-agent-start-up enabled="true"> |
| 55 | + <group model=".*" serial=".*"> |
| 56 | + <!-- Scanner-attribute-ids to be retrieved --> |
| 57 | + <scanner-attribute-ids>534,533</scanner-attribute-ids> |
| 58 | + </group> |
| 59 | + </on-agent-start-up> |
| 60 | + <!-- Enable/disable on-system-shutdown entry --> |
| 61 | + <on-system-shutdown enabled="true" /> |
| 62 | + <!-- Configure entries for scanner device attach --> |
| 63 | + <on-attach enabled="true"> |
| 64 | + <group model=".*" serial=".*"> |
| 65 | + <!-- Scanner-attribute-ids to be retrieved --> |
| 66 | + <scanner-attribute-ids>534,533</scanner-attribute-ids> |
| 67 | + </group> |
| 68 | + </on-attach> |
| 69 | + <!-- Enable/disable entry for scanner device detach --> |
| 70 | + <on-detach enabled="true" /> |
| 71 | + <!-- Used to enable/disable log entries on barcode events. Non printable characters in the barcode will be replaced by "_"(ASCII 0x5F) --> |
| 72 | + <on-barcode enabled="true" /> |
| 73 | + <!-- Used to enable/disable log entries on firmware download events --> |
| 74 | + <on-firmware-download-start enabled="true" /> |
| 75 | + <on-firmware-download-progress enabled="true" /> |
| 76 | + <on-firmware-download-end enabled="true" /> |
| 77 | + <on-firmware-download-error enabled="true" /> |
| 78 | + <!-- on-config-name-change is used to enable/disable log entries when a config name change occurs. This will be logged using the same schedule as check-health --> |
| 79 | + <!-- The timeout value specifies the time to wait before logging a config change --> |
| 80 | + <!-- The max timeout value is 60000 milliseconds (60 seconds). --> |
| 81 | + <on-config-name-change enabled="true" timeout="5000" /> |
| 82 | + <!-- on-non-decode-event is used to enable/disable log entries if MP7xxx is enabled for non decode events --> |
| 83 | + <on-non-decode-event enabled="true"/> |
| 84 | + </log-elements> |
| 85 | + </settings> |
| 86 | +</config> |
0 commit comments