Ad Widget

Collapse

external check with item last value as a parameter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ShyLionTmn
    Junior Member
    • Dec 2014
    • 5

    #1

    external check with item last value as a parameter

    Hi.
    Zabbix 2.2

    I've got several items like:

    Code:
    olt-01:onuMAC[EPON0/2:1]
    olt-01:onuMAC[EPON0/2:2]
    olt-01:onuMAC[EPON0/2:3]
    and so on
    i want external check to be performed with last value of these items.

    i've configured item with key parameter as this:

    Code:
    client_login["{olt-01:onuMAC[EPON0/2:1]}.last(0)"]
    but it runs script with parameter "
    Code:
    {olt-01:onuMAC[EPON0/2:1]}.last(0)
    " without calculating item value.

    What am i doing wrong?
  • aib
    Senior Member
    • Jan 2014
    • 1615

    #2
    It's impossible to use the last result of one key as a parameter for different key.

    Sorry
    Sincerely yours,
    Aleksey

    Comment

    • ShyLionTmn
      Junior Member
      • Dec 2014
      • 5

      #3
      Thanks. It seems i'll have to lookup key value in zabbix DB directly from script.

      Like this:

      Code:
      select value from (history_str inner join items on items.itemid=history_str.itemid) inner join hosts on hosts.hostid=items.hostid where key_='onuMAC[EPON0/2:7]' and host='olt-01' order by clock desc limit 1;

      Comment

      Working...