-
Problem report
-
Resolution: Duplicate
-
Trivial
-
None
-
5.2.5
-
None
HTTP based check with a preprocessing step of certain javascript causes Zabbix to crash.
Item is calling an HTTP API, and if it would go unsupported value is set to APIFAIL and carried through the JS function.
JS Function that causes crash is:
============ switch(value) { case 'APIFAIL': return 'APIFAIL'; break; case '[]': return 0; break; default: return parseJson(value); } function parseJson(value) { var obj = JSON.parse(value); var parsedJson = { "alarm_state": obj[0].alarm_state, "alarm_id": obj[0].alarm_id, "alert_severity": obj[0].alert_severity, "alert_dimension": obj[0].alert_dimension, "policy_name": obj[0].policy_name, "alert_key_lookup": obj[0].alert_key_lookup, "mitigation_id": obj[0].mitigation_id } var json = JSON.stringify(parsedJson); return json; } ============
Screenshots and log file attached.
- duplicates
-
ZBX-18860 "Check for not supported value" with log item crashes Proxy
- Closed