Ad Widget

Collapse

External checks with variable(s)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wnkz
    Junior Member
    • Oct 2013
    • 2

    #1

    External checks with variable(s)

    Hello,
    My problem is the following: I want to automatically populate my warranty expiration date for all my Dell hosts; and maybe later, setup a trigger on this item.

    I'm using an external script get-dell-warranty.sh and what I'm trying to do is something like this:

    Code:
    Key: get-dell-warranty.sh["{INVENTORY.SERIALNO.A}"]
    Fact is, according to this page https://www.zabbix.com/documentation...types/external this MACRO is not supported in "Item key's parameters".

    Does someone have and idea of how I can accomplish this ? Any idea would be good to hear, except, I would like to keep this as an external check, or at least keep it running server / proxy side.

    Thank you for your support.
  • steveboyson
    Senior Member
    • Jul 2013
    • 582

    #2
    Macro's names are in the form {$MACRO_NAME}.
    (Note the leading $)

    I doubt that "." is allowed in macro names. Just rename it and test again.

    Comment

    • wnkz
      Junior Member
      • Oct 2013
      • 2

      #3
      Originally posted by steveboyson
      Macro's names are in the form {$MACRO_NAME}.
      (Note the leading $)

      I doubt that "." is allowed in macro names. Just rename it and test again.
      Thanks for your reply but check again the official documentation https://www.zabbix.com/documentation...#usage_example; in this example they use it like this:

      Code:
      check_oracle.sh["-h","{HOST.CONN}"]
      You can find all macro's here : https://www.zabbix.com/documentation...ed_by_location

      Comment

      • Pada
        Senior Member
        • Apr 2012
        • 236

        #4
        There are 2 different kind of macros: Zabbix and user defined ones.

        Zabbix macro's are in the form of {<name>}: https://www.zabbix.com/documentation...ed_by_location

        User macro's are in the form of {$<name>}: https://www.zabbix.com/documentation...ros/usermacros

        Here are the allowed characters for an item key: https://www.zabbix.com/documentation...items/item/key

        Update:
        Unfortunately INVENTORY.SERIALNO.A.* isn't supported for external checks - see the first link for the macro support matrix. The macro has to have a mark in column 5 if you want to use it in an item (or external check).

        According to the Zabbix 2.2 documentation that macro is supported for external checks, but not in Zabbix 2.0.
        Last edited by Pada; 25-10-2013, 21:21. Reason: Added reason why external check not working.

        Comment

        Working...