Ad Widget

Collapse

Pass ITEM.ID macro to external check not working?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Smoke
    Junior Member
    • Jul 2014
    • 29

    #1

    Pass ITEM.ID macro to external check not working?

    I need to pass the itemid to an external scripts that i am invoking using External Check item type
    Code:
    myscript.py["{ITEM.ID}"]
    I am currently using Zabbix 5.04, is this a known bug or a limitation? that macro doesnt seem to be expanded.
    I also tried with item.name and it doesnt work neither.
  • Smoke
    Junior Member
    • Jul 2014
    • 29

    #2
    No, item.id nor host.id macros are not being expanded at that level, i was able to make host.host or host.dns work just fine.No extra details needed, script is not the problem, its a dummy script that all it does is echo the parameters back, and once again ITEM.ID or HOST.ID are not being expanded.

    ItemType: External Check
    Itemkey: myscript.py["{ITEM.ID}"]

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4807

      #3
      You left out all the details... Any error messages? How do you determine that its not working? Is there a possibility, that your script is not handling it properly?

      Comment

      • Smoke
        Junior Member
        • Jul 2014
        • 29

        #4
        I came back 2 years later, horrible from my side, but i see there are missing messages on the thread that some other members replied, so it makes no much sense for new users reading it, anyhow, that was back in 2020 with version 5.0.
        To o answer cyber question, zabbix was not expanding the argument, i.e., the script was being called with the literal string {ITEM.ID} instead of expand it, all other variables were being expanded correctly, i'm pretty sure it had nothing to do with the script.

        Anyways, this should be long worked/fixed/updated on newer versions, just didn't want to left another thread stranded when I can take 2mins and update!

        Comment

        Working...