Ad Widget

Collapse

LLD using SQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • leandro0.o
    Junior Member
    • Nov 2019
    • 3

    #1

    LLD using SQL

    Hello guys!

    I want to create dynamic items for each host.
    The items should be created based on a result from a SQL query.
    I saw that using LLD I can create this, but I don't know how to identify a host in the query.

    For example: I have a table with columns zabbix_host_id and ip_destination.
    I want to get ip_destination of my specific Zabbix Agent.
    Code:
    SELECT ip_destination FROM monitoring WHERE zabbix_host_ID = {#SERVER_HOST_ID}
    The result will create items to check ping to these ip_destination.
    But, the Zabbix Host ID 1002 checks to server A, B and D. Zabbix Host ID 1005 checks to B, C and E.

    How can I do this?
Working...