[ZBX-5748] item key has ")" cannot be used for calculated item Created: 2012 Oct 26 Updated: 2017 May 30 Resolved: 2012 Oct 28 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 2.0.3 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Major |
Reporter: | Kodai Terashima | Assignee: | Unassigned |
Resolution: | Won't fix | Votes: | 0 |
Labels: | calculateditems | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Windows agent |
Issue Links: |
|
Description |
The item key has ")" cannot be used for calculated item. For example, there is performance counter item for windows: perf_counter["\Network Interface(Intel[R] 82574L Gigabit Network Connection)\Packets Received/sec"] and create calculated item use the key above: last("perf_counter["\Network Interface(Intel[R] 82574L Gigabit Network Connection)\Packets Received/sec"]")*100 Web interface accept the calculated item, but the item will be error on Zabbix server side. Here is debug log on zabbix_server.log 15752:20121025:021703.484 In get_value() key:'calculated.perf_counter' 15752:20121025:021703.484 In get_value_calculated() key:'calculated.perf_counter' expression:'last("perf_counter["\Network Interface(Intel[R] 82574L Gigabit Network Connection)\Packets Received/sec"]")*100' 15752:20121025:021703.484 In calcitem_parse_expression() expression:'last("perf_counter["\Network Interface(Intel[R] 82574L Gigabit Network Connection)\Packets Received/sec"]")*100' 15752:20121025:021703.484 calcitem_parse_expression() functionid:1 function:'last("perf_counter["\Network Interface(Intel[R] 82574L Gigabit Network Connection)' 15752:20121025:021703.484 calcitem_parse_expression() expression:'{1}\PacketsReceived/sec"]")*100' 15752:20121025:021703.484 In substitute_simple_macros() data:'{1}\PacketsReceived/sec"]")*100' 15752:20121025:021703.484 End substitute_simple_macros() data:'{1}\PacketsReceived/sec"]")*100' |
Comments |
Comment by Alexander Vladishev [ 2012 Oct 27 ] |
Kodai, The double quotes should be escaped by '\' symbol in function parameters. last("perf_counter[\"\Network Interface(Intel[R] 82574L Gigabit Network Connection)\Packets Received/sec\"]")*100 |
Comment by Alexander Vladishev [ 2012 Oct 28 ] |
I'm closing the issue. |