{"id":962,"date":"2017-07-05T23:06:21","date_gmt":"2017-07-05T21:06:21","guid":{"rendered":"http:\/\/www.netexpertise.eu\/en\/?p=962"},"modified":"2021-04-23T10:39:08","modified_gmt":"2021-04-23T08:39:08","slug":"auto-update-devices-in-glpi","status":"publish","type":"post","link":"http:\/\/www.netexpertise.eu\/en\/misc\/glpi\/auto-update-devices-in-glpi.html","title":{"rendered":"Hardware Scanning and Auto Update in GLPI"},"content":{"rendered":"\n<p>Having loads of physical sites, it is extremely difficult to keep track of device&#8217;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.<br>More importantly, do you know what is on your network? Check how many devices are unknown and not registered in <a href=\"\/en\/category\/misc\/glpi\">GLPI<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><br>Requirements<\/h3>\n\n\n\n<p>&#8211; Add network switches in GLPI making sure Name (DNS name), brand, location and type fields are filled in. You need managed switches to connect on to them.<br><br>&#8211; Generate an <a href=\"https:\/\/www.ssh.com\/ssh\/keygen\/\">SSH key<\/a> 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<br>Supported switches include Cisco Catalyst, HP Procurve* and 3com but could be ported easily to other brands.<br>Check <a href=\"https:\/\/supportforums.cisco.com\/document\/110946\/ssh-using-public-key-authentication-ios-and-big-outputs\">Cisco<\/a>, <a href=\"http:\/\/whp-aus2.cold.extweb.hp.com\/pub\/networking\/software\/Security-Oct2005-59906024-Chap06-SSHv2.pdf\">HP<\/a> and 3com official documentation to install the public key on each device.<br><br>&#8211; Edit GLPI settings (in the script) and run the bash <a href=\"http:\/\/www.netexpertise.eu\/count\/click.php?id=15\">script<\/a><br>\u00a0<\/p>\n\n\n\n<div style=\"text-align: center;\"><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/Z5W2ClL5c0w\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><br><br>Features<\/h3>\n\n\n\n<p>&#8211; Gets the switch list from GLPI (registered as &#8220;switch&#8221; in network devices)<br><br>&#8211; Connects to the switches and gets a list of mac addresses<br><br>&#8211; If the mac is found in GLPI (within Computer, Printers or Network devices), updates Last modified date and location<br><br>&#8211; If not, gets the mac&#8217;s vendor from Internet. A cache makes it faster if the 6 digits were found before<br><br>&#8211; Tells percentage of known macs<br><br>&#8211; tells if duplicates are found in GLPI (mac found on the network matching multiple devices in GLPI)<br><br>&#8211; 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&#8217;t support it.<br><br>% gets better as you add more and more known macs in GLPI<br>You have no idea how many devices connect to the network!<br><br>* in combination with <a href=\"http:\/\/www.shrubbery.net\/rancid\/\">rancid<\/a><br><br><strong><a href=\"http:\/\/www.netexpertise.eu\/count\/click.php?id=15\">Download<\/a><\/strong> for free<\/p>\n\n\n\n<p><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Having loads of physical sites, it is extremely difficult to keep track of device&#8217;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.More importantly, do you know [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[306],"tags":[398],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Netexpertise - Hardware Scanning and Auto Update in GLPI<\/title>\n<meta name=\"description\" content=\"Scan your network from switches registered in GLPI, update database with hardware found, and inventory unknown devices\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.netexpertise.eu\/en\/misc\/glpi\/auto-update-devices-in-glpi.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Netexpertise - Hardware Scanning and Auto Update in GLPI\" \/>\n<meta property=\"og:description\" content=\"Scan your network from switches registered in GLPI, update database with hardware found, and inventory unknown devices\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.netexpertise.eu\/en\/misc\/glpi\/auto-update-devices-in-glpi.html\" \/>\n<meta property=\"og:site_name\" content=\"Netexpertise\" \/>\n<meta property=\"article:published_time\" content=\"2017-07-05T21:06:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-04-23T08:39:08+00:00\" \/>\n<meta name=\"author\" content=\"dave\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@netexpertise\" \/>\n<meta name=\"twitter:site\" content=\"@netexpertise\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.netexpertise.eu\/en\/misc\/glpi\/auto-update-devices-in-glpi.html\",\"url\":\"https:\/\/www.netexpertise.eu\/en\/misc\/glpi\/auto-update-devices-in-glpi.html\",\"name\":\"Netexpertise - Hardware Scanning and Auto Update in GLPI\",\"isPartOf\":{\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#website\"},\"datePublished\":\"2017-07-05T21:06:21+00:00\",\"dateModified\":\"2021-04-23T08:39:08+00:00\",\"author\":{\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa\"},\"description\":\"Scan your network from switches registered in GLPI, update database with hardware found, and inventory unknown devices\",\"breadcrumb\":{\"@id\":\"https:\/\/www.netexpertise.eu\/en\/misc\/glpi\/auto-update-devices-in-glpi.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.netexpertise.eu\/en\/misc\/glpi\/auto-update-devices-in-glpi.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.netexpertise.eu\/en\/misc\/glpi\/auto-update-devices-in-glpi.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/www.netexpertise.eu\/en\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hardware Scanning and Auto Update in GLPI\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#website\",\"url\":\"http:\/\/www.netexpertise.eu\/en\/\",\"name\":\"Netexpertise\",\"description\":\"Systems \/ Networks \/ DevOps\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.netexpertise.eu\/en\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa\",\"name\":\"dave\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g\",\"caption\":\"dave\"},\"sameAs\":[\"http:\/\/www.netexpertise.eu\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Netexpertise - Hardware Scanning and Auto Update in GLPI","description":"Scan your network from switches registered in GLPI, update database with hardware found, and inventory unknown devices","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.netexpertise.eu\/en\/misc\/glpi\/auto-update-devices-in-glpi.html","og_locale":"en_US","og_type":"article","og_title":"Netexpertise - Hardware Scanning and Auto Update in GLPI","og_description":"Scan your network from switches registered in GLPI, update database with hardware found, and inventory unknown devices","og_url":"https:\/\/www.netexpertise.eu\/en\/misc\/glpi\/auto-update-devices-in-glpi.html","og_site_name":"Netexpertise","article_published_time":"2017-07-05T21:06:21+00:00","article_modified_time":"2021-04-23T08:39:08+00:00","author":"dave","twitter_card":"summary_large_image","twitter_creator":"@netexpertise","twitter_site":"@netexpertise","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.netexpertise.eu\/en\/misc\/glpi\/auto-update-devices-in-glpi.html","url":"https:\/\/www.netexpertise.eu\/en\/misc\/glpi\/auto-update-devices-in-glpi.html","name":"Netexpertise - Hardware Scanning and Auto Update in GLPI","isPartOf":{"@id":"http:\/\/www.netexpertise.eu\/en\/#website"},"datePublished":"2017-07-05T21:06:21+00:00","dateModified":"2021-04-23T08:39:08+00:00","author":{"@id":"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa"},"description":"Scan your network from switches registered in GLPI, update database with hardware found, and inventory unknown devices","breadcrumb":{"@id":"https:\/\/www.netexpertise.eu\/en\/misc\/glpi\/auto-update-devices-in-glpi.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.netexpertise.eu\/en\/misc\/glpi\/auto-update-devices-in-glpi.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.netexpertise.eu\/en\/misc\/glpi\/auto-update-devices-in-glpi.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/www.netexpertise.eu\/en"},{"@type":"ListItem","position":2,"name":"Hardware Scanning and Auto Update in GLPI"}]},{"@type":"WebSite","@id":"http:\/\/www.netexpertise.eu\/en\/#website","url":"http:\/\/www.netexpertise.eu\/en\/","name":"Netexpertise","description":"Systems \/ Networks \/ DevOps","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.netexpertise.eu\/en\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa","name":"dave","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/image\/","url":"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g","contentUrl":"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g","caption":"dave"},"sameAs":["http:\/\/www.netexpertise.eu"]}]}},"_links":{"self":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts\/962"}],"collection":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/comments?post=962"}],"version-history":[{"count":0,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts\/962\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/media?parent=962"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/categories?post=962"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/tags?post=962"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}