Ad Widget

Collapse

zabbix php api. fatal error with creation of items

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tristan
    Senior Member
    • Feb 2008
    • 110

    #1

    zabbix php api. fatal error with creation of items

    Hello,

    i'm trying to add a item to zabbix with the following code:
    PHP Code:
    ZabbixAPI::query('item','create',array('description'=>'Free disk space on $1','key_'=>'vfs.fs.size[/www,free]','hostid'=>'10086','applications'=>'10001'))
            or die(
    'Could not add template: '.print_r(ZabbixAPI::getLastError(),true)); 
    but when i execute it, i got a FATAL php error: Cannot unset string offsets in /www/sysmon2/monitor
    ing/include/items.inc.php on line 357

    any idea?

    when i change "key_" to key i got a normal exeption, so it look likes the underscore(_) is the problem?
Working...