# Return CLI output from a Cisco 5k Switch

**URL:** <https://discourse.nodered.org/t/return-cli-output-from-a-cisco-5k-switch/39685>\
**Category:** General\
**Created:** [25 January 2021 03:57 UTC](https://discourse.nodered.org/t/return-cli-output-from-a-cisco-5k-switch/39685 "2021-01-25T03:57:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrdanedwards](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@mrdanedwards](https://discourse.nodered.org/u/mrdanedwards)\
**Post date:** [25 January 2021 03:57 UTC](https://discourse.nodered.org/t/return-cli-output-from-a-cisco-5k-switch/39685/1 "2021-01-25T03:57:01Z")

</div>

Hello All,

I am pretty new to Node-Red, and have been using Node-Red-Dashboard to make a network monitoring screen for a network of Cisco 5k, Cisco 2K FEX's and 60x Cisco SG250 Switches.

I have managed to make quite a nice little GUI which shows pings to the SG Switches, as well as monitoring certain connected ports on both the 5K and the SG's.

However, I am looking for a way to display the result of the command line 'sh int fex' from the 5k, which returns the connected FEX's and the ports they are connected on.  
I have tried to use SNMP data from the 5k, however, this doesn't work the way I want, because if items connected to the FEX are inactive, there is no In/Out traffic between the 5K and the FEX.

Any help greatly appreciated.

Dan

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [25 January 2021 06:56 UTC](https://discourse.nodered.org/t/return-cli-output-from-a-cisco-5k-switch/39685/2 "2021-01-25T06:56:27Z")

</div>

Dan,

Have you got SSH access to the switch or simply terminal ?

Here is a good discussion from a while ago about this

> [@Run SSH commands from within a flow](https://discourse.nodered.org/t/run-ssh-commands-from-within-a-flow/3453/15):
>
> "NO-body expects that..."

And another approach

> **[Monitor Linux Servers with SSH/command line tools and Node-Red](https://funprojects.blog/2020/04/11/monitor-old-linux-servers/)**
>
> There are a number of technologies and packages available for monitoring computer hardware. For medium to large systems an SNMP (Simple Network Monitoring Protocol) approach is usually the preferre…

Craig

---

<div class="post-metadata">

**Author:** ![mrdanedwards](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@mrdanedwards](https://discourse.nodered.org/u/mrdanedwards)\
**Post date:** [25 January 2021 07:15 UTC](https://discourse.nodered.org/t/return-cli-output-from-a-cisco-5k-switch/39685/3 "2021-01-25T07:15:25Z")

</div>

Hi Craig,

Thanks for the reply - Yes, I do have SSH access to the switches, I use Royal TSX so that I can SSH / Telnet into each switch, and have easy access to all of them from a single location.  
The idea is that I can have the Node-Red service running and anyone else can load up the GUI and see the status of their switches, without having to come and bother me!

Thanks again for the links, I will have a read through and a play around

Dan

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [26 March 2021 07:16 UTC](https://discourse.nodered.org/t/return-cli-output-from-a-cisco-5k-switch/39685/4 "2021-03-26T07:16:17Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
