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

Add check_name for checks #19

Merged
merged 3 commits into from
Aug 19, 2019
Merged

Add check_name for checks #19

merged 3 commits into from
Aug 19, 2019

Conversation

treydock
Copy link
Collaborator

Pull Request Checklist

Description

This adds check_name parameter to sensuclassic::check and check_name property to sensuclassic_check.

Related Issue

This is a continuation of #16

Motivation and Context

This allows multiple checks to be defined with same name.

jovrum and others added 3 commits August 15, 2019 13:37
Enables definition of multiple checks with the same name, useful when
checks are organized under proxy clients.
@treydock treydock added the enhancement New feature or request label Aug 17, 2019
@ghoneycutt ghoneycutt merged commit 3f22645 into master Aug 19, 2019
@ghoneycutt
Copy link
Collaborator

Thanks @jovrum and @treydock

@ghoneycutt ghoneycutt deleted the check_name branch August 19, 2019 15:39
@jovrum
Copy link

jovrum commented Sep 2, 2019

I'm actually not sure if this is useful anymore. Using the following command to see check configuration:

sudo -u sensu /opt/sensu/bin/sensu-client -c /etc/sensu/config.json -d /etc/sensu/conf.d --print_config

It looks like scheduled checks must all have unique names on the client, even if they are defined in different files. I suppose this makes sense with the convention that conf.d just merges all the files in the directory together. If you define multiple checks with the same name on the same host, it looks like whichever happens to be defined last is the only one actually scheduled. If that's true, then this parameter might have been a mistake. At the very least, if there is a use case, the parameter documentation must be updated to reflect it.

@treydock treydock mentioned this pull request Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants