Ad Widget

Collapse

php error with macro in item keys - Zabbix ver 1.9.7

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • FFantoni
    Junior Member
    Zabbix Certified Trainer
    Zabbix Certified Specialist
    • Aug 2008
    • 4

    #1

    php error with macro in item keys - Zabbix ver 1.9.7

    Hi, I create a template with a item to collect network statistics on windows interfaces:

    "net.if.out[{HOST.IP},bytes]"

    On windows you can use ipaddress in net.if.out to monitor the correct interface.
    The item work correctly but on the zabbix interface I have this error:

    "reset() expects parameter 1 to be array, null given [include/items.inc.php:582]" one per item.

    Probably is an interface bug, because with a user macro I don't have this error.
    Did I need to open a bug?
    Thank you and congratulation for the new zabbix 2.0 features!
  • keul
    Junior Member
    • Nov 2011
    • 11

    #2
    Try with that :


    replace
    Code:
    $host = reset($dbItem['hosts']);
    $interface = reset($dbItem['interfaces']);
    with
    Code:
    $host = reset($dbItem['selectHosts' ]);
    $interface = reset($dbItem['selectInterfaces' ]);
    in the file (look at code just before the lines)

    in include/items.inc.php

    Comment

    • FFantoni
      Junior Member
      Zabbix Certified Trainer
      Zabbix Certified Specialist
      • Aug 2008
      • 4

      #3
      Hi! Thanks for reply, I try your patch but it only duplicate the errors

      Comment

      • keul
        Junior Member
        • Nov 2011
        • 11

        #4
        Try with the new relase:
        Zabbix 1.9.8 (Third Beta Release of 2.0)

        And you should post in this forum :

        Comment

        Working...