-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify sensu::check to use defined type sensu::write_json instead of native type sensu_check #783
Labels
Comments
|
How about |
I like it. The best I came up with was |
jeffmccune
added a commit
to jeffmccune/sensu-puppet
that referenced
this issue
Jul 27, 2017
…e_json Without this patch arbitrary to-level configuration scope items cannot be managed in a sensu check. This patch addresses the problem by adding a `content` parameter to the sensu::check defined type. This patch changes the defined type to pass a JSON object to sensu::write_json instead of passing each named property to the sensu_check custom type. sensu::write_json is used to ensure all attributes in a configuration file are manageable and arbitrary attributes need only be placed in the `content` hash map, or have a new parameter defined in the `sensu::check` defined type. When adding a new parameter, as long as the parameter and value are passed as a key/value pare to the `sensu_check_content()` function, the attribute and value will be placed in the check configuration scope under checks.mycheck. The same behavior may be achieved by passing the key and value via the `custom` parameter. The ultimate goal of this work is to eliminate the `custom` parameter and eventually refactor all defined types in the Puppet module to use sensu::write_json and this approach.
jeffmccune
added a commit
to jeffmccune/sensu-puppet
that referenced
this issue
Jul 27, 2017
…e_json Without this patch arbitrary to-level configuration scope items cannot be managed in a sensu check. This patch addresses the problem by adding a `content` parameter to the sensu::check defined type. This patch changes the defined type to pass a JSON object to sensu::write_json instead of passing each named property to the sensu_check custom type. sensu::write_json is used to ensure all attributes in a configuration file are manageable and arbitrary attributes need only be placed in the `content` hash map, or have a new parameter defined in the `sensu::check` defined type. When adding a new parameter, as long as the parameter and value are passed as a key/value pare to the `sensu_check_content()` function, the attribute and value will be placed in the check configuration scope under checks.mycheck. The same behavior may be achieved by passing the key and value via the `custom` parameter. The ultimate goal of this work is to eliminate the `custom` parameter and eventually refactor all defined types in the Puppet module to use sensu::write_json and this approach. Resolves sensu#783
jeffmccune
added a commit
to jeffmccune/sensu-puppet
that referenced
this issue
Jul 27, 2017
…e_json Without this patch arbitrary to-level configuration scope items cannot be managed in a sensu check. This patch addresses the problem by adding a `content` parameter to the sensu::check defined type. This patch changes the defined type to pass a JSON object to sensu::write_json instead of passing each named property to the sensu_check custom type. sensu::write_json is used to ensure all attributes in a configuration file are manageable and arbitrary attributes need only be placed in the `content` hash map, or have a new parameter defined in the `sensu::check` defined type. When adding a new parameter, as long as the parameter and value are passed as a key/value pare to the `sensu_check_content()` function, the attribute and value will be placed in the check configuration scope under checks.mycheck. The same behavior may be achieved by passing the key and value via the `custom` parameter. The ultimate goal of this work is to eliminate the `custom` parameter and eventually refactor all defined types in the Puppet module to use sensu::write_json and this approach. Resolves sensu#783
3 tasks
jeffmccune
added a commit
to jeffmccune/sensu-puppet
that referenced
this issue
Jul 28, 2017
…e_json Without this patch arbitrary to-level configuration scope items cannot be managed in a sensu check. This patch addresses the problem by adding a `content` parameter to the sensu::check defined type. This patch changes the defined type to pass a JSON object to sensu::write_json instead of passing each named property to the sensu_check custom type. `sensu::write_json` is used to ensure all attributes in a configuration file are manageable and arbitrary attributes need only be placed in the `content` hash map. The ultimate goal of this work is to eliminate the `custom` parameter and eventually refactor all defined types in the Puppet module to use sensu::write_json and this approach. Resolves sensu#783
jeffmccune
added a commit
to jeffmccune/sensu-puppet
that referenced
this issue
Jul 28, 2017
…e_json Without this patch arbitrary to-level configuration scope items cannot be managed in a sensu check. This patch addresses the problem by adding a `content` parameter to the sensu::check defined type. This patch changes the defined type to pass a JSON object to sensu::write_json instead of passing each named property to the sensu_check custom type. `sensu::write_json` is used to ensure all attributes in a configuration file are manageable and arbitrary attributes need only be placed in the `content` hash map. The ultimate goal of this work is to eliminate the `custom` parameter and eventually refactor all defined types in the Puppet module to use sensu::write_json and this approach. Resolves sensu#783
jeffmccune
added a commit
to jeffmccune/sensu-puppet
that referenced
this issue
Jul 28, 2017
…e_json Without this patch arbitrary to-level configuration scope items cannot be managed in a sensu check. This patch addresses the problem by adding a `content` parameter to the sensu::check defined type. This patch changes the defined type to pass a JSON object to sensu::write_json instead of passing each named property to the sensu_check custom type. `sensu::write_json` is used to ensure all attributes in a configuration file are manageable and arbitrary attributes need only be placed in the `content` hash map. The ultimate goal of this work is to eliminate the `custom` parameter and eventually refactor all defined types in the Puppet module to use sensu::write_json and this approach. Resolves sensu#783
jeffmccune
added a commit
to jeffmccune/sensu-puppet
that referenced
this issue
Jul 28, 2017
…e_json Without this patch arbitrary to-level configuration scope items cannot be managed in a sensu check. This patch addresses the problem by adding a `content` parameter to the sensu::check defined type. This patch changes the defined type to pass a JSON object to sensu::write_json instead of passing each named property to the sensu_check custom type. `sensu::write_json` is used to ensure all attributes in a configuration file are manageable and arbitrary attributes need only be placed in the `content` hash map. The ultimate goal of this work is to eliminate the `custom` parameter and eventually refactor all defined types in the Puppet module to use sensu::write_json and this approach. Resolves sensu#783
jeffmccune
added a commit
to jeffmccune/sensu-puppet
that referenced
this issue
Jul 28, 2017
Without this patch arbitrary to-level configuration scope items cannot be managed in a sensu check. This patch addresses the problem by adding a `content` parameter to the sensu::check defined type. This patch changes the defined type to pass a JSON object to sensu::write_json instead of passing each named property to the sensu_check custom type. `sensu::write_json` is used to ensure all attributes in a configuration file are manageable and arbitrary attributes need only be placed in the `content` hash map. The ultimate goal of this work is to eliminate the `custom` parameter and eventually refactor all defined types in the Puppet module to use sensu::write_json and this approach. Resolves sensu#783
jeffmccune
added a commit
to jeffmccune/sensu-puppet
that referenced
this issue
Jul 28, 2017
Without this patch arbitrary to-level configuration scope items cannot be managed in a sensu check. This patch addresses the problem by adding a `content` parameter to the sensu::check defined type. This patch changes the defined type to pass a JSON object to sensu::write_json instead of passing each named property to the sensu_check custom type. `sensu::write_json` is used to ensure all attributes in a configuration file are manageable and arbitrary attributes need only be placed in the `content` hash map. The ultimate goal of this work is to eliminate the `custom` parameter and eventually refactor all defined types in the Puppet module to use sensu::write_json and this approach. Resolves sensu#783
jeffmccune
added a commit
to jeffmccune/sensu-puppet
that referenced
this issue
Aug 15, 2017
Without this patch arbitrary to-level configuration scope items cannot be managed in a sensu check. This patch addresses the problem by adding a `content` parameter to the sensu::check defined type. This patch changes the defined type to pass a JSON object to sensu::write_json instead of passing each named property to the sensu_check custom type. `sensu::write_json` is used to ensure all attributes in a configuration file are manageable and arbitrary attributes need only be placed in the `content` hash map. The ultimate goal of this work is to eliminate the `custom` parameter and eventually refactor all defined types in the Puppet module to use sensu::write_json and this approach. Resolves sensu#783
ghoneycutt
added a commit
that referenced
this issue
Aug 18, 2017
(#783) Add sensu::check content parameter, use sensu::write_json
|
Released in v2.32.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In an effort to support arbitrary configuration scopes for plugins and extensions as mentioned in #764, the goal of this card is to implement a new parameter to the sensu::check defined type. This parameter needs a reasonable name (
configis too generic and over-loaded). The desired behavior is to have the new parameter merged with all other parameters to produce a single, top-level JSON object written to the filesystem using sensu::write_json.For the purposes of the change, two scopes are considered. All configuration in-scope is nested under
checks.mycheckfor a check namedmycheck. All configuration out-of-scope is outside the nestedchecks.mycheckmap. All out-of-scope configuration is managed by the new parameter, all in-scope configuration is managed by the existing parameters.The new parameter is akin to the existing
customparameter, just at the top level instead of nested inside the check configuration scope.The text was updated successfully, but these errors were encountered: