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

Windows Handlers not handled by module #870

Closed
DDSloan96 opened this issue Jan 17, 2018 · 9 comments · Fixed by #874
Closed

Windows Handlers not handled by module #870

DDSloan96 opened this issue Jan 17, 2018 · 9 comments · Fixed by #874
Assignees
Labels

Comments

@DDSloan96
Copy link

Description of problem

  • Attempted to add handler to windows sensu client
  • Handler gets created
  • Try to add a handler to windows

Platform and version information

  • Windows
  • Your version of this module: Latest
@ghoneycutt
Copy link
Collaborator

@DDSloan96 Thank you for letting us know about this issue! Could you please update this issue with example code regarding the handlers so that we can reproduce the problem.

@DDSloan96
Copy link
Author

DDSloan96 commented Jan 17, 2018

sensu::handlers:
    operations:                                                                   
      type: 'pipe'                                                                
      command: "/opt/sensu/embedded/bin/handler-pagerduty.rb"                     
      severities:                                                                 
        - 'critical' 

This is an example of what causes the issue. I have a feeling the issue stems from this code

sensu::handlers:                                                                
  operations:                                                                   
    type: 'pipe'                                                                
    command: "/opt/sensu/embedded/bin/handler-pagerduty.rb"                     
    severities:                                                                 
      - 'critical' 

As it doesn't have handling for windows

@ghoneycutt
Copy link
Collaborator

Do you get any error messages when using this code?

What data do you expect to be in which file?

@DDSloan96
Copy link
Author

DDSloan96 commented Jan 17, 2018

Error: Failed to apply catalog: Parameter path failed on File[/etc/sensu/conf.d/
handlers/operations.json]: File paths must be fully qualified, not '/etc/sensu/c
onf.d/handlers/operations.json' at /etc/puppetlabs/code/environments/ldr/modules
_forge/sensu/manifests/handler.pp:119

This is the error message we get, The expected output should be

{
  "handlers": {
    "operations": {
      "command": "/opt/sensu/embedded/bin/handler-pagerduty.rb",
      "type": "pipe",
      "filters": [

      ],
      "severities": [
        "critical"
      ],
      "handle_flapping": false,
      "handle_silenced": false
    }
  }
} 

@ghoneycutt ghoneycutt changed the title WIndows Handlers not handled by module Windows Handlers not handled by module Jan 18, 2018
@treydock
Copy link
Collaborator

@DDSloan96 Just to clarify, your attempting to apply the previously mentioned Hiera defined resource to a Windows puppet client that is acting as a Sensu server? If my understanding is correct, I would think command would need to be prefixed with C:. I'll also patch sensu::handler to better handle Windows.

@ghoneycutt
Copy link
Collaborator

BTW: We support windows as a client, not as a server. From the code, I believe that @DDSloan96 is using windows as a client.

@DDSloan96
Copy link
Author

We are using it as a client

@treydock
Copy link
Collaborator

I've confirmed the issue inside a vagrant Windows VM. I am working on patches that will make sensu::handler compatible with Windows.

@ghoneycutt
Copy link
Collaborator

Released in v2.53.0

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 a pull request may close this issue.

3 participants