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

Support custom configurations in enterprise dashboard #1018

Merged
merged 1 commit into from
Dec 17, 2018

Conversation

treydock
Copy link
Collaborator

@treydock treydock commented Nov 24, 2018

Pull Request Checklist

Description

Add enterprise_dashboard_custom parameter to sensu class which required adding custom property to sensu_enterprise_dashboard_config type.

Related Issue

Fixes #842

Motivation and Context

Dashboard config supporting custom key/value pairs will allow Puppet module to support configurations more easily without updates to Puppet code.

How Has This Been Tested?

Vagrant sensu-server-enterprise box.

General

  • Update README.md with any necessary configuration snippets

  • New parameters are documented

  • New parameters have tests

  • Tests pass - bundle exec rake validate lint spec

@treydock
Copy link
Collaborator Author

treydock commented Nov 24, 2018

Did notice adding the enterprise_dashboard_custom to sensu-server-enterprise.pp resulted in "interval": 5 getting removed from dashboard.json. See no mention of interval in docs except example JSON, the key doesn't appear documented.

BEFORE:

{
  "sensu": [

  ],
  "dashboard": {
    "host": "0.0.0.0",
    "port": 3000,
    "interval": 5,
    "refresh": 5
  }
}

AFTER

{
  "sensu": [

  ],
  "dashboard": {
    "host": "0.0.0.0",
    "port": 3000,
    "refresh": 5,
    "usersOptions": {
      "requireSilencingReason": true
    }
  }
}

Log message:

Notice: /Stage[main]/Sensu::Enterprise::Dashboard/Sensu_enterprise_dashboard_config[sensu-server.example.com]/custom: custom changed 'interval => 5' to 'usersOptions => {"requireSilencingReason"=>true}'

@ghoneycutt
Copy link
Collaborator

@ninjasloth22 Does this work for you?

@ghoneycutt ghoneycutt merged commit f9f6ab4 into sensu:master Dec 17, 2018
@treydock treydock deleted the dashboard-custom branch December 17, 2018 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Ability to manage userOptions in dashboard.json
2 participants