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

Implement DummyCheckTask and move dummy into embedded in-memory checks #5744

Merged
merged 2 commits into from Nov 27, 2017

Conversation

dnsmichi
Copy link
Contributor

@dnsmichi dnsmichi commented Nov 9, 2017

This replaces the previous "dummy" CheckCommand, and the user won't
notice it. Provided performance data will be parsed the same way.

This saves a shell fork and check_dummy execution.

We're relying on this when creating cluster checks with Icinga 2 DSL
and more. If one does not have the plugins installed, this then also works.

fixes #5740

This replaces the previous "dummy" CheckCommand, and the user won't
notice it. Provided performance data will be parsed the same way.

This saves a shell fork and check_dummy execution.

We're relying on this when creating cluster checks with Icinga 2 DSL
and more. If one does not have the plugins installed, this then also works.

fixes #5740
@dnsmichi
Copy link
Contributor Author

dnsmichi commented Nov 9, 2017

Tests

object Host "dummy-host" {

  check_command = "dummy"

  vars.dummy_state = {{ Math.random() * 10 }}
  vars.dummy_text = {{
    var state = macro("$dummy_state$")
    if (state > 1) {
      return "Very critical indeed."
    } else {
      return "I don't care."
    }
  }}

  check_interval = 1s
  retry_interval = 1s
}

Via REST API, command is null, and not check_dummy.

screen shot 2017-11-09 at 20 17 09

@dnsmichi dnsmichi added area/checks Check execution and results enhancement New feature or request area/itl Template Library CheckCommands labels Nov 9, 2017
@dnsmichi dnsmichi self-assigned this Nov 13, 2017
@dnsmichi dnsmichi added this to the 2.9.0 milestone Nov 13, 2017
@gunnarbeutner gunnarbeutner merged commit 55b1cce into master Nov 27, 2017
@gunnarbeutner gunnarbeutner deleted the feature/embedded-dummy-check branch November 27, 2017 09:25
@dnsmichi
Copy link
Contributor Author

Oh, and this works in Windows too 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/checks Check execution and results area/itl Template Library CheckCommands enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"dummy" ITL CheckCommand should use in-memory dummy check
2 participants