Location aware Requisitions from DNS

Description

An OpenNMS provisioning user can configure OpenNMS to create provisioning requisitions from DNS that are associated with a Monitoring Location.

The OpenNMS Provisioning system includes various import handlers that can treat external systems as the canonical system of record for a set of nodes to be monitored. This is an enhancement that allows such configuration to indicate a Monitoring Location. When the requisition is “synchronized”, if the Monitoring Location doesn’t already exist, it will be created with default attributes.

An OpenNMS administrator can then add a location-aware DNS requisition which results in imported nodes having the proper Minion location set.

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Christian Pape May 18, 2021 at 6:21 AM

Merged.

Will Keaney May 17, 2021 at 7:37 PM

Disregard my last comment - turns out I'd need to also patch the minions, which I can't do in this environment.

Will Keaney May 14, 2021 at 11:08 PM

I cherry-picked this patch onto the 27.2.0-1 tag, built the opennms-requisition-dns module, and put the jar into my stage environment.
When loading the requisitions there using the RequisitionUrlHandler with the argument
requisition://dns?host=remoteDnsServer;zone=remoteZone;foreignSource=locationName%20Devices;location=locationName;expression=^anExpressionSelectingNames.*
none of the nodes have their locations set.

Christian Pape May 11, 2021 at 9:36 AM

Allow a new location parameter in DNS requisition Urls. You can specify a single location that will be associated with all nodes by specifying for example something like ?location=Raleigh. Furthermore, by preceding a ~ you can specify a properly encoded regular expression to determine the location based on the host entries. This expression must have exactly on capturing group. For instance you can associate a node to a location given by their subdomain with the expression ^(?:.\.|)(.?)\.example\.com\.$.

Please review:

Christian Pape May 6, 2021 at 11:39 AM

Just checked the provisioning code. It seems that policies run too late in the process. It seems that interface scans run before node policies are applied. So option 1 is the way to go I think.

Fixed

Details

Assignee

Reporter

HB Backlog Status

Internal Priority

High High

Original estimate

Time tracking

No time logged1d 7h remaining

Sprint

Priority

PagerDuty

Created May 5, 2021 at 5:07 PM
Updated August 30, 2021 at 2:11 PM
Resolved May 18, 2021 at 6:21 AM