Page 1 of 1

create new component

Posted: Tue Feb 14, 2012 6:22 am
by leens
Hello

I'm not a programmer and I try to create a new component. For this I use an existing component : traceroute.

What I would like is to show the result of the command "chow ip nat translation" on a cisco router
I blocked here

//check target IP or domain
if ($unix){
$cmdline=escapeshellcmd("traceroute $host");
system($cmdline);
}

because I have to log on the router before launch my command.. I don't know php so I don't know how to do that..

Can someone help me?

Rgds

Re: create new component

Posted: Tue Feb 14, 2012 10:23 am
by mguthrie
How do you normally authenticate into your router? SSH? Web interface? I should probably let you know now that I am a PHP developer, and unless you can pass a username and password from the command-line to run something on the router, what you're wanting to achieve is going to be difficult.

Is this data available from an SNMP check?

Re: create new component

Posted: Tue Feb 14, 2012 10:57 am
by leens
Hi

I authenticate by ssh or telnet with user, password. My goal was to have like traceroute a check at demand with result. Not all time...
Via snmp I don't find yet oid but in that case check will be regularly or we need this at demand of client if a problem is detected... It's why I would like to do this component

Re: create new component

Posted: Tue Feb 14, 2012 3:14 pm
by scottwilkerson
Could you just use the check_by_ssh command ?

http://assets.nagios.com/downloads/nagi ... ng_SSH.pdf

Re: create new component

Posted: Wed Feb 15, 2012 4:56 am
by leens
Hi

I need to connect on a cisco router and I have to authenticate with a password

Re: create new component

Posted: Wed Feb 15, 2012 10:14 am
by scottwilkerson
I don't have direct experience with this plugin, but it looks to do what you want...

http://exchange.nagios.org/directory/Pl ... et/details