[ZBXNEXT-5180] Context based macro - text is seen as logical OR function Created: 2019 Apr 16  Updated: 2019 Apr 17  Resolved: 2019 Apr 17

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

Type: New Feature Request Priority: Minor
Reporter: Twan K. Assignee: Andris Zeila
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Redhat VM


Attachments: JPEG File Zabbix.jpg    

 Description   

Scenario: Discovering temperature sensors on a Cisco switch using SNMP. I want to use context based macro's so that i can set a different temperature limit for all sensors.

However with the discovered values (Temperature sensor names) i get some odd results.

Trigger prototype configuration
The macro {#SENSOR_NAME} is discovered with the discovery rule.

temperature.entity"{#SENSOR_NAME}".last() > {$MAX_TEMP:"{#SENSOR_NAME}"}

Discovered names

This all works great in the template expression constructor. However when i run the discovery rule i get the following values for {#SENSOR_NAME} back:

Switch 1 - WS-C3850-48T - Temp inlet Sensor 0
Switch 1 - WS-C3850-48T - Temp Outlet Sensor 0

The discovered triggers looks like this:

temperature.entity["Switch 1 - WS-C3850-48T - Temp inlet Sensor 0"].last() > {$MAX_TEMP:"Switch 1 - WS-C3850-48T - Temp inlet Sensor 0"}

However the expression constructor shows why the trigger is failing.

It seems like the last 2 letters of the word "sensor" are being treated as a logical OR.

It this behavior intentional, am i formatting the expression wrong, it there a workaround (other than using the SNMPINDEX in the key and context macro) or am i dealing with a bug here?

 

Thanks in advance.



 Comments   
Comment by Glebs Ivanovskis [ 2019 Apr 17 ]

Looks like it should be among bug reports, not among feature requests.

Comment by Twan K. [ 2019 Apr 17 ]

@cyclone My apologies, this is indeed a bug report. Not a feature request. I can't find an option to edit my issue, can the Zabbix team change this?

 

Comment by Twan K. [ 2019 Apr 17 ]

I'm closing this one and creating a new, proper bug report in the Bugs and issues project.

https://support.zabbix.com/browse/ZBX-16018

Generated at Fri Apr 26 03:10:41 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.