Monaco: Creating Host Naming Conditional Rules

Hi,

We’re using Monaco to manage Management zone creation and management.  I was looking to extend this to other parts of our configuration including Host Naming rules.  I can see there a Conditional Naming Rule API to support this, but can not find the relevant schema name to use with in Monaco.  Is this no longer supported or can someone point me in the right direction please?

I’ve attached a schema identifier export of what Monaco appears to check.

Thanks

Martin
response_1760110550170.json (48.3 KB)

You need to use configuration API, not the settings API as those configurations are not possible to set using settings API. This API predates the Settings API.

The best way is to create one configuration manually in your Dynatrace environment, then download the configurations using monaco download command and see how it’s defined.

those naming rules still rely on the older Configuration API and can’t be deployed via the Settings API schemas.

For anyone looking to include this in Monaco, the configuration should be declared in the config.yaml like this example:

configs:
- id: xxxxxx-xxx-xxxx
  config:
    name: Example
    template: example.json
    skip: false
  type:
    settings:
      schema: builtin:management-zones
      schemaVersion: 1.0.12
      scope: environment

This structure works the same way for management zones or any other configuration supported via the Configuration API.
For the Conditional Naming Rules, you’ll just need to switch the schema/type to the corresponding one once you export it using monaco download.

Hi All,

Many thanks, I’ve exported a configuration that included this successfully and now have the schema name. Below is the template for reference as an example :slightly_smiling_face:

{
  "displayName": "{{.name}}",
  "enabled": true,
  "nameFormat": "{Host:DetectedName/([^\\.]*+)}",
  "rules": [
    {
      "comparisonInfo": {
        "caseSensitive": true,
        "negate": false,
        "operator": "CONTAINS",
        "type": "STRING",
        "value": "{{.fqdnDomain}}"
      },
      "key": {
        "attribute": "HOST_DETECTED_NAME",
        "type": "STATIC"
      }
    }
  ],
  "type": "HOST"
}