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

Unable to add ssl and insecure Sensu attributes to API section of dashboard.json #584

Closed
rgeniesse opened this issue Nov 17, 2016 · 2 comments · Fixed by #715
Closed

Unable to add ssl and insecure Sensu attributes to API section of dashboard.json #584

rgeniesse opened this issue Nov 17, 2016 · 2 comments · Fixed by #715
Assignees

Comments

@rgeniesse
Copy link

Description of problem

  • What did you do?
    Attempted to use enterprise dashboard API definition with SSL and insecure Puppet attributes.
  • What happened?
    This error during application of the configuration on my Sensu server:
Error: /Stage[main]/Ao_sensu::Server/Sensu::Enterprise::Dashboard::Api[MyDatacenter]/Sensu_enterprise_dashboard_api_config[MyDatacenter]: Could not evaluate: undefined method `retrieve' for #<Puppet::Type::Sensu_en
terprise_dashboard_api_config::Ssl:0x0000000441e958>

Same error happens for insecure.

  • What did you expect to happen?
    Puppet adding the SSL and insecure Sensu attributes to Sensu's dashboard.json config file:
  "sensu": [
    {
      "name": "MyDatacenter",
      "host": "example.com",
      "port": 4568,
      "ssl": true,
      "insecure": true,
      "user": "secret",
      "pass": "secret",
      "timeout": 5
    }
  ]
  • How can someone reproduce the problem?
    Call the sensu enterprise dashboard api definition like this:
  sensu::enterprise::dashboard::api { 'MyDatacenter':
    host     => 'example.com',
    port     => 4568,
    ssl      => true,
    insecure => true,
    user     => secret,
    pass     => secret,
  }

Then observe the error during an agent run.

Command used and debugging output

  • What does your puppet config look like (including any hiera config)
    See above for reproducing the issue. I do use hiera, but I've simplied it during troubleshooting to just use Puppet for now. Let me know if more code details are needed.
  • Is this a masterless or master based puppet setup?
    Master based.

Platform and version information

  • Your OS: CentOS release 6.8 (Puppet master) and CentOS Linux release 7.2.1511 (Sensu server)
  • Your Ruby version:ruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]
  • Your version of Puppet: PE 4.7.0
  • Your version of Sensu: 26.3 (Sensu Enterprise 1.14.8)
  • Your version of this module: 2.1.0

Anything else to add that you think will be helpful?

Entirely possible I am just not using the module correctly here, but I couldn't find another way to get this config generated and the readme doesn't include examples down this far. I based my code off reading the types screen on Puppet Forge and looking at the manifests.

The code does work as expected with both the ssl and insecure attributes removed from my Puppet code.

@jaxxstorm
Copy link
Contributor

I think @cwjohnston wrote most of the enterprise support stuff, so maybe he can help?

jeffmccune added a commit to jeffmccune/sensu-puppet that referenced this issue Jul 6, 2017
Without this patch it is not possible to manage multiple
sensu::enterprise::dashboard::api resources in the same datacenter
because the resources conflict over the namevar.  This patchset
addresses the problem by changing the namevar to the `host` and
establishing the `datacenter` attribute.

An example of how to exercise this behavior is located in
tests/sensu-enterprise-dashboard-multi-api.pp

resolves sensu#638
closes sensu#651
closes sensu#584
jeffmccune added a commit to jeffmccune/sensu-puppet that referenced this issue Jul 6, 2017
Without this patch it is not possible to manage multiple
sensu::enterprise::dashboard::api resources in the same datacenter
because the resources conflict over the namevar.  This patchset
addresses the problem by changing the namevar to the `host` and
establishing the `datacenter` attribute.

An example of how to exercise this behavior is located in
tests/sensu-enterprise-dashboard-multi-api.pp

resolves sensu#638
closes sensu#651
closes sensu#584
@ghoneycutt
Copy link
Collaborator

Released in v2.14.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

Successfully merging a pull request may close this issue.

5 participants