[ZBX-17516] Cannot evaluate expression: expected numeric token Created: 2020 Mar 26 Updated: 2020 Mar 27 Resolved: 2020 Mar 27 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | None |
Affects Version/s: | 4.4.7 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Trivial |
Reporter: | Julien VINCENT | Assignee: | Zabbix Support Team |
Resolution: | Commercial support required | Votes: | 0 |
Labels: | calculateditems | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Ubuntu 18.04 |
Attachments: |
![]() ![]() |
Description |
Hello everyone, Please find below the issue encountered. I am using the system run key to get a docker image version. The command i have works fine but for a specific reason, i am created a calculated item, unfortunately it does not work, i believe because it needs to be in text type and not in numeric mode.
Steps to reproduce:
Result: |
Comments |
Comment by Dmitrijs Lamberts [ 2020 Mar 26 ] |
Is type of information - float on both? |
Comment by Julien VINCENT [ 2020 Mar 27 ] |
Hello Dmitrijs, No, the actif agent item has text type of information while the calculated item has Numeric (unsigned) there are only two options, Numeric (unsigned) and Numeric (float). the rest is greyed out |
Comment by Dmitrijs Lamberts [ 2020 Mar 27 ] |
And how does the actual received value looks like? |
Comment by Julien VINCENT [ 2020 Mar 27 ] |
Yes, this is the output from the command : sudo docker ps | grep "name of the container" | cut -d':' -f 2 | cut -c1-9. It can return the following information :
It will varie depending on the image version in docker meaning it will also evolve. ============================================================= To give you a better idea of what i want to do, it's simple, i would like to display this information under every devices on the map. According to the information i found on internet, i tried adding the following in the label of the device : {ndevice:name:system.run[sudo docker ps | grep "name of the container" | cut -d':' -f 2 | cut -c1-9].last(0)}But it returns an "unknown" output, so i wanted to do it via the calculated formula. (see the attached image "device_version") |
Comment by Dmitrijs Lamberts [ 2020 Mar 27 ] |
Well, it's not an integer. And it's not a float. Since it is not a bug, and there is nothing to fix here. I am closing this issue. If you want to get commercial help from Zabbix, please get in touch with our Sales team at [email protected] |
Comment by Julien VINCENT [ 2020 Mar 27 ] |
Ok, thank you for your help. Best regards |