[ZBXNEXT-4870] New function notsupp() to check if item is in NOT SUPPORTED state. Created: 2018 Nov 21  Updated: 2019 Aug 01

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: Server (S)
Affects Version/s: None
Fix Version/s: None

Type: Change Request Priority: Minor
Reporter: Miłosz Kędziora Assignee: Andris Zeila
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Zip Archive zbx401_notsupp.zip    

 Description   

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:

  1. XML Xpath : //*[local-name()='IsActiveResult']/text()
  2. 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.

 

best regards

milo



 Comments   
Comment by Alexei Vladishev [ 2019 Jul 31 ]

I believe you could use "Custom on fail" and set value to 0 if XML Xpath fails.

Comment by Miłosz Kędziora [ 2019 Aug 01 ]

sure thing, as soon as i it will be available in LTS, good to know it is addressed now.

Generated at Sat Apr 20 16:19:51 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.