Skip to content

Commit

Permalink
Merge pull request #37 from phobos182/master
Browse files Browse the repository at this point in the history
Add a boolean flag in checks for Aggregates.
  • Loading branch information
jamtur01 committed Mar 7, 2013
2 parents eae5260 + 8e518be commit eaeb115
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
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 @@ -128,4 +128,12 @@ def standalone
def standalone=(value)
conf['checks'][resource[:realname]]['standalone'] = value
end

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

def aggregate=(value)
conf['checks'][resource[:realname]]['aggregate'] = value
end
end
8 changes: 8 additions & 0 deletions lib/puppet/type/sensu_check_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ def initialize(*args)
defaultto :false
end

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

newvalues(:true, :false)

defaultto :false
end

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

0 comments on commit eaeb115

Please sign in to comment.