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

Sensu does not set event[:check][:type] = "standard" for standard checks. #1025

Closed
erenfro opened this issue Aug 14, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@erenfro
Copy link

commented Aug 14, 2015

Checks with type "metric" specifically set, always has that returned in the json/hash of the event object, but standard checks, which are the default, unless specifically defined in the client config, do not specifically provide the value for event[:check][:type], and it should be "standard".

This causes issues when trying to handle standard and metric checks, and any other kind of future checks that may eventually be implemented. With the way ruby hash's work, the only viable method I found to determine specifically if a check is standard is with the following code:

      if event[:check].key?(:type)
        check_type = event[:check][:type]
      else
        check_type = "standard"
      end

Which.. Honestly, isn't very good to assume everything is standard.

@portertech

This comment has been minimized.

Copy link
Member

commented Oct 19, 2015

👍 we should set the default to either "standard" or "service" for defined context.

@portertech

This comment has been minimized.

Copy link
Member

commented Oct 19, 2015

This is an excellent question for the next Sensu community survey.

@calebhailey calebhailey added this to the 0.24 milestone Apr 9, 2016

@calebhailey

This comment has been minimized.

Copy link
Member

commented Apr 9, 2016

Tagging this for 0.24.

@calebhailey

This comment has been minimized.

Copy link
Member

commented Apr 9, 2016

Related: #990

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.