Type: Change Request
Affects Version/s: None
Fix Version/s: None
Component/s: Server (S)
This trivial function is very helpful when checking for example SOAP WebServices. My webservices have implemented method IsActive and responding True in IsActiveResult clause.
Parsing is done in preprocessing tab:
- XML Xpath : //*[local-name()='IsActiveResult']/text()
- Boolean to decimal
Then its stored to history as a number.
Problem i faced was making a reliable trigger. When WS is accessible there is 1 stored in history but when it's not accessible, item change state to NOT SUPPORTED. My 1st attempt was to use .nodata(time) function but, it was generating false positives every time zabbix queue processing was slower than nodata() argument value. Setting bigger value not helping much because it dalays alerts and there are still some false positives.
Then i implemented notsupp() function and used this instead of nodata, now every time this items turn NOT SUPPORTED it means webservice failed.
I attached patch I done, I know there is some not used things like not used arguments and some things lacking like function error states, but it works and do its job perfectly. It would be nice to see that in official sources or maybe i need a hint how to trigger this case better using functions already available.