CGI help

S

Steve

I need to display a neighbor state from my Cisco routers on our
internal website. What would be the easiest way to do this..

Thanks,
Steve
 
S

Sandman

I need to display a neighbor state from my Cisco routers on our
internal website. What would be the easiest way to do this..

This isn't a very good question, since you seem to be assuming that there are
people here that has done this before and you want them to share how they did
it. While you might get lucky, you'll probably get more answers if you tell us
what you want to do more specifically.

Perl is mostly used to automate things you would normally do by hand, which is
exactly what you want to do here. But in order for us to give you advice on how
to automate the otherwise manual process, you need to detail the manual process.

So, how do you go about to find out the "neighbor state" of a cisco router? Do
you telnet to it? What command do you use when you have telnetted to it? Does
it require a login name and a password? Do want this to happen on an interval
or each time someone visits the web page that is supposed to contain the
information.

For example, if I wanted to display the output of the command "uptime" on my
Mac on my website, which is running Linux, I would probably write a script that
looks something like this:

#!/usr/bin/perl
use strict;
use warnings;

print qx{ssh sandman\@<hostname> uptime};

__END__
Out: 12:32pm up 274 days, 14:08, 0 users, load average: 0.84, 0.93, 0.83

In this particular case, I am using SSH, and authorized keys needs to be used,
so I don't need to supply a password. I believe there is a Net::Telnet CPAN
module for Telnet, which one could use (I don't use telnet on any host, so I
wouldn't know).

Anyway, some advice on how to ask questions and some advice on how to fetch
data from a remote host which might give you a nudge. If not, be sure to ask
your question again, being a little more specific.
 
D

David Efflandt

I need to display a neighbor state from my Cisco routers on our
internal website. What would be the easiest way to do this..

The Net::Telnet module may be useful for gathering that info from the
Cisco (have not even looked if Perl has something for rlogin).

What you do with the info once you get it (parsing) is all
standard Perl stuff. The CGI module has shortcuts for html output.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top