The WebUI is not showing the resources associated with new resource types added on the fly.

Description

On 1.12, if I add a new data collection group with new metrics and new resource types, OpenNMS starts to collect the new data after executing "touch $OPENNMS_HOME/etc/datacollection-config.xml" (without the quotes), and the WebUI is updated showing the new resources. That way you can see the graphs associated with new resource types without restarting OpenNMS.

On 14.0.0, that has stopped working for some reason and I was able to reproduce it using the following procedure:

1) Brand new OpenNMS 14 installed on a CentOS VM
2) Edit etc/datacollection/cisco.xml and remove some resource types and their metrics (and of course, update the systemDefs)
3) Start OpenNMS and add a Cisco device
4) Check that the resource types are correct with the current cisco.xml
5) After a while, restore the original content (which emulates the addition of new metrics and resource types) and execute "touch etc/datacollection-config.xml".
6) The RRD are created and they are being updated without issues.
7) Go to the WebUI and see the resources

Expected result: the new resources must be shown there.

Current result: there are no changes on the WebUI for the resources associated with new resource types.

Acceptance / Success Criteria

None

Attachments

1
  • 12 Nov 2014, 12:24 PM

Lucidchart Diagrams

Activity

Alejandro Galue November 12, 2014 at 12:49 PM

I refactored the code of the JUnit test to avoid issues with Maven on revision 63c8d1cc5d22abca670f808c35cc12cb4f9b2fcb for develop branch.

Alejandro Galue November 12, 2014 at 12:31 PM

Fixed on revision 721cabc85d57db89622534d763f05168271868de for develop branch.

Alejandro Galue November 12, 2014 at 12:25 PM

With the attached patch, if I add some resource types, and then modify datacollection-config.xml to trigger the reload, ResourceDao will update the resource types cache.

I've added a JUnit test to verify the behavior.

Alejandro Galue November 12, 2014 at 12:23 PM

I was able to fix the problem, but I found that the reload operation happens automatically if the lastModified time and the size of the file has been changed, so executing "touch $OPENNMS_HOME/etc/datacollection-config.xml" is not enough in theory.

Alejandro Galue November 10, 2014 at 3:38 PM

For 1.12, the issue https://opennms.atlassian.net/browse/NMS-6198#icft=NMS-6198 was created (since 1.12.2 it is possible to add resource types on the fly), and the solution was merged into master (before 14 exist).

Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

PagerDuty

Created November 10, 2014 at 3:20 PM
Updated November 12, 2014 at 5:32 PM
Resolved November 12, 2014 at 12:31 PM

Flag notifications