2006 Nov 14 - Tue
Netdisco Installation and Configuration
Netdisco maintains interface status for Cisco based devices.
Netdisco is a Sourceforge hosted project with a main project page at
http://www.netdisco.org/. The download
link is somewhat out of date. The instructions contained herein pertain to obtaining the most recent version via version
control.
Installation
Download the software and prepare the directories:
cd /usr/src
cvs -d:pserver:anonymous@netdisco.cvs.sourceforge.net:/cvsroot/netdisco login
cvs -z3 -d:pserver:anonymous@netdisco.cvs.sourceforge.net:/cvsroot/netdisco co -P netdisco
cvs -z3 -d:pserver:anonymous@netdisco.cvs.sourceforge.net:/cvsroot/netdisco co -P mibs
mkdir /usr/local/netdisco
mv mibs /usr/local/netdisco
mv netdisco/* /usr/local/netdisco
useradd -d /usr/local/netdisco netdisco
chown -R netdisco.netdisco /usr/local/netdisco
Make changes to config file by 'nano /usr/local/netdisco/netdisco.conf':
domain = .example.com
db_Pg_pw = netdisco
port_info = true
community = public
bulkwalk_off = true
graph_x = 40
graph_y = 30
node_fontsize = 8.0
In the file, /usr/local/netdisco/html/login.html,
change the line 'my $userip = $r->connection->remote_ip;' to 'my $userip = $r->user();'.
Do something similar for:
line 103 login.html
line 96 autohandler
line 24 admin_user.html
line 22 portcontrol.html
In /etc/apache2/sites-enabled/000-default, insert the two lines:
Include /usr/local/netdisco/netdisco_apache.conf
Include /usr/local/netdisco/netdisco_apache_dir.conf
Fix the mason cache directory:
mkdir /usr/local/netdisco/mason
chown -R netdisco.www-data /usr/local/netdisco/mason
chmod -R 775 /usr/local/netdisco/mason
Install through perl:
perl -MCPAN -eshell
install Text::Reform
install IO::Tee
install Bundle::DBI
install Apache::DBI
install Heap
install Graph
install Compress::Zlib
install Net::NBName
Prepare PostgreSQL (should have already been installed with the base OS), create the database, and create the tables:
cd /etc/postgresql/7.4/main
nano pg_hba.conf
host netdisco netdisco 127.0.0.1 255.255.255.255 trust
local netdisco netdisco trust
/etc/init.d/postgresql-7.4 restart
cd /usr/local/netdisco/sql/
./pg --init
# follow prompts
./pg
# \q to exit
Prepare SNMP:
#apt-get install libnet-snmp-perl
apt-get install libsnmp-base
apt-get install libsnmp-perl
perl -MCPAN -eshell
install SNMP::Info
Install GraphViz:
apt-get install graphviz
apt-get install libgraphviz-perl
Ensure the Apache2 trimmings are installed:
apt-get install libhtml-mason-perl
apt-get install libdbi-perl
apt-get install libdbd-pg-perl
#apt-get install apache2-dev
apt-get install apache2-threaded-dev
apt-get install libapache2-mod-apreq2
apt-get install libapache-dbi-perl
apt-get install libmasonx-request-withapachesession-perl
apt-get install libapache2-request-perl
ln -s /etc/apache2/mods-available/apreq.load /etc/apache2/mods-enabled/apreq.load
Use WinSCP to copy c:\windows\fonts\arial.ttf and c:\windows\fonts\lucon.ttf to /usr/local/netdisco.
Update some permissions:
#chgrp netdisco /usr/local/netdisco/*.conf
chown -R netdisco.www-data /usr/local/netdisco
chmod 660 /usr/local/netdisco/*.conf
Import OUI database (get latest from web if you want):
cd /usr/local/netdisco
wget http://standards.ieee.org/regauth/oui/oui.txt
./netdisco -O
Test the configuration by performing some preliminary scanning:
cd /usr/local/netdisco
./netdisco -r center_network_device
./netdisco -m
./netdisco -a
./netdisco -w
./netdisco -g
Add a user in Netdisco (and provide it with port control and admin rights):
/usr/local/netdisco/netdisco -u admin
Restart Apache:
/etc/init.d/apache2 restart
Startup netdisco by browsing to:
http://localhost/netdisco
Make changes to /usr/local/netdisco/netdisco.crontab. If nothing else, at least change center_network_device to
something. Then start cron job:
crontab -u netdisco /usr/local/netdisco/netdisco.crontab
/usr/local/netdisco/bin/netdisco_daemon start
ln -s /usr/local/netdisco/bin/netdisco_daemon /etc/init.d
update-rc.d netdisco_daemon defaults 25
You may need to up date netdisco-topology.txt
Links
A link to a scipt for installing an earlier version, with mrtg insertions.
http://www.isc.cnrs.fr/informatique/public_notice/netdisco-install-english
[/OpenSource/Debian/Monitoring]
permanent link
Check SMTP (email server)
Sometimes you want to check to see if you have access to an email server directly.
A check like this may be necessary on some DSL networks where the ISP will block port 25,
which is the standard port that email servers listen in on, due to issues with SPAM
and rogue servers.
You can do the check from the command line with a program called telnet:
telnet mail.example.com 25
For mail servers with a Barracuda mail server, you may get a response like:
220 mail.example.com ESMTP (19a38e746d4fc812318d47ee6fa159ea)
Here is a sample session:
mail from:sender@example.com
250 2.1.0 sender@example.com... Sender ok
rcpt to:recipient@example.com
250 2.1.5 recipient@example.com... Recipient ok
data
354 Enter mail, end with "." on a line by itself
subject: Test Message
to: recipient@example.com
This is the body of the message.
.
250 2.0.0 kAEK9vHC005225 Message accepted for delivery
quit
221 2.0.0 mail.example.com closing connection
[/Personal/Technology]
permanent link
|