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.