Ad Widget

Collapse

Item.key[{$MACRO}] with trapper

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • watm24
    Junior Member
    • Apr 2022
    • 6

    #1

    Item.key[{$MACRO}] with trapper

    I have trouble with delivering data from zabbix_sender to item with user macro defined.

    OS version:
    Code:
    root@lora:/var/log/zabbix# lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 18.04.6 LTS
    Release: 18.04
    Codename: bionic
    Server version:
    Code:
    root@lora:/var/log/zabbix# zabbix_server -V
    zabbix_server (Zabbix) 5.4.12
    Revision 9bd5a418b8 4 April 2022, compilation time: Apr 4 2022 08:20:16
    Host 'dev-test-7' has user macro defined
    Click image for larger version

Name:	dev-test-7_macro.png
Views:	699
Size:	13.1 KB
ID:	450534

    Also this host have items configured. One with macro, one static.
    Click image for larger version

Name:	dev-test-7_items.png
Views:	648
Size:	6.4 KB
ID:	450535

    Delivering data from zabbix_sender works only for static item.
    Code:
    root@lora:/var/log/zabbix# zabbix_sender -z 127.0.0.1 -s dev-test-7 -k rs485_[2] -o 2
    Response from "127.0.0.1:10051": "processed: 1; failed: 0; total: 1; seconds spent: 0.000066"
    sent: 1; skipped: 0; total: 1
    root@lora:/var/log/zabbix# zabbix_sender -z 127.0.0.1 -s dev-test-7 -k rs485[2] -o 2
    Response from "127.0.0.1:10051": "processed: 0; failed: 1; total: 1; seconds spent: 0.000036"
    sent: 1; skipped: 0; total: 1
    ​
    Please help me solve this problem.
  • watm24
    Junior Member
    • Apr 2022
    • 6

    #2
    Found this note
    https://www.zabbix.com/documentation...mtypes/trapper
    Attention: Zabbix trapper process does not expand macros used in the item key in attempt to check corresponding item key existence for targeted host.
    Sadly it looks like it's unsupported for now.
    Even in 6.2.

    Comment

    Working...