zensqlmonitor / influxdb-zabbix

Gather data from Zabbix back-end and load to InfluxDB in near real-time for enhanced performance and easier usage with Grafana.
MIT License
71 stars 26 forks source link

dirty fix "unexpected end of JSON input" #12

Open dimsua opened 7 years ago

dimsua commented 7 years ago

Previously when we receive "unexpected end of JSON input" influxdb-zabbix stop processing problem table and require app restart. This hack fix this problem and table still parsing without restart

dimsua commented 7 years ago

Table still parsing after error: unexpected end of JSON input 2017/07/26 08:48:32 ESC[1;36m[T] --- Memory usage: Alloc = 3.6 KiB | TotalAlloc = 29 MiB | Sys = 16 KiB | NumGC = 11198ESC[0m 2017/07/26 08:48:32 ESC[1;32m[I] ----------- | trends_uint | [2017-07-26 07:00:00 --> 2017-08-25 07:00:00[ESC[0m 2017/07/26 08:48:32 ESC[1;32m[I] <-- Extract | trends_uint | 0 rows in 1.209646msESC[0m 2017/07/26 08:48:32 ESC[1;32m[I] --> Load | trends_uint | No dataESC[0m 2017/07/26 08:48:32 ESC[1;32m[I] --- Waiting | trends_uint | 15 sec ESC[0m 2017/07/26 08:48:32 ESC[1;36m[T] --- Memory usage: Alloc = 2.3 KiB | TotalAlloc = 29 MiB | Sys = 16 KiB | NumGC = 11199ESC[0m 2017/07/26 08:48:32 ESC[1;32m[I] ----------- | history | [2017-07-26 08:48:00 --> 2017-07-27 08:48:00[ESC[0m 2017/07/26 08:48:32 ESC[1;32m[I] <-- Extract | history | 3129 rows in 187.332338msESC[0m 2017/07/26 08:48:32 ESC[1;32m[I] --> Load | history | 3129 rows in 44.630081msESC[0m 2017/07/26 08:48:32 ESC[1;32m[I] --- Waiting | history | 15 sec ESC[0m 2017/07/26 08:48:38 ESC[1;36m[T] --- Memory usage: Alloc = 5.5 KiB | TotalAlloc = 29 MiB | Sys = 16 KiB | NumGC = 11201ESC[0m 2017/07/26 08:48:38 ESC[1;32m[I] ----------- | history_uint | [2017-07-26 08:48:00 --> 2017-07-27 08:48:00[ESC[0m 2017/07/26 08:48:38 ESC[1;32m[I] <-- Extract | history_uint | 10196 rows in 538.953764msESC[0m 2017/07/26 08:48:38 ESC[1;32m[I] --> Load | history_uint | 10196 rows in 149.297564msESC[0m 2017/07/26 08:48:38 ESC[1;32m[I] --- Waiting | history_uint | 15 sec ESC[0m 2017/07/26 08:48:47 ESC[1;36m[T] --- Memory usage: Alloc = 5.5 KiB | TotalAlloc = 29 MiB | Sys = 16 KiB | NumGC = 11201ESC[0m 2017/07/26 08:48:47 ESC[1;32m[I] ----------- | trends | [2017-07-26 07:00:00 --> 2017-08-25 07:00:00[ESC[0m 2017/07/26 08:48:47 ESC[1;32m[I] <-- Extract | trends | 0 rows in 2.338739msESC[0m 2017/07/26 08:48:47 ESC[1;32m[I] --> Load | trends | No dataESC[0m 2017/07/26 08:48:47 ESC[1;32m[I] --- Waiting | trends | 15 sec ESC[0m 2017/07/26 08:48:47 ESC[1;36m[T] --- Memory usage: Alloc = 5.6 KiB | TotalAlloc = 29 MiB | Sys = 16 KiB | NumGC = 11201ESC[0m 2017/07/26 08:48:47 ESC[1;32m[I] ----------- | trends_uint | [2017-07-26 07:00:00 --> 2017-08-25 07:00:00[ESC[0m