Skip to content

Commit e4041f5

Browse files
committed
Added standalone property
1 parent 65f8734 commit e4041f5

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

lib/puppet/provider/sensu_check_config/json.rb

+8
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,12 @@ def high_flap_threshold
120120
def high_flap_threshold=(value)
121121
conf['checks'][resource[:realname]]['high_flap_threshold'] = value
122122
end
123+
124+
def standalone
125+
conf['checks'][resource[:realname]]['standalone']
126+
end
127+
128+
def standalone=(value)
129+
conf['checks'][resource[:realname]]['standalone'] = value
130+
end
123131
end

lib/puppet/type/sensu_check_config.rb

+9-1
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,19 @@ def initialize(*args)
6565
newproperty(:subscribers, :array_matching => :all) do
6666
desc "Who is subscribed to this check"
6767
end
68-
68+
6969
newproperty(:type) do
7070
desc "What type of check is this"
7171
end
7272

73+
newproperty(:standalone, :boolean => true) do
74+
desc "Whether this is a standalone check"
75+
76+
newvalues(:true, :false)
77+
78+
defaultto :false
79+
end
80+
7381
autorequire(:package) do
7482
['sensu']
7583
end

0 commit comments

Comments
 (0)