Skip to content

Commit

Permalink
Added standalone property
Browse files Browse the repository at this point in the history
  • Loading branch information
jamtur01 committed Mar 1, 2013
1 parent 65f8734 commit e4041f5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
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

0 comments on commit e4041f5

Please sign in to comment.