ExportD OpenNMS Enquiry

Dear all

I am trying to create requisitions when an organization is made within DataGerry.

However, for some reason i am not able to do it.
Has anyone of you made this work?

Thanks you
Best Regards
Konstantinos Betsis

Hi @kbetsis,

yes we use that in production in a few of our customer setups. I think (hope:-) ) the knowledge base article about that topic is a good starting point. In short, you need to create an Export Job for OpenNMS. Do you get an error message?

Hi @mbatz

The OpenNMS ExportD creates a device under an already defined requisition.
I am trying to do the fist step, define the requisition when a specific type of object is created.

So i was trying the RestApproach and could not see how to do the mapping of the respective type variables.

Should i try with the OpenNMS ExportD and only input the “requisition” part?

Which way is the correct way of doing it?

The API call i am trying to do is:

curl --location --request POST 'http://OPENNMS_URI:8980/opennms/rest/requisitions/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "foreign-source": "REQUISITION NAME",
    "node": []

And the “REQUISITION NAME” should be taken dynamically from objects “Organisations” with the variable “name”

Hi @kbetsis,

the DATAGERRY exporter also creates the OpenNMS requisition if it does not exist. The requisition name needs to be configured in the Destination part of the export job in DATAGERRY:

In the screenshot above, you see the requisition name “cmdb”. This field is not dynamic, so every CMDB object that is defined in the source tab of the export job will be added to the requisition name “cmdb”. If you need to fill multiple OpenNMS requisitions, just create an export job for every requisition.

Hi @mbatz

Unfortunately, this will not do since we need to have a dynamic environment.

This is why I am looking at the Rest approach.

When an organization is created, then create a requisition.
When a device is lined to an organization, then put it under the organization requisition.

Thank you
Best Regards
Konstantinos Betsis

Can I simulate the REST API call to OpenNMS through the DataGerry RestAPI exportd?

curl --location --request POST ‘http://OPENNMS_URI:8980/opennms/rest/requisitions/’
–header ‘Content-Type: application/json’
–data-raw ‘{
“foreign-source”: “REQUISITION NAME”,
“node”: []

Where “REQUISITION NAME” is taken from a field of a specific type.

Hi @kbetsis,

well, the OpenNMS Exporter has a fixed requisition field per export job. Maybe, you can use surveillance categories to tag the nodes within one requisition with an organization name ?

You can also use a few generic exporters to implement your own export logic:

  • ExternalSystemExecuteScript executes a script on the DATAGERRY servicer
  • ExternalSystemGenericRestCall sends an HTTP Post with a predefined JSON structure
  • ExternalSystemGenericPullJson allows an HTTP Get to the DATAGERRY server to get an predefined Json structure

You can find some examples for that in our docs as a starting point.

Hope that helps?

Hi @mbatz

Unfortunately, I don’t think it works as OpenNMS would like to receive the payload.

When DataGerry initiates the REST call it inputs the object id and within the object id it enters the parameters.

The issue we have is that OpenNMS does not want the object id reference, it only want the requisition name.

Second issue is that the variable defined as to dynamically enter the requisition name does not work…
even though i followed the same syntax as the OpenNMS format.

Am I doing something wrong here or is this something that cannot be done out of the box?


Hi @kbetsis,

sorry for my late answer. Well the OpenNMS Exporter in DATAGERRY creates (and also updates) a full requisition with all the included nodes. It will create the requisition and add/updates all the nodes in the requisition. As foreign ID, the DATAGERRY public ID will be set.

The exporter in DATAGERRY will call the following REST endpoints in OpenNMS:

  • /requisitions (to send the new requisition with all the nodes)
  • /requisitions/{name}/import (to synchronize the requisition)

Per export job, one requisition in OpenNMS can be synchronized.