Ad Widget

Collapse

Zabbix 1.5.4 Build-5784

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Palmertree
    Senior Member
    • Sep 2005
    • 746

    #1

    Zabbix 1.5.4 Build-5784

    Can not delete items. Fixed this by changing value to value_id for the updated profiles schema in items.inc.php.

    There is also an occurrence in maps.inc.php and screens.inc.php as well.

    Code:
    802                 $result &= DBexecute('DELETE FROM screens_items WHERE resourceid='.$itemid.' AND resourcetype IN ('.
     803                                         (implode(',',array(
     804                                                 SCREEN_RESOURCE_SIMPLE_GRAPH,
     805                                                 SCREEN_RESOURCE_PLAIN_TEXT)
     806                                                 )
     807                                         ).')');
     808
     809                 $result &= DBexecute('delete from items_applications where itemid='.$itemid);
     810                 $result &= DBexecute('delete from items where itemid='.$itemid);
     811                 $result &= DBexecute("DELETE FROM profiles WHERE idx='web.favorite.graphids' AND source='itemid' AND [COLOR="Red"]value_id[/COLOR]='$itemid'");
     812
     813                 if($result){
     814                         info("Item '".$host["host"].":".$item["key_"]."' deleted");
     815                 }
     816         return $result;
    Last edited by Palmertree; 21-06-2008, 16:33.
  • Aly
    ZABBIX developer
    • May 2007
    • 1126

    #2
    Thank you, fixed.
    Zabbix | ex GUI developer

    Comment

    • vinny
      Senior Member
      • Jan 2008
      • 145

      #3
      Aly,
      I faced the same pb and a well known error message :

      * pg_query() [<a href='function.pg-query'>function.pg-query</a>]: Query failed: ERROR: column "web.favorite.graphids" does not exist at character 32[/data/www/zabbix-1.5.3/include/db.inc.php:445]
      * Error in query [DELETE FROM profiles WHERE idx="web.favorite.graphids" AND source="itemid" AND value_id=17917] [ERROR: column "web.favorite.graphids" does not exist at character 32]

      But this is due to PostGreSQL syntax : you must use in your queries simple quote, not double
      -------
      Zabbix 1.8.3, 1200+ Hosts, 40 000+ Items...zabbix's everywhere

      Comment

      Working...