Ad Widget

Collapse

Mysql: Get Template Name and item Name

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • karl.otte
    Junior Member
    • Oct 2012
    • 3

    #1

    Mysql: Get Template Name and item Name

    Hi, I need your help.

    What is the SQL command that I caught the name of the item and the name of that template?

    Regards, Karl.
  • ableev
    Senior Member
    Zabbix Certified Specialist
    • Oct 2012
    • 276

    #2
    Code:
    mysql> SELECT h.host AS Template, i.description AS Item FROM items i JOIN hosts h ON i.hostid = h.hostid WHERE i.templateid = 0 AND i.description like 'Free memory';
    +----------------+-------------+
    | Template       | Item        |
    +----------------+-------------+
    | Template_Linux | Free memory |
    +----------------+-------------+
    1 row in set (0.00 sec)

    Comment

    • karl.otte
      Junior Member
      • Oct 2012
      • 3

      #3
      Tks

      Thank you ableev.

      I could do what I wanted.

      Comment

      Working...