Success in OpenNMS


Today I setup OpenNMS in Debian sarge

/etc/apt/source/list
deb http://debian.opennms.org/ debian/opennms stable

# apt-get install java-common
# apt-get install sun-jdk1.4-installer
# build-sun-jdk14 ./j2sdk-1_4_2_05-linux-i586.bin
# dpkg -i j2sdk-1_4_2_05-linux-i586.deb

java-virtual-machine meta-package
# apt-get install java-virtual-machine

#apt-get install tomcat4 tomcat4-admin tomcat4-webapps

# apt-get install rrdtool
# apt-get install mrtg

/etc/postgresql/postgresql.conf

tcpip_socket = true
shared_buffers = 1024

/etc/postgresql/pg_hba.conf
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
local all all trust
host all all 127.0.0.1 255.255.255.255 trust
host all all ::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff trust

#apt-get install opennms opennms-common opennms-contrib opennms-db opennms-server opennms-webapp

Search for a JRE (suggested)
#cd /usr/share/opennms/bin
#./runjava -s

Run the Installer to Setup the PostgreSQL Database
#cd /usr/share/opennms/
#install -disU

Run the Installer to Setup the Web Application
#cd /usr/share/opennms/
# ./install -w /var/lib/tomcat4/webapps -W /var/lib/tomcat4/server/lib

edit /usr/share/opennms/etc/discovery-configuration.xml

include-range retries=”2″ timeout=”3000″
begin 192.168.0.1 begin
end 192.168.0.254 end

start or restart

# /etc/init.d/postgres start
# /etc/init.d/tomcat4 start
# /etc/init.d/opennms start

http://opennms_installed_pc_ip:8180/opennms/

The initial user name is “admin” and the password is “admin”.
(note: 8180 for debian)
(other Linux http://host:8080/opennms/)

edit capsd-configuration.xml for the service your want to monitor

capsd-configuration.xml
==============
scan=”on”

example:
protocol-plugin protocol=”Postgres” class-name=”org.opennms.netmgt.capsd.TcpPlugin” scan=”on” user-defined=”false”
==============

your can finish here if u do not want to enable snmp & notification.

Enable SNMP in a server that you want to monitor. Then…

edit datacollection-config.xml to enable more monitoring graph in opennms.

datacollection-config.xml
===============
snmp-collection name=”default”
maxVarsPerPdu = “50”
snmpStorageFlag = “all”
rrd step = “300”
===============

edit the snmp-config.xml to track servers with snmp

snmp-config.xml
==========
specific 192.168.25.32 specific
range begin=”192.168.25.1″ end=”192.168.25.254″
==========

edit poller-configuration.xml

poller-configuration.xml
===============
status=”on”

example:
service name=”SMTP” interval=”300000″ user-defined=”false” status=”on”
===============

edit notifd-configuration.xml to enable notification
==============================
status=”on”

example:
notifd-configuration
status=”on”
pages-sent=”SELECT * FROM notifications”
next-notif-id=”SELECT nextval(‘notifynxtid’)”
next-group-id=”SELECT nextval(‘notifygrpid’)”
==============================

edit javamail-configuration.properties for mail notification

javamail-configuration.properties
====================
# Properties are defined but commented out indicating the default values.
# This property defines system sender account.
#
# The default setting is root@[127.0.0.1]
#org.opennms.core.utils.fromAddress=root@localhost

#
# This property defines SMTP Host.
#
org.opennms.core.utils.mailHost=smtp.xyz.net
org.opennms.core.utils.mailer=smtpsend
org.opennms.core.utils.transport=smtp
org.opennms.core.utils.debug=true
#
# This property defines Mail authentication.
# The default setting is false
#org.opennms.core.utils.authenticate=false
#org.opennms.core.utils.authenticateUser=”opennms”
#org.opennms.core.utils.authenticatePassword=”opennms”

# This property controls the use of the JMTA, the
# default is true
#org.opennms.core.utils.useJMTA=true
==========================

set the email address via opennms visual configuration to receive emails.

done 🙂