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

Added possibility to specify different priorities per status #57

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

passing
Copy link

@passing passing commented May 10, 2019

Pull Request Checklist

Is this in reference to an existing issue?
#36

General

  • [+] Update Changelog following the conventions laid out here

  • [+] Update README with any necessary configuration snippets

  • [-] Binstubs are created if needed

  • [-] RuboCop passes

  • [+] Existing tests pass

@passing
Copy link
Author

passing commented May 16, 2019

@Castaglia could you give me a hint, why checks are failing? I don't see any relation to the PR

@Castaglia
Copy link
Contributor

Both of the failed builds look to have failed during package installation. It doesn't look like I have the TravisCI permissions there to re-run the builds, to see if it's a transient build issue.

@majormoses
Copy link
Member

I have kicked off another build, you can always use the empty commit trick to kick off CI builds if your CI provider supports build/run on commit.

@majormoses
Copy link
Member

I think the issue is that the base image we use is actually based on jessie which is now in the LTS phase and maybe some repositories are no longer accessible or contain the artifacts requested. When I have some time I will try to sit down and figure it out.

@majormoses
Copy link
Member

I will have to look at if its possible for us to inject this early enough without going to newer builds: https://superuser.com/questions/1423486/issue-with-fetching-http-deb-debian-org-debian-dists-jessie-updates-inrelease

@hadret
Copy link

hadret commented Aug 19, 2022

This works like expected except when alert recovers and needs to be updated, it hits this error:

{"timestamp":"2022-08-18T14:41:17.697585+0100","level":"error","message":"handler output","handler":{"type":"pipe","command":"/etc/sensu/handlers/opsgenie.rb","filters":["occurrences"],"name":"opsgenie"},"event":{"id":"e6e207d8-5693-42d4-99ef-0473afb12d92"},"output":["/etc/sensu/handlers/opsgenie.rb:157:in `event_priority': undefined method `upcase' for {\"critical\"=>\"P4\", \"warning\"=>\"P4\", \"unknown\"=>\"P5\"}:Hash (NoMethodError)
    from /etc/sensu/handlers/opsgenie.rb:182:in `post_to_opsgenie'
    from /etc/sensu/handlers/opsgenie.rb:115:in `close_alert'
    from /etc/sensu/handlers/opsgenie.rb:62:in `block in process'
    from /opt/sensu/embedded/lib/ruby/2.4.0/timeout.rb:93:in `block in timeout'
    from /opt/sensu/embedded/lib/ruby/2.4.0/timeout.rb:33:in `block in catch'
    from /opt/sensu/embedded/lib/ruby/2.4.0/timeout.rb:33:in `catch'
    from /opt/sensu/embedded/lib/ruby/2.4.0/timeout.rb:33:in `catch'
    from /opt/sensu/embedded/lib/ruby/2.4.0/timeout.rb:108:in `timeout'
    from /etc/sensu/handlers/opsgenie.rb:57:in `process'
    from /etc/sensu/handlers/opsgenie.rb:43:in `handle'
    from /opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugin-4.0.0/lib/sensu-handler.rb:91:in `block in <class:Handler>'
"]}

I suppose this is because upcase expects string but it receives a hash. When upcase is ditched everything works as expected 👌🏻

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 this pull request may close these issues.

4 participants