{"id":2576,"date":"2025-06-22T22:45:29","date_gmt":"2025-06-22T21:45:29","guid":{"rendered":"https:\/\/www.balajibandi.com\/?p=2576"},"modified":"2025-06-22T22:54:05","modified_gmt":"2025-06-22T21:54:05","slug":"network-monitor-dashboard","status":"publish","type":"post","link":"https:\/\/www.balajibandi.com\/?p=2576","title":{"rendered":"Network Monitor Dashboard"},"content":{"rendered":"\n<p>It&#8217;s a new world for network engineers to know Programming and automation (boring stuff they do every day)<\/p>\n\n\n\n<p>I have many tasks which need to be done automatically to get the output as expected. It&#8217;s been a Long time since I thought about it and wanted to do it, but I never got the time or enough hands-on experience on how these things work.<\/p>\n\n\n\n<p>I have contacted some of them who have done this, but due to their busy lives, they may not be able to assist me or guide me in a better way.<\/p>\n\n\n\n<p>some people in known circle told me what to use how to use &#8211; that put my ideas on the table to work<\/p>\n\n\n\n<p>so kindly bare with me this Beta of my testing, this may be not be 100% in production environment, but you can use and share how ever way you like  &#8211; make sure you understand the script if you like to run them (if you are using in production just be cautious to use).<\/p>\n\n\n\n<p>Before I delve into the details, let&#8217;s begin with the idea.<\/p>\n\n\n\n<p>As I stated at the beginning, I would like to automate many tedious tasks to obtain results in my email or GUI report, so I do not need to visit each device and manually review what I am trying to achieve.<\/p>\n\n\n\n<p>Small Lab setup :<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Ubuntu 24. X LTS<\/li>\n\n\n\n<li>FastAPI and Python virtual environment<\/li>\n\n\n\n<li>I used some known tools, high-level &#8211; Netmiko, PyATS, Gennie, and PostgreSQL to manage all data in the database<\/li>\n\n\n\n<li>Create a virtual environment to build some switches for testing (later, I will test it in a real environment to see how that works).<\/li>\n<\/ol>\n\n\n\n<p>I will explain in detail the steps I have taken to install the app from scratch. For now, I am focusing on the app.<\/p>\n\n\n\n<p>Lab Topology:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"974\" height=\"434\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-3.png\" alt=\"\" class=\"wp-image-2577\" style=\"width:621px;height:auto\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-3.png 974w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-3-300x134.png 300w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-3-768x342.png 768w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-3-705x314.png 705w\" sizes=\"auto, (max-width: 974px) 100vw, 974px\" \/><\/figure>\n\n\n\n<p>All management IP and Ubuntu IP are in the same range for ease of use. That is 192.168.X.X\/24<\/p>\n\n\n\n<p><strong>Lab Setup<\/strong><\/p>\n\n\n\n<p>OS: Ubuntu 24. X LTS<\/p>\n\n\n\n<p>Tools: FastAPI, Python, Netmiko, PyATS, Genie, PostgreSQL<\/p>\n\n\n\n<p>Lab topology diagram<\/p>\n\n\n\n<p><strong>Application Features<\/strong><\/p>\n\n\n\n<p>Device management (add\/edit\/delete)<\/p>\n\n\n\n<p>Switchport report (ports down &gt;60 days, CSV export)<\/p>\n\n\n\n<p>Device report (detailed device stats)<\/p>\n\n\n\n<p>Subnet scan (multi-processing, SSH, OS detection)<\/p>\n\n\n\n<p>Dashboard preview and planned improvements<\/p>\n\n\n\n<p><strong>Lessons Learned<\/strong><\/p>\n\n\n\n<p>Learning curve, using AI, and community support<\/p>\n\n\n\n<p>Show the device information:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"446\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-4-1024x446.png\" alt=\"\" class=\"wp-image-2578\" style=\"width:630px;height:auto\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-4-1024x446.png 1024w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-4-300x131.png 300w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-4-768x335.png 768w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-4-705x307.png 705w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-4.png 1281w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Manage Devices (you can manage devices, adding, editing, and deleting for now.)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"590\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-5-1024x590.png\" alt=\"\" class=\"wp-image-2579\" style=\"width:640px;height:auto\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-5-1024x590.png 1024w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-5-300x173.png 300w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-5-768x442.png 768w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-5-705x406.png 705w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-5.png 1532w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Switchport report (the port was down for more than 60 days and not in use) &#8211; one of the requirements, and a CSV file can be downloaded.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"118\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-6-1024x118.png\" alt=\"\" class=\"wp-image-2580\" style=\"width:651px;height:auto\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-6-1024x118.png 1024w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-6-300x35.png 300w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-6-768x89.png 768w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-6-1536x178.png 1536w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-6-705x82.png 705w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-6.png 1730w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Device Report &#8211; You can select a specific device or all devices to scan and obtain a Device Switchport Report.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"629\" height=\"386\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-7.png\" alt=\"\" class=\"wp-image-2581\" style=\"width:617px;height:auto\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-7.png 629w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-7-300x184.png 300w\" sizes=\"auto, (max-width: 629px) 100vw, 629px\" \/><\/figure>\n\n\n\n<p>Scan Subnet &#8211; Scan an entire subnet with username and password input, using SSH, and determine the switch name and IP. Store the information in a database. This process supports multi-threading. The option allows for scanning either IOS or Nexus OS for now.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"853\" height=\"368\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-8.png\" alt=\"\" class=\"wp-image-2582\" style=\"width:609px;height:auto\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-8.png 853w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-8-300x129.png 300w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-8-768x331.png 768w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-8-705x304.png 705w\" sizes=\"auto, (max-width: 853px) 100vw, 853px\" \/><\/figure>\n\n\n\n<p>Device Report &#8211; This provides comprehensive information about all devices scanned in the network, including the following details, as illustrated in the screenshot.<\/p>\n\n\n\n<p>IP, Hostname, Model, SN, OS (IOS Code), Stack count (number of switches in the stack), Total Interfaces in the device, number of up and down interfaces, time the switch has been up, last time this device was scanned, Uptime in days.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"316\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-9-1024x316.png\" alt=\"\" class=\"wp-image-2583\" style=\"width:618px;height:auto\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-9-1024x316.png 1024w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-9-300x93.png 300w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-9-768x237.png 768w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-9-1536x475.png 1536w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-9-705x218.png 705w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2025\/06\/image-9.png 1634w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>I will soon post the code on GitHub and share the information on how it works.<\/p>\n\n\n\n<p>I am more excited about this application. It took me 2 months to learn from scratch and get things going. I should say thank you to the new era of AI for fixing many of my programming errors.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Cautions<\/strong>\n<ul class=\"wp-block-list\">\n<li>Beta status, production risks, importance of code review<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>Thank you again for visiting, and happy Labbiiiiiiiiiiiiiiiiiiiiiiiiiiing!<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s a new world for network engineers to know Programming and automation (boring stuff they do every day) I have many tasks which need to be done automatically to get the output as expected. It&#8217;s been a Long time since I thought about it and wanted to do it, but I never got the time [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,10,2,7],"tags":[],"class_list":["post-2576","post","type-post","status-publish","format-standard","hentry","category-ccie-sec","category-ccie-rns","category-cisco","category-linux"],"_links":{"self":[{"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/posts\/2576","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2576"}],"version-history":[{"count":25,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/posts\/2576\/revisions"}],"predecessor-version":[{"id":2609,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/posts\/2576\/revisions\/2609"}],"wp:attachment":[{"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2576"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2576"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}