Config Management
Use the Config Management REST API to manage Meridian configurations. Changes take effect immediately.
GETs (reading data)
| Resource | Description |
|---|---|
/cm/{configName} |
Returns a list of |
/cm/schema/{configName} |
Returns OpenAPI schema (for Swagger UI) in JSON/YAML format. |
/cm/{configName}/{configId} |
Returns configuration in JSON/YAML format. |
/cm/{configName}/{configId}/{path} |
Returns a part of the configuration specified by |
POSTs (adding data)
| Resource | Description |
|---|---|
/cm/{configName}/{configId} |
Add new configuration.
If the same configuration exists, it will return an error. |
/cm/{configName}/{configId}/{path} |
Adds an array element to the configuration part specified by |
PUTs (modifying data)
| Resource | Description |
|---|---|
/cm/{configName}/{configId} |
Update configuration.
If configuration does not exist, it will return error. |
/cm/{configName}/{configId}/{path} |
Updates a part of the configuration specified by |
/cm/{configName}/{configId}/{pathToParent}/{nodeName} |
Updates or inserts a part of the configuration specified by |
Examples
The following example payload multiplies each thread pool size by a factor of 10 and empties the external requisitions list of entries (if any exist):
{
"rescanThreads": 100,
"requistion-dir": "/opt/opennms/etc/imports",
"importThreads": 80,
"scanThreads": 100,
"writeThreads": 80,
"foreign-source-dir": "/opt/opennms/etc/foreign-sources",
"requisition-def": []
}
Do not change the requisition-dir and foreign-source-dir elements unless OpenNMS support tells you to do so.
|
You can also target a single element using a cURL command:
curl -X PUT -u 'admin:admin' https://opennms.example.com/opennms/rest/cm/provisiond/default -H 'Content-type: application/json' --data '{ "rescanThreads": 150 }'
Scheduled requisition imports
Each entry in the requisition-def array may carry a cron-schedule value that tells Provisiond when to pull and import that requisition.
The value is parsed as a Quartz CronTrigger expression, not a standard Unix crontab expression.
-
The expression has six required fields (
seconds minutes hours day-of-month month day-of-week) and an optional seventhyearfield, instead of the five Unixcrontab(5)fields. -
Either
day-of-monthorday-of-weekmust be?— the two cannot both be specific values in the same expression. -
Provisiond’s scheduler does not back-fill missed fires. If Meridian is down when a scheduled import would have run, the run is skipped and the next scheduled run picks up normally.
Example expressions:
0 0 0 * * ? # every day at midnight
0 0/30 * * * ? # every 30 minutes
0 0 2 ? * MON # 02:00 every Monday
See the Quartz CronTrigger tutorial for the full grammar, including the L, W, and # modifiers.
Example cURL command that PUTs a single weekly-scheduled requisition definition:
curl -X PUT -u 'admin:admin' https://opennms.example.com/opennms/rest/cm/provisiond/default -H 'Content-type: application/json' --data '{ "requisition-def": [ { "import-name": "weekly-inventory", "import-url-resource": "requisition://customer1", "cron-schedule": "0 0 2 ? * MON" } ] }'
DELETEs (removing data)
| Resource | Description |
|---|---|
/cm/{configName}/{configId} |
Delete configuration. |
/cm/{configName}/{configId}/{path} |
Deletes a part of the configuration specified by |