Skip to content
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

Module does not support the when attribute on filters #658

Closed
cryptk opened this issue Jun 2, 2017 · 1 comment
Closed

Module does not support the when attribute on filters #658

cryptk opened this issue Jun 2, 2017 · 1 comment
Assignees

Comments

@cryptk
Copy link

cryptk commented Jun 2, 2017

The module does not appear to support the "when" attribute of a sensu filter. This functionality is documented at https://sensuapp.org/docs/0.26/reference/filters.html#when-attributes

@ghoneycutt ghoneycutt assigned ghoneycutt and unassigned ghoneycutt Jun 28, 2017
@jeffmccune jeffmccune self-assigned this Jul 7, 2017
jeffmccune added a commit to jeffmccune/sensu-puppet that referenced this issue Jul 7, 2017
Without this patch sensu filters are unable to manage the [when
attribute](https://sensuapp.org/docs/0.26/reference/filters.html#when-attributes)

This patch implements the `when` property on the sensu_filter type and json
provider.  The `sensu::filter` defined type is also updated to support the
`when` parameter.
jeffmccune added a commit to jeffmccune/sensu-puppet that referenced this issue Jul 7, 2017
Without this patch sensu filters are unable to manage the [when
attribute](https://sensuapp.org/docs/0.26/reference/filters.html#when-attributes)

This patch implements the `when` property on the sensu_filter type and json
provider.  The `sensu::filter` defined type is also updated to support the
`when` parameter.

The behavior may be exercised with `vagrant up el7-client`.  This will produce
`/etc/sensu/conf.d/filters/offhours.json` with the content of:

    {
      "filters": {
        "offhours": {
          "attributes": {
            "client": {
              "environment": "production"
            }
          },
          "when": {
            "days": {
              "all": [
                {
                  "begin": "2:00 AM",
                  "end": "1:00 AM"
                }
              ]
            }
          },
          "negate": false
        }
      }
    }
jeffmccune added a commit to jeffmccune/sensu-puppet that referenced this issue Jul 7, 2017
Without this patch sensu filters are unable to manage the [when
attribute](https://sensuapp.org/docs/0.26/reference/filters.html#when-attributes)

This patch implements the `when` property on the sensu_filter type and json
provider.  The `sensu::filter` defined type is also updated to support the
`when` parameter.

The behavior may be exercised with `vagrant up el7-client`.  This will produce
`/etc/sensu/conf.d/filters/offhours.json` with the content of:

    {
      "filters": {
        "offhours": {
          "attributes": {
            "client": {
              "environment": "production"
            }
          },
          "when": {
            "days": {
              "all": [
                {
                  "begin": "2:00 AM",
                  "end": "1:00 AM"
                }
              ]
            }
          },
          "negate": false
        }
      }
    }
jeffmccune added a commit to jeffmccune/sensu-puppet that referenced this issue Jul 7, 2017
Without this patch sensu filters are unable to manage the [when
attribute](https://sensuapp.org/docs/0.26/reference/filters.html#when-attributes)

This patch implements the `when` property on the sensu_filter type and json
provider.  The `sensu::filter` defined type is also updated to support the
`when` parameter.

The behavior may be exercised with `vagrant up el7-client`.  This will produce
`/etc/sensu/conf.d/filters/offhours.json` with the content of:

    {
      "filters": {
        "offhours": {
          "attributes": {
            "client": {
              "environment": "production"
            }
          },
          "when": {
            "days": {
              "all": [
                {
                  "begin": "2:00 AM",
                  "end": "1:00 AM"
                }
              ]
            }
          },
          "negate": false
        }
      }
    }

Resolves sensu#658
ghoneycutt added a commit that referenced this issue Jul 8, 2017
…_filters

(#658) Manage the when attribute of sensu filters
@ghoneycutt
Copy link
Collaborator

Released in v2.17.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants