-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
554abf9
commit f6ceaca
Showing
3 changed files
with
56 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
metadata :name => "nrpe", | ||
:description => "Agent to query NRPE commands via MCollective", | ||
:author => "R.I.Pienaar", | ||
:license => "Apache 2", | ||
:version => "2.2", | ||
:url => "http://projects.puppetlabs.com/projects/mcollective-plugins/wiki", | ||
:timeout => 60 | ||
|
||
|
||
action "runallcommands", :description => "Runs all NRPE commands" do | ||
output :commands, | ||
:description => "Output from the Nagios plugind", | ||
:display_as => "Commands", | ||
:default => "" | ||
end | ||
|
||
action "runcommand", :description => "Run a NRPE command" do | ||
input :command, | ||
:prompt => "Command", | ||
:description => "NRPE command to run", | ||
:type => :string, | ||
:validation => '\A[a-zA-Z0-9_-]+\z', | ||
:optional => false, | ||
:maxlength => 50 | ||
|
||
output :output, | ||
:description => "Output from the Nagios plugin", | ||
:display_as => "Output", | ||
:default => "" | ||
|
||
output :exitcode, | ||
:description => "Exit Code from the Nagios plugin", | ||
:display_as => "Exit Code", | ||
:default => 3 | ||
|
||
output :perfdata, | ||
:description => "Performance Data from the Nagios plugin", | ||
:display_as => "Performance Data", | ||
:default => "" | ||
|
||
output :command, | ||
:description => "Command that was run", | ||
:display_as => "Command", | ||
:default => "" | ||
|
||
if respond_to?(:summarize) | ||
summarize do | ||
aggregate nagios_states(:exitcode) | ||
end | ||
end | ||
end | ||
|