SSH from nagios to Network device switch and routers

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
informatica
Posts: 99
Joined: Thu Jan 28, 2021 9:55 pm

SSH from nagios to Network device switch and routers

Post by informatica »

Hi Team,

do we have any feasibility or default script which help us to login as ssh to network device such as (Cisco/firewall/ switches and routers)
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: SSH from nagios to Network device switch and routers

Post by gsmith »

Hi,

Yes XI has that ability. There is an SSH proxy wixard. Here is some documentation regarding it:
http://192.168.23.82/nagiosxi/config/?x ... wizard.php

An here's an example of the command attempting to SSH to a switch that I don't have my public key on :lol:
Image3.jpg
Thanks
You do not have the required permissions to view the files attached to this post.
informatica
Posts: 99
Joined: Thu Jan 28, 2021 9:55 pm

Re: SSH from nagios to Network device switch and routers

Post by informatica »

Do we have any other way using some other script???
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: SSH from nagios to Network device switch and routers

Post by gsmith »

Hi,

I took a look on Nagios Exchange and came back with 0 hits for SSH, so what I
showed you is all we have.

Do you need anything else?

Thanks
informatica
Posts: 99
Joined: Thu Jan 28, 2021 9:55 pm

Re: SSH from nagios to Network device switch and routers

Post by informatica »

Do we have any another way to establish the ssh connection to network device switch/routers, could you please help ?
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: SSH from nagios to Network device switch and routers

Post by gsmith »

Hi,

Sorry for not understanding but could you please tell me exactly what you are trying to do?

For example - do you want the Nagios XI server to connect to a Cisco switch via SSH? If so, what would the connection be used for?

Are there specific things you want the Nagios XI server to monitor?

Any additional details you can provide would be very helpful.

A colleague showed me this plugin:

Code: Select all

check_cisco_ssh_user_login 1.0

What it does
* Using state of the art non-blocking/async IO (EV and Mojolicious)
* Proper error handling !
* Login via SSH (hostname, username, password)
* Issue command "show users"
* Parse the output and find the user which we use for the connection
* Disconnect properly (no needless log violations in the cisco device)
* Return the correct exit value according to the output or errors (ssh->error)
* Tested with linux, darwin(osx), freebsd and openbsd (Could work with other derivates too !)
Is that something that is closer to what you are looking for?

Thanks
Locked