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

Added standalone property #29

Merged
merged 1 commit into from
Mar 6, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/puppet/provider/sensu_check_config/json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,12 @@ def high_flap_threshold
def high_flap_threshold=(value)
conf['checks'][resource[:realname]]['high_flap_threshold'] = value
end

def standalone
conf['checks'][resource[:realname]]['standalone']
end

def standalone=(value)
conf['checks'][resource[:realname]]['standalone'] = value
end
end
10 changes: 9 additions & 1 deletion lib/puppet/type/sensu_check_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,19 @@ def initialize(*args)
newproperty(:subscribers, :array_matching => :all) do
desc "Who is subscribed to this check"
end

newproperty(:type) do
desc "What type of check is this"
end

newproperty(:standalone, :boolean => true) do
desc "Whether this is a standalone check"

newvalues(:true, :false)

defaultto :false
end

autorequire(:package) do
['sensu']
end
Expand Down