Ad Widget

Collapse

Problem with items status in mysql where item satsus is not supported

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dariusz Lubecki
    Junior Member
    • Mar 2013
    • 4

    #1

    Problem with items status in mysql where item satsus is not supported

    Hi

    I have a problem with select not supported items from mysql databases.
    When I query:
    mysql> select items.name,host,key_ from items join hosts on items.hostid = hosts.hostid where items.status=3 order by items.hostid;
    Empty set (0.00 sec)

    Also when i query:
    mysql> select name,key_,status from items where key_="test_key_not_supported" limit 1;
    +------------+------------------------+--------+
    | name | key_ | status |
    +------------+------------------------+--------+
    | Zabbixtest | test_key_not_supported | 0 |
    +------------+------------------------+--------+
    1 row in set (0.00 sec)

    I have status=0, but in zabbix GUI this item have status=Not supported (it shouldn't be status=3?). As an attachment I send you a screen shoot of the not supported example item.

    Do you know what could cause the problem?

    On zabbix version 2.0.10 it's works properly:
    mysql> select items.name,host,key_ from items join hosts on items.hostid = hosts.hostid where items.status=3 order by items.hostid;
    +-----------------------------------+----------------------+--------------------------------------------------+
    | name | host | key_ |
    +-----------------------------------+----------------------+--------------------------------------------------+
    | Disk read operations per second | xxx1.ogicom.net | iops[read] |
    | Disk read operations per second | xxx2.ogicom.net | iops[read] |
    | Disk read operations per second | xxx3.ogicom.net | iops[read] |
    | memcached.stats[curr_connections] | bbb.ogicom.net | memcached.stats[curr_connections] |
    +-----------------------------------+----------------------+--------------------------------------------------+
    4 rows in set (0.00 sec)
    Attached Files
  • Bentsi
    Junior Member
    • Feb 2014
    • 9

    #2
    Didn't check the query but I have unsupported items too that your query returns nothing....
    Attached Files

    Comment

    • ArtemK
      Senior Member
      • May 2013
      • 232

      #3
      items.status=3 -> items.state=1

      I use this query:
      Code:
      SELECT DISTINCT h.host,f.ip,i.key_ FROM items i, hosts h, interface f WHERE i.hostid = h.hostid AND h.status = 0 AND i.state= 1 AND f.hostid = h.hostid AND f.type = 1 and f.ip is not null;

      Comment

      Working...