A Quick Post on Being Nice

May 16th, 2013

There was a nice e-mail on the opennms-install list today. The install list is our “newbie” list, as the first hurdle to jump with OpenNMS is to get it installed, and a person had posted a question about a Debian install.

The question was well worded, and while I couldn’t explain the problem the person was having with importing our GPG key to apt, I was able to quickly test a workaround on my desktop and offer it to the list.

Here is the reply we received:

I wanted to thank everyone for helping me with this issue. Obviously, I am new to this and just trying to learn. I asked a question on a different listserv (for a different monitoring software package I was testing) and all I received were snarky responses and little to no help…how discouraging! That definitely was not the case here!!!

I went with Tarus’ instructions and they worked just fine. The rest of the tutorial was spot on for me and no issues. I now have a few nodes scanned and am just loving the interface and how it feels.

I have been involved in open source for a very long time now, and I have to say that his experience with “snarky responses” is all too common. We have always made the best effort to be open and friendly to new users, since they will be the old users of the future.

But I can understand how this happens. No sooner had I read the post then someone else hijacked the thread with a “it don’t work help me plz” question.

(sigh)

I tried not to be snarky when I replied, asking the user to start a new thread by sending a new message to the list. Was it too much to point them to esr’s “How to Ask Questions” document?

I also felt the need to stress that any direct replies to me would be ignored. While this doesn’t happen with most users on the list, usually the ones that need a little more help latch on to the first person to reply and start peppering them with questions to their direct e-mail address.

I never feel right answering those, since our business model is for a large part built on providing commercial support services, so in order to ask me a direct question I want you to have a support contract. Not because I’m greedy, but because I want to be fair to the people who put food on my table.

But the list is different. Since it is shared I feel like I am answering not only the question at hand but almost all future versions of that question.

It’s really hard to balance limited time with virtually unlimited needs, but if someone politely asks a well-formed question on the list, I do my best to answer it.

Who knows, perhaps one day in the future they’ll answer a question of mine.

Managing Complex Configurations with XML ENTITY

May 13th, 2013

While we have made some serious strides toward making the OpenNMS configuration more modular, from my own humble contribution of include files in eventconf.xml, to breaking up datacollection-config.xml and snmp-graph.properties, we still have some way to go to finish it for the rest of the application.

However, you can leverage a shortcut built into the XML standard to help manage files that can get complex. It allows you to import XML from one file to another.

It does have a limitation. Unlike the work we did with datacollection-config, etc., where we combined different parts of a configuration (generic resources, MIB object groups and system definitions) into separate files, this will only work if you can life whole sections out into other files.

One example would be the poller-configuration.xml file where you can remove entire sections. Here’s how you do it.

First, at the top of the file, you have to define the files you want to include:

<!DOCTYPE root [
  <!ENTITY pkg_Network-Connectivity SYSTEM "./etc/poller-configuration.d/pkg_Network-Connectivity.xml" >
  <!ENTITY pkg_StrafePing           SYSTEM "./etc/poller-configuration.d/pkg_strafePing.xml" >
  <!ENTITY pkg_Generic-Management   SYSTEM "./etc/poller-configuration.d/pkg_Generic-Management.xml" >
]>

This will create a reference to the particular files you want to include. Then, to use them, you simply reference them at the proper place in the file:

<poller-configuration threads="900"
                      serviceUnresponsiveEnabled="false"
                      xmlrpc="false"
                      pathOutageEnabled="true">
  <node-outage status="on" pollAllIfNoCriticalServiceDefined="true">
    <critical-service name="ICMP"/>
  </node-outage>

  <!-- Layer 3 network connectivity -->
  &pkg_Network-Connectivity;

   <!-- Layer 3 network diagnostics for jitter and latency -->
  &pkg_StrafePing;

  <!-- Monitor for management agents and remote administration -->
  &pkg_Generic-Management;

Note that the ENTITY definitions come before the start of the “normal” XML for the file, i.e. in front of the initial <poller-configuration> tag.

This can make the management of unwieldy files a little easier.

Again, this only works for code that you can lift out in its entirety. In the case of poller-configuration.xml we still put the <monitor> tags down at the bottom of the main file.

Ubuntu and the Huawei Mobile Broadband E173

May 10th, 2013

I was recently in Sweden where we are doing a large project that I one day hope to tell every one of my three readers about in detail, but for now suffice it to say that they will have lots and lots of bandwidth in the coming months. However, in the apartment where I stay when I am there, there is no broadband network access, so they loaned me a mobile broadband modem.

Since Ubuntu is my distro of choice and the modem, the Hauwei E173, is fairly old, I figured it would just be “plug and play”. Jeff, who also visits the client, uses Fedora and said he had no problems.

However, when I inserted the device, nothing happened, or at least nothing appeared to happen.

I did manage to get it working, somewhat, so I thought I’d share my experience in case it helps someone else.

Now, what is supposed to happen, I believe, is that the device should show up in Network Manager as a Mobile Broadband device. I could never get this to work. During my investigation I found out that when you initially plug in the device it is mounted as a USB hard drive, and a program called “usb_modeswitch” is supposed to change it to a modem. Most of the information I found on the web was on getting that to work, but after a lot of trial and error it appears that it is working – Network Manager is just not picking up the change.

The device appears like this:

Bus 003 Device 002: ID 12d1:1446 Huawei Technologies Co., Ltd. E1552/E1800 (HSPA modem)

and dmesg shows the following output:

[ 4374.333592] usb 3-2: new high-speed USB device number 2 using xhci_hcd
[ 4374.354876] usbserial_generic 3-2:1.0: generic converter detected
[ 4374.355374] usb 3-2: generic converter now attached to ttyUSB0
[ 4374.355636] usbserial_generic 3-2:1.1: generic converter detected
[ 4374.355875] usb 3-2: generic converter now attached to ttyUSB1
[ 4374.362284] Initializing USB Mass Storage driver...
[ 4374.362498] usbcore: registered new interface driver usb-storage
[ 4374.362505] USB Mass Storage support registered.
[ 4375.436354] generic ttyUSB0: generic converter now disconnected from ttyUSB0
[ 4375.436478] usbserial_generic 3-2:1.0: device disconnected

So it looks like the device is attached as a usb-storage device and then disconnected.

How I managed to get it to work, somewhat, was to install the “wvdial” program. First, I created a file called /etc/wvdial.conf:

[Dialer defaults]
Modem = /dev/ttyUSB0

[Dialer telia]
Modem = /dev/ttyUSB0
Baud = 115200
Init2 = AT+CGDCONT=1,"IP","online.telia.se"
Phone = *99#
Username = *
Password = *
New PPPD = yes
Auto DNS = 1

[Dialer pin]
Modem = /dev/ttyUSB0
Baud = 115200
Init1 = AT+CPIN=xxxx

where “xxxx” is replaced with the PIN for the device, and now when I run “wvdial telia” I get the following output:

# wvdial telia
--> WvDial: Internet dialer version 1.61
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: AT+CGDCONT=1,"IP","online.telia.se"
AT+CGDCONT=1,"IP","online.telia.se"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected.  Waiting for prompt.
--> Don't know what to do!  Starting pppd and hoping for the best.
--> Starting pppd at Fri May 10 07:43:25 2013
--> Pid of pppd: 887
--> Using interface ppp0
--> local  IP address 90.x.x.x
--> remote IP address 10.64.64.64
--> primary   DNS address 195.67.199.27
--> secondary DNS address 195.67.199.28

At this point, I can use Thunderbird for mail and Chrome/Firefox to browse the web. To stop the session I just hit ctrl-C in that window:

^CCaught signal 2:  Attempting to exit gracefully...
--> Terminating on signal 15
--> Connect time 42.0 minutes.
--> Disconnecting at Fri May 10 08:25:29 2013

Now certain programs, such as Empathy, that seem to check with Network Manager on whether or not there is a network connection, don’t work. But for the small amount of time I find myself in the apartment and in need of network access, it will do.

Hope this helps, and if anyone has suggestions on what I’ve done wrong with Network Manager, let me know. Note that I am running Ubuntu 12.04 LTS on my laptop – perhaps it works better with later versions.

Review: The HWg-STE Ethernet Thermometer

May 9th, 2013

Soon after my review of the AKCP Sensorprobe, I was contacted by Jan Rehak of the HW Group in the Czech Republic. I was asked if I would review one of their SNMP-based sensor units. I replied “of course” as I thought it was cool that anyone would want to send me an evaluation unit of anything, and I wanted to embark on my new career as super-duper, top-notch web reviewer-guy (are you listening, Telsa Motors?).

A few days later I received an HWg-STE Ethernet SNMP Thermometer, which is their most popular unit.

The HWg-STE supports two sensors, and it comes with one for temperature. The cable is pretty long so it can be placed some distance away from the unit. The unit is very compact, and molded into the case on the top and bottom are places for mounting screws. I installed it on the wall in the server room next to the Sensorprobe2.

One of the things I liked about the description was that it said it supported Linux for installation. Like most units of this type, the main configuration is done through a built-in web server, but a lot of vendors ship a small application to aid in the initial setup. The HWg-STE shipped with a CD that was Windows only (same as the Sensorprobe2) but I was able to find a Linux version on their website.

Unfortunately, I was unable to get it to work under Ubuntu 13.04, which is my current desktop at work. The application launched but failed to find any sensors. I did install the application via the CD on a Windows 8 machine we have in the office and it located the unit with an IP Address of 192.168.1.80. I changed it to match our LAN addressing scheme and then did everything else from my desk using a web browser.

Once on the network, setup was a breeze. The webUI is very clean and easy to navigate. I was able to label the sensor which was also reflected in the data I was able to receive via SNMP.

Both the HWg SNMP MIB and a short OID description document are accessible from the “System” menu of the interface. The HWg-STE does support the ability to send e-mails when a threshold is reached, but I was a little disappointed with the lack of SNMP trap support. Also, like many devices like this, it only supports SNMPv1 – an SNMPv2 GETBULK request will fail. Like the Sensorprobe2 there is no IPv6 support.

It was pretty easy to add the device to OpenNMS for datacollection (and the configuration will be included in version 1.12):

The values returned are close to the values reported by the Sensorprobe2:

I don’t have any way to determine if one is more accurate than the other, but they both seem to be close enough for the accuracy needed to monitor a server room temperature.

Overall, I really liked the size of the HWg-STE and the look of its interface, but the missing SNMP trap support is frustrating. I would also like to see more information in the MIB, such as high and low thresholds, so that those can also be graphed. Proper SNMPv2 support as well as IPv6 support would be nice, but as much as I like IPv6 I am not seeing it as a requirement in the marketplace at the moment.

UPDATE: Jan wrote me back with some clarifications.

Of course we have other devices with SNMP Traps & more detailed MIB. But you know, product segmentation..

Our main product is the Poseidon family
Many more sensors, I/O, etc..

Yes we plan SNMP v3 + IPv6 to new generation Poseidon2.

“Sorry it’s so spread out.”

May 7th, 2013

Today I received an e-mail with seven invoices from one of our contract employees.

“I am now using a new accounting package to generate invoices.
Unfortunately it generates a separate invoice for each project even if the work is performed for a single customer. Each invoice references a different project activity. Hence several invoices attached.”

This struck me as funny for two reasons. First of all it says to me “Sorry, but my time is worth way more than your time, so I’ve decided to use a new accounting package that makes things easier for me although it will make things harder for you.” Not exactly the message you want to send to your customers.

While this isn’t a big deal as I like the guy, I am sure he didn’t think about the message he was sending. How many interactions can you name that are kludgy or cause you extra work and the excuse is “sorry, but the software made me do it”?

The second reason I found this funny is that open source can help solve problems like this. When talking about OpenNMS to potential clients, I often say things like “OpenNMS can be made to fit your business processes – you don’t have to change them to fit the software”.

This is an extremely powerful message, and it is why we refer to OpenNMS as a “management application platform” and not just an application.