sftp.3gpp: empty resource label when the PM Group filter doesn't match a given measObjLdn

Description

The OpenNMS is configured to collect XML files using sftp.3gpp protocol. It is collecting the files appropriately every 5 minutes. However, if opennms is stopped and started, it is resuming collection from the current time. It is not picking up from where the collection has been left. Source has all the files.

Example: When OpenNMS is stopped at 11:37 am, the last file collected was at 11:35 am and it is A20140129.1130-0600-1135-0600_testne.xml. OpenNMS is started at 12:13 pm. The next collection starts for the file with 12:15 at time stamp (A20140129.1210-0600-1215-0600_testne.xm). Expectation is that it will collect from the place where it had left.

– collectd-configuration.xml —

— xml-datacollection-config.xml –

Environment

Attached collectd

Acceptance / Success Criteria

None

Attachments

3

Lucidchart Diagrams

Activity

Show:

Alejandro Galue February 19, 2014 at 11:42 AM

Well you have several options:

1) Wait until 1.12.5 is released
2) Install the latest RPM snapshot of 1.12.5-SNAPSHOT from http://yum.opennms.org/testing/common/opennms/
3) Download the source code of OpenNMS from GitHub, checkout the tag for 1.12.1, then cherry pick the solution (3f75b490051484300d32cf359c19763ae23c4006), recompile protocols/xml, then copy protocols/xml/target/org.opennms.protocols.xml-1.12.1.jar

About the upgrade process, the must complicated thing is to do the merge of the configuration files. Sometimes, from one version to another, some files are changed, but if you also changed those files, the RPM upgrade operation is not going to replace the file. Instead, it will create a .rpmnew and you must do the merge manually.

Saurav Chandra February 19, 2014 at 3:54 AM

Thanks. I have 1.12.1 version running. Is there a patch which I can apply to 1.12.1 for this fix ? Or upgrade to 1.12.5 is the only way to get the fix.

If it is to be upgraded, does the following url provide steps to upgrade?
http://www.opennms.org/documentation/installguide.html#upgrading

Alejandro Galue February 18, 2014 at 2:38 PM

Fixed on revision 3f75b490051484300d32cf359c19763ae23c4006 for 1.12.

Alejandro Galue February 18, 2014 at 2:36 PM

I've found the problem on the code, and I'm going to commit a fix for it soon.

I've renamed the issue because the real problem here was the "resource label".

The original question related with this issue was not a bug, was a configuration problem (i.e., you must use Sftp3gppXmlCollectionHandler).

Alejandro Galue February 18, 2014 at 1:46 PM

Let's analyze your 3GPP Data:

According with the 3gpp-pmgroups.properties, the format expected for "dns|dns" is:

Your resources look like this:

So, the format is different, and that's why it is not possible to parse the information.

In your specific 3GPP Format, the PM Group information should be:

If you have the PM Group information for your 3GPP File format, I can make a tool to generate 3gpp-pmgroups.properties and modify the code to use an external file if provided.

BTW, here is how the DNS resources looks on the sample files that I've used to generate the 3GPP Collector:

Of course, not only the 3gpp-pmgroups.properties must be updated. Also the resourceType definitions must be updated as well, because they relies on the custom fields generated based on the PM Groups.

When the PM Groups information doesn't exist or it is not on the correct format, the "label" field is going to be equal to the "instance" field, and the "instance" field will always be equal to measObjLdn. The "label" field is what you're going to see on the WebUI.

So, OpenNMS provides a reasonable defaults when the PM Group information cannot be parsed (which depends on your 3GPP Implementation).

Now, that explains the cases on which you "see" some labels on the WebUI (based on the screenshot you sent). But, there are other cases on which the "label" is blank, I'm going to create a JUnit test for that to see if I can figure it out what is confusing the parser.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Due date

Priority

PagerDuty

Created January 29, 2014 at 8:46 AM
Updated January 27, 2017 at 4:20 PM
Resolved February 18, 2014 at 2:38 PM