OpenNMS: Difference between revisions

From Edgar BV Wiki
Jump to navigation Jump to search
New page: OpenNMS monitors the network for services and uptimes. '''discovery-configuration.xml''' ---- This file specifies which specific IPs or ranges of IPs OpenNMS should watch to see if new ...
 
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
OpenNMS monitors the network for services and uptimes.
OpenNMS monitors the network for services and uptimes.
'''Installation'''
----
Installation is a pain and takes forever. OpenNMS requires memory, memory and more memory. It also requires that postgres and tomcat are running. Read the [http://www.opennms.org/index.php/Debian_4_tomcat5.5_jdk_1.5_install_log Debian 4 installation guide here]
This means if for some reason you can't connect to OpenNMS, first stop all three services, then restart postgres, tomcat and opennms.


'''discovery-configuration.xml'''
'''discovery-configuration.xml'''
Line 32: Line 40:
Then edit viewsdisplay.xml to add the view categories to the webinterface.
Then edit viewsdisplay.xml to add the view categories to the webinterface.


In categories.xml, to match to the own created category "Tripany Zuilen" add the following:
''Example to add a category created using admin -> manage node categories''
In categories.xml, to match to the own created category "Zuilen" add the following:


             <category>
             <category>
                 <label><![CDATA[Tripany OPS Servers]]></label>
                 <label><![CDATA[OPS Servers]]></label>
                 <comment>Tripany Operations Servers</comment>
                 <comment>Operations Servers</comment>
                 <normal>99.99</normal>
                 <normal>99.99</normal>
                 <warning>97</warning>
                 <warning>97</warning>
                 <rule><![CDATA[categoryName=="Tripany OPS"]]></rule>
                 <rule><![CDATA[categoryName=="OPS"]]></rule>
           </category>
           </category>


In viewsdisplay.xml I added a totally new section (which can contain as many categories as you want)
In viewsdisplay.xml I added a totally new section (which can contain as many categories as you want)
                 <section>
                 <section>
                         <section-name><![CDATA[Tripany Console]]></section-name>
                         <section-name><![CDATA[Console]]></section-name>
                         <category><![CDATA[Tripany OPS Servers]]></category>
                         <category><![CDATA[OPS Servers]]></category>
                 </section>
                 </section>


Line 65: Line 74:
http://sourceforge.net/mailarchive/message.php?msg_id=37102227
http://sourceforge.net/mailarchive/message.php?msg_id=37102227
http://sourceforge.net/mailarchive/message.php?msg_id=36854989
http://sourceforge.net/mailarchive/message.php?msg_id=36854989
Troubleshooting:
Most things can be found at the mailing list on the discuss, doc and install things.
http://sourceforge.net/search/?group_id=4141&type_of_search=mlists&ml_name=opennms-discuss&forum_id=40670
http://sourceforge.net/mailarchive/forum.php?forum=opennms-discuss
NB:
OpenNMS only monitors services which are tcp available - so if a host has no services it doesn't appear on the categories list.

Latest revision as of 10:16, 14 November 2016

OpenNMS monitors the network for services and uptimes.

Installation


Installation is a pain and takes forever. OpenNMS requires memory, memory and more memory. It also requires that postgres and tomcat are running. Read the Debian 4 installation guide here This means if for some reason you can't connect to OpenNMS, first stop all three services, then restart postgres, tomcat and opennms.


discovery-configuration.xml


This file specifies which specific IPs or ranges of IPs OpenNMS should watch to see if new machines are discovered on it. If you want to remove a node from OpenNMS it shouldn't be in this file any more as otherwise OpenNMS will re-discover it.


database-schema.xml


This file tells you which variables can be used in making rules. You can use anything defined in the column name.


Connecting to the pgsql database directly


psql -U opennms opennms

gets you into the database. Using /dt you can show all the tables. You can select from tables using normal SQL syntax.


Creating rules for the main display


First edit categories.xml and make sure the rules work by restarting opennms. Then edit viewsdisplay.xml to add the view categories to the webinterface.

Example to add a category created using admin -> manage node categories In categories.xml, to match to the own created category "Zuilen" add the following:

           <category>
               <label><![CDATA[OPS Servers]]></label>
               <comment>Operations Servers</comment>
               <normal>99.99</normal>
               <warning>97</warning>
               <rule><![CDATA[categoryName=="OPS"]]></rule>
          </category>

In viewsdisplay.xml I added a totally new section (which can contain as many categories as you want)

               <section>
                       <section-name><![CDATA[Console]]></section-name>
                       <category><![CDATA[OPS Servers]]></category>
               </section>

NB in categories.xml the categoryName in the <rule> section refers to a field in database-schema.xml. The <label> is arbritary.

The <category> statement in viewsdisplay.xml refers to the <label> in categories.xml.

Because I added the lines in categories.xml to the existing categorygroup, the rule

       <common>
           <rule><![CDATA[ipaddr IPLIKE *.*.*.*]]></rule>
       </common>

(all IP adresses) Allready applies to the <section> added.

After changing viewsdisplay.xml and categories.xml, stop opennms, restart tomcat, then start opennms to update the homepage!

Resources from the mailing list:

http://sourceforge.net/mailarchive/message.php?msg_id=37838863 http://sourceforge.net/mailarchive/message.php?msg_id=37102227 http://sourceforge.net/mailarchive/message.php?msg_id=36854989

Troubleshooting:

Most things can be found at the mailing list on the discuss, doc and install things. http://sourceforge.net/search/?group_id=4141&type_of_search=mlists&ml_name=opennms-discuss&forum_id=40670 http://sourceforge.net/mailarchive/forum.php?forum=opennms-discuss

NB:

OpenNMS only monitors services which are tcp available - so if a host has no services it doesn't appear on the categories list.