Jul 05 2017

Auto Update Devices in GLPI

Published by at 11:06 pm under GLPI




Having loads of sites, it is extremely difficult to keep track of device’s locations, and even if you do, you may not be aware some people moved computers or printers around to a new place without telling; It can also be useful to know where a device was last seen.
 
Requirements:
– Add network switches in GLPI making sure Name (DNS name), brand, location and type fields are filled in
– Generate an SSH key pair on the server from where you are going to run the script, install the public key on the switches so you can log on automatically on each one of them
Supported switches include Cisco Catalyst, HP Procurve* and 3com but could be ported easily to other brands.
Check Cisco, HP and 3com official documentation to install the public key on each device.
– Edit GLPI settings (in the script) and run the script
 

 
Features:
– Gets the switch list from GLPI (registered as “switch” in network devices)
– Connects to the switches and gets a list of mac addresses
– If the mac is found in GLPI (within Computer, Printers or Network devices), updates Last modified date and location
– If not, gets the mac’s vendor from Internet. A cache makes it faster if the 6 digits were found before
– Tells percentage of known macs
– tells if duplicates are found in GLPI (mac found on the network matching multiple devices in GLPI)
– Works on Cisco, HP* and 3com switches and could be easily modified for other brands that support SSH auto-connect. Some gears like Cisco Small Business don’t support it.
% gets better as you register more and more macs in GLPI
You have no idea how many devices connect to the network!

* in combination with rancid

Download for free


No responses yet

Trackback URI | Comments RSS

Leave a Reply