I previously used Nagios and because of the painful configurations, I found OpenNMS. It does all I need and more, being more easier than Nagios. It uses PostgreSQL and runs on top of Tomcat4. Here is how I installed OpenNMS and it's prereqs. It's rough, but it works. Installing Java and Tomcat -------------- Download SDK and JRE to Local PC. Use SCP to copy them to the server in the /downloads directory mkdir /usr/local/java cp /downloads/j2sdk-1_4_2_09-linux-i586.bin /usr/local/java cp /downloads/j2re-1_4_2_09-linux-i586.bin /usr/local/java cd /usr/local/java chmod +x * ./j2sdk-1_4_2_09-linux-i586.bin ./j2re-1_4_2_09-linux-i586.bin rm -rf *.bin chown -R root:root j2sdk1.4.2_09 chown -R root:root j2re1.4.2_09 ln -s j2sdk1.4.2_09 j2sdk ln -s j2re1.4.2_09 j2jre nano -w /etc/profile if ! echo ${PATH} | grep -q /usr/local/java/j2sdk/bin ; then export PATH=/usr/local/java/j2sdk/bin:${PATH} fi if ! echo ${PATH} | grep -q /usr/local/java/j2re/bin ; then export PATH=/usr/java/local/j2re/bin:${PATH} fi export JAVA_HOME=/usr/local/java/j2sdk export CLASSPATH=.:/usr/local/java/j2sdk/lib/tools.jar:/usr/local/java/j2re/lib/rt. jar exit su - java -version java version "1.4.2_09" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_09-b05) Java HotSpot(TM) Client VM (build 1.4.2_09-b05, mixed mode) cd /downloads groupadd -g 220 tomcat useradd -u 220 -g tomcat -c "Tomcat" -r -d /usr/local/tomcat -s "/sbin/nologin" tomcat wget http://mirrors.isc.org/pub/apache/jakarta/tomcat-4/v4.1.31/bin/jakarta-tomca t-4.1.31.tar.gz cp jakarta-tomcat-4.1.31.tar.gz /usr/local cd /usr/local tar -zxvf jakarta-tomcat-4.1.31.tar.gz rm *.gz chown -R tomcat:tomcat /usr/local/jakarta-tomcat-4.1.31 ln -s jakarta-tomcat-4.1.31 tomcat nano -w /etc/sysconfig/iptables Add port 8080 to ip tables service iptables restart nano -w /etc/profile Add: CATALINA_HOME=/usr/local/tomcat echo $CATALINA_HOME nano -w /etc/rc.d/init.d/tomcat ADD CONTENT: #!/bin/sh # # Startup script for the Jakarta Tomcat Java Servlets and JSP server # # chkconfig: - 85 15 # description: Jakarta Tomcat Java Servlets and JSP server # processname: tomcat # pidfile: /var/run/tomcat.pid # config: # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0# Set Tomcat environment. export JAVA_HOME=/usr/local/java/j2sdk export CLASSPATH=.:/usr/local/java/j2sdk/lib/tools.jar:/usr/local/java/j2re/lib/rt. jar export CATALINA_HOME=/usr/local/tomcat export CATALINA_OPTS="-Dbuild.compiler.emacs=true" export PATH=/usr/local/java/j2sdk/bin:/usr/local/local/j2re/bin:$PATH [ -f /usr/local/tomcat/bin/startup.sh ] || exit 0 [ -f /usr/local/tomcat/bin/shutdown.sh ] || exit 0 export PATH=$PATH:/usr/bin:/usr/local/bin # See how we were called. case "$1" in start) # Start daemon. echo -n "Starting Tomcat: " /usr/local/tomcat/bin/startup.sh RETVAL=$? echo [ $RETVAL = 0 ] && touch /var/lock/subsys/tomcat ;; stop) # Stop daemons. echo -n "Shutting down Tomcat: " /usr/local/tomcat/bin/shutdown.sh RETVAL=$? echo [ $RETVAL = 0 ] && rm -f /var/lock/subsys/tomcat ;; restart) $0 stop $0 start ;; condrestart) [ -e /var/lock/subsys/tomcat ] && $0 restart ;; status) status tomcat ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1 esac exit 0 chown root:root /etc/rc.d/init.d/tomcat chmod 755 /etc/rc.d/init.d/tomcat chkconfig --add tomcat chkconfig tomcat on Go to: http://localhost:8080 Note: It will take about 15 seconds to pull up. -------------- Installing RRDTool yum install rrdtool -------------- Configuring SNMP yum -y install net-snmp-utils cd /etc/snmp mv snmpd.conf snmpd.conf.old nano -w snmpd.conf Add: rocommunity <password> chkconfig snmpd on service snmpd start snmpwalk -v 1 -c <password> localhost system -------------- Configuring Postgresql service postgresql start chkconfig postgresql on nano -w /var/lib/pgsql/data/postgresql.conf add/change: tcpip_socket = true add/change: shared_buffers = 1024 nano -w /var/lib/pgsql/data/pg_hba.conf change (remove comment): host all all 127.0.0.1 255.255.255.255 trust change: local all all trust service postgresql restart -------------- Configuring OpenNMS cd /downloads wget http://easynews.dl.sourceforge.net/sourceforge/opennms/opennms-1.2.4-1_cento s4.i386.rpm wget http://easynews.dl.sourceforge.net/sourceforge/opennms/opennms-docs-1.2.4-1_ centos4.i386.rpm wget http://easynews.dl.sourceforge.net/sourceforge/opennms/opennms-webapp-1.2.4- 1_centos4.i386.rpm rpm -i opennms-1.2.4-1_centos4.i386.rpm --nodeps rpm -i opennms-docs-1.2.4-1_centos4.i386.rpm --nodeps rpm -i opennms-webapp-1.2.4-1_centos4.i386.rpm --nodeps cd /opt/OpenNMS/bin ./runjava -s ./install -disU ./install -y -w $CATALINA_HOME/webapps -W $CATALINA_HOME/server/lib cd /opt/OpenNMS/etc nano -w discovery-configuration.xml Change the begin and end IP address to 127.0.0.1, or service tomcat restart /opt/OpenNMS/bin/opennms.sh start chkconfig opennms on opennms -v status Goto: http://localhost:8080/opennms/ login with admin:admin Change password >On Thu, 2005-09-22 at 12:54, Kennedy Clark wrote: > > >>A bit off topic, but I keep looking for an answer to this question and >>coming up with nothing... so I thought I would go to the gurus. :-) >> >>Can anyone recommend a good package for pinging other devices and >>sending an email/alert when they go down? I'm aware of all kinds of >>more complex things with GUIs and a zillion other bells and whistles >>we aren't looking for, but we just want a simple tool (could be daemon >>or something run from cron) that runs every 1 - 5 minutes and alerts >>us when stuff disappears. Would need some basic logic like only >>sending one email/alert when something goes down (vs sending an email >>every 1-5 minutes until it comes back up). :-) We need to avoid a >>requirement for an X-windows GUI, but a web-GUI would probably be fine >>(a GUI-less command-line thing would probably be best). >> >> > >This probably isn't the best anymore, but I've had it running with >no particular problems for 5 or 6 years - before any of the others >like it were available. It is all-perl, has one server process to >collate the responses and rate-limit the alarms, one network probe >for all the remotely checks, and optional local clients for some >things that can only be tested locally. It is fairly easy to add >custom tests for local applications. > http://spong.sourceforge.net/ > > > _______________________________________________ CentOS mailing list CentOS at centos.org http://lists.centos.org/mailman/listinfo/centos -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3022 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20050922/4859f2a0/attachment-0005.bin>