Skip to content
This repository has been archived by the owner. It is now read-only.

[dev.icinga.com #2692] create a howto define a command, translate macros and testdrive plugins manually #319

Closed
icinga-migration opened this issue Jun 16, 2012 · 4 comments

Comments

Projects
None yet
1 participant
@icinga-migration
Copy link
Member

commented Jun 16, 2012

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

Created by mfriedrich on 2012-06-16 21:31:11 +00:00

Assignee: Wolfgang
Status: Resolved (closed on 2012-10-09 16:28:25 +00:00)
Target Version: 1.8
Last Update: 2012-10-09 16:28:25 +00:00 (in Redmine)


currently, the command definition is the first place to start with your command, but you only get some ideas what macros to use, especially the example only shows the $HOSTADDRESS$ macro, but not $USERn$ macros and their special purpose, nor the $ARGn$ macros as argument macros.

so it would be great to add some more examples, plus text, how such commands can be defined, as well as, which is more important - add the translation of $ARGn$ macros back and forward. many people just don't understand how a check_command line passes the arguments seperated by '!' to the actually command, that being interpreted as macros.

this becomes pretty complicated when one uses check_nrpe plus a remote nrpe with dont_blame_nrpe=1 (allowing arguments on the nrpe server passed via check_nrpe -a).
so also in this sector it would be helpful to know how this works.

last but not least, for plugin testing, we are keeping a dedicated wiki page, where some official docs would be helpful as well:

  • tell how you get a full command line from the current command definition and your check_command call
    • how to translate $USERn$ macros and where to find them (resource.cfg)
    • how to translate the $ARGn$ foo into valid order of arguments
    • how $HOST... and $SERVICE... macros work, and that the suffix ...ATTRBIUTE$ means the object configuration attribute (or some stateful result from a previous run)
  • tell how you actually can fetch that via gui too - classic ui, view config, command expander - or via extended info view click on "ACTIVE" if an active check
  • tell how to test such a plugin yourself on the shell, more detailed is on the wiki

https://wiki.icinga.org/display/testing/Icinga+Plugin+Testing

Attachments

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Jun 21, 2012

Updated by Wolfgang on 2012-06-21 20:08:50 +00:00

  • Assigned to set to Wolfgang

Some things are described in "Icinga Plugins", sections "Integrating a new plugin" and "Raw command line".

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Oct 7, 2012

Updated by Wolfgang on 2012-10-07 19:05:17 +00:00

  • Status changed from New to Assigned
  • Target Version set to 1.8
  • Done % changed from 0 to 50

added some lines to "plugins" again
commit aee25fc in next

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Oct 9, 2012

Updated by mfriedrich on 2012-10-09 16:14:36 +00:00

  • File added _icinga_docs_1.8.integrating_new_plugin.png

awesome. thanks.

icinga_docs_1.8._integrating_new_plugin.png

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Oct 9, 2012

Updated by mfriedrich on 2012-10-09 16:28:25 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 50 to 100

@icinga-migration icinga-migration added this to the 1.8 milestone Jan 17, 2017

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