Ad Widget

Collapse

How to create a query for extract csv from inentory ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • molmi
    Member
    • Jul 2010
    • 39

    #1

    How to create a query for extract csv from inentory ?

    Thanks to all ....

    I want to create data extraction dall'inventory possibly *. csv to understand how many machines with a particular piece of hardware I have in my network of about 1000 pcs.

    Also wanted to ask if zabbix has an automated way through any SNMP to automatically compile the information inventory of PCs.

    Thanks!
    Last edited by molmi; 23-07-2010, 15:08. Reason: sintax error in title
  • sarathyme
    Member
    • Mar 2009
    • 58

    #2
    The inventory data is saved in tables hosts_profiles, hosts_profiles_ext you may query from those tables(by joining with hosts ).

    (MySQL provides export to csv feature)

    (e.g.)
    SELECT h.host,
    hp.os,
    hpe.site_city
    INTO OUTFILE '/home/zabbix/temp/zabbix_inventory.csv'
    FIELDS TERMINATED BY ','
    LINES TERMINATED BY '\n'
    FROM hosts h,
    hosts_profiles hp,
    hosts_profiles_ext hpe
    WHERE h.hostid = hp.hostid
    AND h.hostid = hpe.hostid
    Last edited by sarathyme; 26-07-2010, 11:03.

    Comment

    Working...