Skip to content

Data Type "Dictionary" to allow for nested variables #337

@icinga-migration

Description

@icinga-migration

This issue has been migrated from Redmine: https://dev.icinga.com/issues/12093

Created by lebvanih on 2016-07-04 11:05:38 +00:00

Assignee: (none)
Status: New
Target Version: (none)
Last Update: 2016-08-10 19:27:13 +00:00 (in Redmine)


Hello,

We are currently trying to import our running configuration in Icinga Director (1.1.0). Our configuration rely on dictionaries and "nested variables" in our hosts. These are used in our "apply for" rules.
The issue is, that as from what we saw (I checked on this tracker and in the example), there is at the moment no options to reflect this kind of configuration in Director. The example provided in the documentation of Director only refer to Array.

Our configuration is mostly based on the following example from the official documentation (see [[http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc\#!/icinga2/latest/doc/module/icinga2/chapter/monitoring-basics#using-apply-for-custom-attribute-override\]\]):

vars.interfaces["GigabitEthernet0/2"] = {
     iftraffic_units = "g"
     iftraffic_community = IftrafficSnmpCommunity
     iftraffic_bandwidth = 1
     vlan = "internal"
     qos = "disabled"
  }

We also use this kind of structure:

vars.an_ncpa = {
    token = "secret"
    load = { warning=10, critical=20 }
    cpuload = { warning=80, critical=85 }
    disk["/"] = { disk_warning="15%", disk_critical="10%" }
    disk["/home"] = { disk_warning="15%", disk_critical="10%" }
  }

The structure above was used for three reasons in our configuration:

  1. Easy to ready (for us at least)
  2. No need to prefix all variable
  3. Valid with Apply For.

I tried to workaround with a data field named like this: "an_ncpa.token", but it get renamed to "an_npcatoken" as soon as the configuration is rendered.
Is there any plan to allow dictionary creation in Icinga Director and same question for the "nested variable" (dictionary inside a dictionary for example) ?

If this kind of data structure is not "valid" could you please guide us on what we should use instead?

Attachments


Relations:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions