Ad Widget

Collapse

Create a way to query the database of item

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ghislain
    Senior Member
    • Jun 2005
    • 160

    #1

    Create a way to query the database of item

    Hi,

    It will be very valuable to me to be able to search into the item database. For exemple if i want to know:

    - list me the host that have more than 2GB of ram
    - list me the host with less than 10% of disk in root


    All this is in the database but i cannot query it. I would have to create a trigger specialy for this but it would be very usefull to have a way to creta a custom query to see the actual state of an item on every host.

    I can see plenty of use for this.


    regards,
    Ghislain.
    Regards,
    Ghislain.
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    this might be something api could help with, maybe... or a zabcon command to the api. not sure on which layer would it belong more
    Zabbix 3.0 Network Monitoring book

    Comment

    • Axilla
      Senior Member
      • Aug 2010
      • 130

      #3
      Code:
      $lastvalue = mysql_query("SELECT lastvalue,description FROM items INNER JOIN hosts on items.hostid = hosts.hostid INNER JOIN hosts_profiles_ext ON hosts.hostid = hosts_profiles_ext.hostid WHERE device_alias = '$elementid'");

      Comment

      Working...