The configuration FAQ answered the following questions at the time this document was created.
How do I configure OpenNMS to collect performance data via SNMP? How Do I Get OpenNMS to Collect Data from All SNMP Interfaces? How Can I Change the Size of the RRD Files for Data Collection? I Keep Running Out of Memory in Tomcat. How Do I Raise It? How does SNMP Data Collection Work? How to Create Custom Reports in OpenNMS How to Speed Up the capsd Process How to Integrate Snort + OpenNMS What are the possible parameters in events and notifications? What does the event mask mean? What can I use in "filters" and "rules"? How Do I Add Custom Notification Commands? Are There Any Options I Can Use with the Java JDK? How do I use the Alamin SMS Gateway with OpenNMS? How do I purge old events from the database? How Do I Configure OpenNMS/Tomcat to Use SSL? How can I use OpenNMS to send pages? How to add new traps descriptions on OpenNMS with mib2openms Deleting Outages How Do I Delete an Interface? collectd-config - can you have multiple include-range and specific tags How Do I Use mail.pl?
Many of the custom report enhancements list here have already been integrated into current OpenNMS releases.
OpenNMS Custom SNMP graphics HOWTO
The first paragraph of the above email had improper formating for online viewing and is quoted here:
Jason,The custom_view.jsp file includes the "includeNodeQueries" option when building a list of possible graphs. This should include all possible interface and node level queries for your device. I have no problems seeing node level prefab reports as selections on my KSC reports. I can create a page with just CPU utilization graphs for a group of important routers by just picking an interface from each of the desired router and selecting the appropriate prefab graph type. Can you see the node level reports for the interfaces in question in the other SNMP non-KSC performance reporting pages? If not, you may want to verify that this data is being collected for the device in question since this device may fall into a collection category that has no node level stats. If it doesn't, you will have to set up the proper collection OID info in datacollection-config.xml. If you want to create your own custom prefab reports for these OIDs then you can add the graph definition info to s nmp-graph.properties. Hope this helps. Dave
Key SNMP Customized (KSC) Performance Reports and Node Reports HOWTO
Additional Net-SNMP parameters for data collection
Setting up Net-SNMP Performance Reports
Additional Net-SNMP parameters for data collection
Setting up Net-SNMP Performance Reports
Converting Bytes to Bits in RRD Graphs
Modifying the Scale of RRD Graphs
Disbling Collection on Secondary Interfaces
RRD graph line thickness is controlled from the snmp-graph.properties.
The ~/.mailrc for root controls how/bin/mail (the default
mail command) sends its' mail. Check man mail for more information.
Alernative email script that allows FROM:
As per Tarus,
Add a new service to the package in collectd-configuration.xml:
<service name="SNMP-NEW" interval="300000" user-defined="true" status="on"> <parameter key="collection" value="default"/> <parameter key="port" value="[myport]"/> <parameter key="retry" value="3"/> <parameter key="timeout" value="3000"/> </service>
and at the bottom:
<collector service="SNMP-NEW" class-name="org.opennms.netmgt.collectd.SnmpCollector"/>
The point is you can have more than one service in a collector package, just like in a poller package.
This is great if for situations where it is hard to keep eyes
glued to the screen. First the proper sound drivers must be compiled
into the kernel. This is not covered here, however the following
output from dmesg shows the working Soundblaster Live 5.1 hardware
on an ONMS server with a 2.4.21 kernel.
bash#cat /var/log/dmesg | more <verb> .... Creative EMU10K1 PCI Audio Driver, version 0.20, 11:26:04 May 6 2003 emu10k1: EMU10K1 rev 10 model 0x8065 found, IO at 0xece0-0xecff, IRQ 11 ac97_codec: AC97 Audio codec, id: 0x8384:0x7608 (SigmaTel STAC9708) emu10k1: SBLive! 5.1 card detected ....
wavtools package. Wave files require less CPU overhead
when played compared to other more compressed formats.
bash#apt-get install wavtools
sounds directory in /etc/opennms and copy the .wav files
there.
bash#mkdir /etc/opennms/sounds bash#cp linkdown.wav /etc/opennms/sounds
<autoaction>
tag contains the command to play the sound.
<event>
<mask>
<maskelement>
<mename>generic</mename>
<mevalue>2</mevalue>
</maskelement>
</mask>
<uei>uei.opennms.org/generic/traps/SNMP_Link_Down</uei>
<event-label>OpenNMS-defined trap event: SNMP_Link_Down</event-label>
<descr> <p>A linkDown trap signifies that the sending protocol entity recognizes a failure in one of the communication link represented in the agent's configuration. The data passed with the event are 1) The name and value of the ifIndex instance for the affected interface. The name of the interface can be retrieved via an snmpget of .1.3.6.1.2.1.2.2.1.2.INST, where INST is the instance returned with the trap.</p> </descr>
<logmsg dest='logndisplay'>
Agent Interface Down (linkDown Trap) enterprise:%id% (%id%)
</logmsg>
<severity>Minor</severity>
<autoaction>/usr/bin/wavp /etc/opennms/sounds/linkdown.wav >/dev/null 2>1</autoaction>
</event>
Reparenting Present from Steve Moyer
Edit /etc/opennms/magic-users.properties and add the new admin
username to role.admin.users.
Execute the following command with the proper <ip address>:
/usr/share/opennms/bin/send-event.pl uei.opennms.org/internal/discovery/newSuspect -i <ip address>
To execute this command the Getopt::Mixed package must be installed. At the Debian command line enter:
bash#apt-get install libgetopt-mixed-perl
Right now, edit CateegoryUtil.java (check out CVS) and rebuild OpenNMS. This should be an .XML option in future releases. This may be in 1.1.2.
OpenNMS already has configurations to use
qpage. You can see them
in /etc/opennms/notificationCommands.xml.
qpage
bash#apt-get install qpage
/etc/qpage.cf. From the FAQ.
Configuring notifications based on =%parm[#1]% values
Filtering notifications using Parm values and Rules
Supressing a specific trap from a specific host
The link below describes a method developed by Bill Ayres. The
basic scheme is this. On the radius server, use tcpd (tcp wrapper)
to deny a telnet connection from your OpenNMS box on some port. use
the "twist" option to tcpd (see man 5 hosts_options ) to
run a script which tests the radius service, and returns an up or
down banner to the client. The client is the OpenNMS telnet poller,
looking for an "up" banner. If your radius server is not
a unix box, not to worry. You can modify this scheme to run on a
proxy unix system which could eventually be the same system that
runs OpenNMS. It's just a little more work
Monitoring FreeRadious by Bill Ayres
For basic SNMP on almost any Cisco IOS device the following commands will work:
snmp-server community public RO snmp-server ifindex persist snmp-server enable traps snmp-server host 10.1.1.1 public
In this example all traps are enabled with SNMP read-only community
string set to public. The ifindex persist ensures that interface
numbers do not change if hardware is added or removed. Things that
depend on interface numbers (like RRD graphs) can get confused when
they change without this option. The last line is the OpenNMS server.
To add verbose interface labels to the ONMS trap notifications, add the following to the LinkDown notification to extract the varbinds:
Link Down on %parm[#2]% of %snmphost%
On any interface (i.e. one connected to a guest Windows workstation),
specify not to receive the SNMP message with the no snmp trap link-status
directive shown below:
interface FastEthernet0/2 switchport access vlan 200 no ip address no snmp trap link-status spanning-tree portfast
If there are SNMP traps for syslog messages (snmp-server enable
traps syslog) enabled but the repetition of Interface up/down messages
is not wanted, simply add no logging event link-status to the above
interface configuration.
Below is an SNMP configuration that has access-list security on the SNMP port, SNMP views restricting access to interfaces and telnet tty traps enabled. Not all IOS images support all these SNMP options. This was IOS 12.1 on an AS5300.
access-list 10 permit 192.168.66.0 0.0.0.255 access-list 10 deny any snmp-server view nms enterprises included snmp-server view nms ifEntry excluded snmp-server view nms ifEntry.1.1 included snmp-server view nms ifEntry.1.2 included snmp-server view nms ifEntry.2.1 included snmp-server view nms ifEntry.2.2 included snmp-server view nms ifEntry.3.1 included snmp-server view nms ifEntry.3.2 included snmp-server view nms ifEntry.4.1 included snmp-server view nms ifEntry.4.2 included snmp-server view nms ifEntry.5.1 included snmp-server view nms ifEntry.5.2 included snmp-server view nms ifEntry.6.1 included snmp-server view nms ifEntry.6.2 included snmp-server view nms ifEntry.7.1 included snmp-server view nms ifEntry.7.2 included snmp-server view nms ifEntry.10.2 included snmp-server view nms ifEntry.16.1 included snmp-server view nms ifEntry.16.2 included snmp-server community com$tr!ng view nms RO 10 snmp-server enable traps snmp authentication linkdown linkup coldstart warmstart snmp-server enable traps calltracker snmp-server enable traps tty snmp-server enable traps modem-health snmp-server enable traps ds0-busyout snmp-server enable traps ds1-loopback snmp-server enable traps hsrp snmp-server enable traps config snmp-server enable traps entity snmp-server enable traps envmon snmp-server enable traps aaa_server snmp-server enable traps bgp snmp-server enable traps pim neighbor-change rp-mapping-change invalid-pim-message snmp-server enable traps ipmulticast snmp-server enable traps msdp snmp-server enable traps rsvp snmp-server enable traps frame-relay snmp-server enable traps frame-relay subif snmp-server enable traps rtr snmp-server enable traps syslog snmp-server enable traps dlsw snmp-server enable traps pppoe snmp-server enable traps dsp card-status snmp-server enable traps voice poor-qov snmp-server enable traps dnis snmp-server enable traps xgcp snmp-server host 192.168.66.10 com$tr!ng snmp-server host 192.168.66.11 com$tr!ng
SNMP views can be used to limit SNMP polls from trying to download
huge interface tables or BGP routing tables (the latter not shown
here). This router was used as a VOIP gateway and has the no snmp-server
enable traps isdn to prevent a lot of unnecessary messages.
If
there is a lot of telnet activity on a router, and the IOS supports
this feature, use no snmp-server enable traps tty to disable the
telnet traps. ONMS does not poll telnet by default, otherwise Cisco
devices would send one of these to OpenNMS every five minutes. It
is important to note that when a re-discover occurs (default every
24 hours) the telnet port will be polled and this trap will be sent
to ONMS. The <outage calendar> tag is currently not supported
in the trapd-configuration.xml file, so there is no way to block
these re-discovery traps in the current ONMS v1.1.1. Use the logmsg
dest=suppress in the eventconf.xml file to not display these traps
in the event window.
There is a known bug in one of the older IOS
versions that allows the SNMP engine to retain an IP address after
it has been changed on an interface. The work around is to reload
the Cisco device. None of the show commands reveal the IP address
the SNMP engine accidently retains.
Notes on varbinds with Extreme and Cisco devices
Error detecting SNMP on Netscreen devices
Script based poller by Bill Ayers