Ad Widget

Collapse

how to get.host location latitude-longitude

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • de-denker
    Junior Member
    • Sep 2014
    • 8

    #1

    how to get.host location latitude-longitude

    Hi all,

    I am trying to mass update my servers with location coordinates.
    Now I have the script to get the location info.
    But now I need to inject this information in Zabbix with the API.
    Of course I also need to set inventory information to manual.

    I did find that I can change database directly ( SELECT inventory_mode,location,location_lat,location_lon FROM host_inventory ) and might be needed some times (if anyone disagree please send me a PM, do not pollute this thread)

    But does anyone know the API way?
    Also getting that information by API is still a mystery for me, and yes I did read the documentation.
    Please provide an example...

    Thanks!
  • de-denker
    Junior Member
    • Sep 2014
    • 8

    #2
    meanwhile

    I did find an other way, export the host to XML and import it again with adjusted fields.
    Because the API host.get doesn't get me the inventory info...

    So I have being working on a powershell script.
    It read the server details with the SCCM module, containing the location ( region - country - city ).
    Region is not used, but the country and city are parsed to openstreetmap to get longitude and latitude back.
    Which can injected to the XML file.

    Problem I am having now is that powershell module I am using to talk with the Zabbix API did not support exporting or importing host XML.
    I manage to enable export to variable, but import or exporting to file still elude me...

    Any one care to help?

    Comment

    Working...