Configure Main Window Categories
Subscribe

From OpenNMS

Jump to: navigation, search

Main Window Categories

To configure the contents of the "Availability Table" of the main window you have to change two xml files.


MainPageAvailabilityTable.jpg

  • First, take a look at Categories to understand the context of categories, there are different usages within opennms.
  • Second, configure the categories for the main page. Each group of services within the table above has to be defined within a category, see Categories.xml
  • Third step: configure viewsdisplay.xml

Here is the configuration for the view shown above:

<?xml version="1.0"?>

<viewinfo>
        <view>
                <view-name>WebConsoleView</view-name>
                <section>
                        <section-name><![CDATA[Categories]]></section-name>
                        <category><![CDATA[Network Interfaces]]></category>
                        <category><![CDATA[Web Servers]]></category>
                        <category><![CDATA[Email Servers]]></category>
                        <category><![CDATA[DNS and DHCP Servers]]></category>                    
                        <category><![CDATA[Database Servers]]></category>
                        <category><![CDATA[JMX Servers]]></category>
                        <category><![CDATA[Other Servers]]></category>
                </section>

                <section>
                        <section-name><![CDATA[Southeast U.S.]]></section-name>
                        <category><![CDATA[Mobile]]></category>
                        <category><![CDATA[Raleigh]]></category>
                </section>
                <section>
                        <section-name><![CDATA[Southwest U.S.]]></section-name>
                        <category><![CDATA[Dallas]]></category>
                </section>
                <section>
                        <section-name><![CDATA[Northwest U.S.]]></section-name>
                        <category><![CDATA[Seattle]]></category>
                </section>
                <section>
                        <section-name><![CDATA[Fink Servers]]></section-name>
                        <category><![CDATA[Fink Mirror Servers]]></category>
                </section>

                <section>
                        <section-name><![CDATA[Total]]></section-name>
                        <category><![CDATA[Overall Service Availability]]></category>
                </section>            
        </view>
</viewinfo>
  • The section-name gives the headline for the following categories.
  • The category is a reference to the category defined in categories.xml:
<catinfo>
    <header>
        <rev>1.3</rev>
        <created>Wednesday, February 6, 2002 10:10:00 AM EST</created>
        <mstation>checkers</mstation>
    </header>
    <categorygroup>
        <name>WebConsole</name>
        <comment>Service Level Availability by Functional Group</comment>
        <common>
            <rule><![CDATA[IPADDR != '0.0.0.0']]></rule>
        </common>
        <categories>
            <category>
                <label><![CDATA[Overall Service Availability]]></label>
                <comment>This category reflects availability of all services currently being monitored by OpenNMS.</comment>
                <normal>99.99</normal>
                <warning>97</warning>
                <rule><![CDATA[IPADDR != '0.0.0.0']]></rule>
            </category>
            <category>
                <label><![CDATA[Network Interfaces]]></label>
                <comment>This category reflects the ability to 'ping' managed devices and SNMP agents.  'Ping', using the ICMP protocol, tests a devices network connectivity/availability.</comment>
                <normal>99.99</normal>
                <warning>97</warning>
                <service>ICMP</service>
                <service>SNMP</service>
                <rule><![CDATA[(isICMP | isSNMP) & (IPADDR != '0.0.0.0')]]></rule>
            </category>
            <category>
                <label><![CDATA[Email Servers]]></label>
                <comment>This category includes all managed interfaces which are running an Email service, including SMTP, POP3, or IMAP.  This will include MS Exchange servers running these protocols.</comment>
                <normal>99.99</normal>
                <warning>97</warning>
                <service>SMTP</service>
                <service>POP3</service>
                <service>IMAP</service>
                <rule><![CDATA[isSMTP | isPOP3 | isIMAP]]></rule>
            </category>
            <category>
                <label><![CDATA[Web Servers]]></label>
                <comment>This category includes all managed interfaces which are running an HTTP (Web) server on port 80 or other common ports.</comment>
                <normal>99.99</normal>
                <warning>97</warning>
                <service>HTTP</service>
                <service>HTTPS</service>
                <service>HTTP-8000</service>
                <service>HTTP-8080</service>
                <rule><![CDATA[isHTTP | isHTTPS | isHTTP-8000 | isHTTP-8080]]></rule>
            </category>
            <category>
                <label><![CDATA[JMX Servers]]></label>
                <comment>This category includes all managed interfaces which are running JMX servers.</comment>
                <normal>99.99</normal>
                <warning>97</warning>
                <service>JBoss4</service>
                <service>JBoss32</service>
                <service>JVM</service>
                <rule><![CDATA[isJBoss4 | isJBoss32 | isJVM]]></rule>
            </category>
            <category>
                <label><![CDATA[DNS and DHCP Servers]]></label>
                <comment>This category includes all managed interfaces which are running either DNS (name resolution) servers or DHCP servers.</comment>
                <normal>99.99</normal>
                <warning>97</warning>
                <service>DNS</service>
                <service>DHCP</service>
                <rule><![CDATA[isDNS | isDHCP]]></rule>
            </category>
            <category>
                <label><![CDATA[Database Servers]]></label>
                <comment>This category includes all managed interfaces which are currently running PostgreSQL, MySQL, SQLServer, or Oracle database servers.</comment>
                <normal>99.99</normal>
                <warning>97</warning>
                <service>MySQL</service>
                <service>Oracle</service>
                <service>Postgres</service>
                <service>SQLServer</service>
                <rule><![CDATA[isMySQL | isOracle | isPostgres | isSQLServer]]></rule>
            </category>
            <category>
                <label><![CDATA[Other Servers]]></label>
                <comment>This category includes all managed interfaces which are running FTP (file transfer protocol) servers or SSH (secure shell) servers.</comment>
                <normal>99.99</normal>
                <warning>97</warning>
                <service>FTP</service>
                <service>SSH</service>
                <rule><![CDATA[isFTP | isSSH]]></rule>
            </category>
            <category>
                <label><![CDATA[Internet Connectivity]]></label>
                <comment>This category reflects the ability to 'ping' the router at the ISP-end of your Internet connection.</comment>
                <normal>99.99</normal>
                <warning>97</warning>
                <service>ICMP</service>
                <rule><![CDATA[ipaddr == '0.0.0.0']]></rule>
            </category>

            <!-- added for demo.opennms.org -->
            <category>
                <label><![CDATA[Fink Mirror Servers]]></label>
                <comment>This category is the Fink mirror servers.</comment>
                <normal>99.99</normal>
                <warning>97</warning>
                <service>rsync</service>
                <rule><![CDATA[nodeLabel like "%.finkmirrors.net%"]]></rule>
            </category>
            <category>
                <label><![CDATA[RED]]></label>
                <comment>This category reflects the ability to 'ping' RED Devices.</comment>
                <normal>99.99</normal>
                <warning>97</warning>
                <service>ICMP</service>
                <rule><![CDATA[displaycategory like "%RED%"]]></rule>
            </category>
            <category>
                <label><![CDATA[GREEN]]></label>
                <comment>This category reflects the ability to 'ping' GREEN Devices.</comment>
                <normal>99.99</normal>
                <warning>97</warning>
                <service>ICMP</service>
                <rule><![CDATA[displaycategory like "%GREEN%"]]></rule>
            </category>
            <category>
                <label><![CDATA[BLUE]]></label>
                <comment>This category reflects the ability to 'ping' BLUE Devices.</comment>
                <normal>99.99</normal>
                <warning>97</warning>
                <service>ICMP</service>
                <rule><![CDATA[displaycategory like "%BLUE%"]]></rule>
            </category>
            <category>
                <label><![CDATA[Mobile]]></label>
                <comment>This category includes nodes in the Mobile area</comment>
                <normal>99.99</normal>
                <warning>97</warning>
                <service>ICMP</service>
                <rule><![CDATA[categoryName == "MOB" ]]></rule>
            </category>
            <category>
                <label><![CDATA[Raleigh]]></label>
                <comment>This category includes nodes in the Raleigh-Durham area</comment>
                <normal>99.99</normal>
                <warning>97</warning>
                <service>ICMP</service>
                <rule><![CDATA[categoryName == "RDU" ]]></rule>
            </category>
            <category>
                <label><![CDATA[Dallas]]></label>
                <comment>This category includes nodes in the Dallas-Fort Worth area</comment>
                <normal>99.99</normal>
                <warning>97</warning>
                <service>ICMP</service>
                <rule><![CDATA[categoryName == "DFW" ]]></rule>
            </category>
            <category>
                <label><![CDATA[Seattle]]></label>
                <comment>This category includes nodes in the Seattle-Tacoma area</comment>
                <normal>99.99</normal>
                <warning>97</warning>
                <service>ICMP</service>
                <rule><![CDATA[categoryName == "SEA" ]]></rule>
            </category>

        </categories>
    </categorygroup>
</catinfo>


After this is done you have to restart opennms to activate the changes.