In store-by-FS mode, nodes with only generic-resource RRD data treated as if they have no RRD data at all
Description
Environment
Acceptance / Success Criteria
Lucidchart Diagrams
Activity
Alejandro Galue January 27, 2014 at 4:18 PM
Fixed on revision 4ce8fc2d5e84f9c0d8a05842a64e274b3b1bc739 for 1.12.
I've verified on my own system that it works as expected.
Some notes about how it currently works:
Use case: a node with only generic index resources (no scalar or node level resources, no response time resources and no interface resources):
1) storeByForeignSource=false
The Resource Graphs page is going to show the generic resources but also it is going to show the "Node-Level Performance Data” even knowing that it is going to be empty.
1) storeByForeignSource=true
The Resource Graphs page is going to show only the generic resources as expected. Nothing else will be displayed.
Alejandro Galue January 27, 2014 at 2:45 PM
The only thing that scares me, and makes me think that something is wrong here is that as soon as I remove the RRDs for node level resources, and all the interfaces resources (to have only generic resources), they are not recreated until I restart OpenNMS, and I was expecting to see the data again within 5 minutes.
Alejandro Galue January 27, 2014 at 2:15 PM
Of course, without removing anything (i.e. have node resources, interface resources and some generic resources) it works fine.
Internally, the DefaultResourceDao is going to use NodeSourceResourceType and that's why it works. Also, I believe that org.opennms.netmgt.dao.support.GenericIndexResourceType is going to silently fails because it won't be able to find the nodes (as internally it is going to use the node's ID), but NodeSourceResourceType should do the proper job for generic resources I think. I haven't verified this yet.
Alejandro Galue January 27, 2014 at 2:10 PM
ChooseResourceController is going to properly build the resource ID no matter if storeByForeignSource is enabled or not, and no matter if you used the node's ID or "foreignSource:foreignId" as the node's identifier.
That information is going to be passed to DefaultChooseResourceService which is going to use DefaultResourceDao to obtain the OnmsResource object for the "node resource", and that entity will contain all the children resources.
My question for you is: what's the use case of having only generic resources without any kind of node level variable ? I'm asking because if you only remove the interfaces, it works
Jeff Gehlbach January 23, 2014 at 8:58 AM
This issue maps to support ticket https://mynms.opennms.com/Ticket/Display.html?id=2732
Details
Assignee
Alejandro GalueAlejandro GalueReporter
Jeff GehlbachJeff GehlbachLabels
Components
Fix versions
Affects versions
Priority
Blocker
Details
Details
Assignee
Reporter
Labels
Components
Fix versions
Affects versions
Priority
PagerDuty
PagerDuty Incident
PagerDuty
PagerDuty Incident
PagerDuty

Steps to reproduce:
0. Configure the system for store-by-foreign-source persisting (org.opennms.rrd.storeByForeignSource=true in opennms.properties)
1. Create a requisitioned node for which data collection will work, and which will have data for at least one generic resource; let data collection commence and verify ability to create resource graphs for these resources. Make a note of the URL for the node's /opennms/graph/chooseresource.htm page.
2. Remove all RRD files from the node's top-level directory and remove all interface directories (which will be named for interfaces and will directly contain RRD files), leaving only the subdirectories for the generic resources (which will directly contain no RRD files but rather a set of subdirectories, each containing RRD files). Mind the clock as the deleted RRDs will be recreated at each collection interval.
3. Reload the chooseresource.htm page
Expected result: Same as in Step 1, except that Node-Level Performance Data and any interface resources are missing from the chooser
Actual result: No chooser renders, just message " No resources are available to graph."