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

[dev.icinga.com #7559] Execute remote commands on the agent w/o local objects by passing custom attributes #2182

Closed
icinga-migration opened this issue Nov 3, 2014 · 9 comments
Labels
area/distributed Distributed monitoring (master, satellites, clients) blocker Blocks a release or needs immediate attention enhancement New feature or request
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/7559

Created by mfriedrich on 2014-11-03 14:44:34 +00:00

Assignee: gbeutner
Status: Resolved (closed on 2014-11-13 14:00:02 +00:00)
Target Version: 2.2.0
Last Update: 2015-04-17 11:42:44 +00:00 (in Redmine)


Master (using ITL check command)

object Service "disk" {
  import "generic-service"

  check_command = "disk"

  endpoint = "my-remote-client"
}

template Service "agent-service" {
  import "generic-service"
  endpoint = host.name
}

apply Service "disk" {
  import "agent-service"
  check_command = "load"

  vars.disk_crit = 5

  assign where "agent-host" in host.templates
}

On check execution

  • collect all resolvable custom attribute macros
  • pass dictionary to remote cluster endpoint (

Client (same check command)

  • execute local check command with passed dictionary for custom attributes
  • on restart/reload:
    • if the cluster connection is not established, there should be a 10s tolerance time not to generate a cluster unknown timeout state
  • setup
    • through 'node setup', generates zone/endpoint config

Changesets

2014-11-05 12:51:23 +00:00 by (unknown) b6b1f82

Checks: Execute remote commands (WIP)

refs #7559

2014-11-13 10:23:57 +00:00 by gbeutner 3e0d7e3

Checks: Execute remote commands (WIP)

refs #7559

2014-11-13 10:50:06 +00:00 by gbeutner 48bc88c

Checks: Execute remote commands (WIP)

refs #7559

2014-11-13 11:48:47 +00:00 by gbeutner 5f4b839

Checks: Execute remote commands (WIP)

refs #7559

2014-11-13 12:12:25 +00:00 by gbeutner df36635

Checks: Execute remote commands (WIP)

refs #7559

2014-11-13 12:27:19 +00:00 by gbeutner ab530f6

Checks: Execute remote commands (WIP)

refs #7559

2014-11-13 13:29:04 +00:00 by gbeutner 6c61707

Checks: Execute remote commands (WIP)

refs #7559

2014-11-13 13:39:58 +00:00 by gbeutner bcdc900

Checks: Execute remote commands (WIP)

refs #7559

2014-11-13 13:48:48 +00:00 by gbeutner e832d46

Checks: Execute remote commands (WIP)

refs #7559

2014-11-13 13:54:16 +00:00 by gbeutner 10ee4bd

Checks: Execute remote commands (WIP)

refs #7559

2014-11-13 13:54:55 +00:00 by gbeutner 7321e45

Implement support for executing remote commands

fixes #7559

2014-11-13 14:53:15 +00:00 by gbeutner bb04f66

Remove debug code

refs #7559

2014-11-13 19:09:36 +00:00 by (unknown) aad4b48

Drop invalid headers from libhello debug code

refs #7559

Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-11-03 14:47:22 +00:00

  • Estimated Hours set to 8

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-11-03 16:15:01 +00:00

  • Relates set to 7254

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-11-05 12:58:40 +00:00

TODOs

  • ApiListener: accept_commands
  • Cluster Messages for Check/Event/NotificationCommand objects
    • ExecuteCheck -> Send Remote Check if CommandEndpoint is set
    • ProcessCheckresult on Remote Site -> send Checkresult back
  • Timeout

Think about:

  • Notifications -> User objects

Configuration: Local Endpoint/Zone

template Host "agent-host" {
  object Zone name {
    endpoints [ name ]
  }

  object Endpoint name {

  }
}

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-11-06 14:42:46 +00:00

  • Assigned to set to gbeutner

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-11-06 14:45:16 +00:00

  • Priority changed from Normal to High

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-11-11 22:51:26 +00:00

  • Relates set to 5654

@icinga-migration
Copy link
Author

Updated by gbeutner on 2014-11-13 14:00:02 +00:00

  • Status changed from New to Resolved
  • Done % changed from 0 to 100

Applied in changeset 7321e45.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-11-13 19:10:11 +00:00

[ 32%] [ 33%] Generating endpoint.thpp
[ 34%] Generating hello_unity.cpp
Generating zone.thpp
Scanning dependencies of target hello
[ 35%] Generating remote_unity.cpp
Scanning dependencies of target remote
[ 36%] Building CXX object lib/hello/CMakeFiles/hello.dir/hello_unity.cpp.o
[ 37%] Building CXX object lib/remote/CMakeFiles/remote.dir/remote_unity.cpp.o
In file included from /home/michi/coding/icinga/icinga2/release/lib/hello/hello_unity.cpp:1:
In file included from /home/michi/coding/icinga/icinga2/lib/hello/hello.cpp:21:
/home/michi/coding/icinga/icinga2/lib/icinga/host.hpp:24:10: fatal error: 'icinga/host.thpp' file not found
#include "icinga/host.thpp"
         ^
1 error generated.
make[2]: *** [lib/hello/CMakeFiles/hello.dir/hello_unity.cpp.o] Fehler 1
make[1]: *** [lib/hello/CMakeFiles/hello.dir/all] Fehler 2
make[1]: *** Warte auf noch nicht beendete Prozesse...
Linking CXX shared library ../../Bin/RelWithDebInfo/libremote.so
[ 37%] Built target remote
make: *** [all] Fehler 2

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-04-17 11:42:44 +00:00

  • Category changed from 214 to Cluster

@icinga-migration icinga-migration added blocker Blocks a release or needs immediate attention enhancement New feature or request area/distributed Distributed monitoring (master, satellites, clients) labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.2.0 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/distributed Distributed monitoring (master, satellites, clients) blocker Blocks a release or needs immediate attention enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant