-
-
Notifications
You must be signed in to change notification settings - Fork 272
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
Showing
13 changed files
with
429 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# | ||
# Author:: Sander Botman <sbotman@schubergphilis.com> | ||
# Cookbook Name : nagios | ||
# Definition : command | ||
# | ||
# Copyright 2015, Sander Botman | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
define :nagios_command do | ||
params[:action] ||= :create | ||
params[:options] ||= {} | ||
|
||
if nagios_action_create?(params[:action]) | ||
o = Nagios::Command.create(params[:name]) | ||
o.import(params[:options]) | ||
end | ||
|
||
if nagios_action_delete?(params[:action]) | ||
Nagios.instance.delete('command', params[:name]) | ||
end | ||
end |
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,33 @@ | ||
# | ||
# Author:: Sander Botman <sbotman@schubergphilis.com> | ||
# Cookbook Name : nagios | ||
# Definition : contact | ||
# | ||
# Copyright 2015, Sander Botman | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
define :nagios_contact do | ||
params[:action] ||= :create | ||
params[:options] ||= {} | ||
|
||
if nagios_action_create?(params[:action]) | ||
o = Nagios::Contact.create(params[:name]) | ||
o.import(params[:options]) | ||
end | ||
|
||
if nagios_action_delete?(params[:action]) | ||
Nagios.instance.delete('contact', params[:name]) | ||
end | ||
end |
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,33 @@ | ||
# | ||
# Author:: Sander Botman <sbotman@schubergphilis.com> | ||
# Cookbook Name : nagios | ||
# Definition : contactgroup | ||
# | ||
# Copyright 2015, Sander Botman | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
define :nagios_contactgroup do | ||
params[:action] ||= :create | ||
params[:options] ||= {} | ||
|
||
if nagios_action_create?(params[:action]) | ||
o = Nagios::Contactgroup.create(params[:name]) | ||
o.import(params[:options]) | ||
end | ||
|
||
if nagios_action_delete?(params[:action]) | ||
Nagios.instance.delete('contactgroup', params[:name]) | ||
end | ||
end |
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,33 @@ | ||
# | ||
# Author:: Sander Botman <sbotman@schubergphilis.com> | ||
# Cookbook Name : nagios | ||
# Definition : host | ||
# | ||
# Copyright 2015, Sander Botman | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
define :nagios_host do | ||
params[:action] ||= :create | ||
params[:options] ||= {} | ||
|
||
if nagios_action_create?(params[:action]) | ||
o = Nagios::Host.create(params[:name]) | ||
o.import(params[:options]) | ||
end | ||
|
||
if nagios_action_delete?(params[:action]) | ||
Nagios.instance.delete('host', params[:name]) | ||
end | ||
end |
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,33 @@ | ||
# | ||
# Author:: Sander Botman <sbotman@schubergphilis.com> | ||
# Cookbook Name : nagios | ||
# Definition : hostdependency | ||
# | ||
# Copyright 2015, Sander Botman | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
define :nagios_hostdependency do | ||
params[:action] ||= :create | ||
params[:options] ||= {} | ||
|
||
if nagios_action_create?(params[:action]) | ||
o = Nagios::Hostdependency.create(params[:name]) | ||
o.import(params[:options]) | ||
end | ||
|
||
if nagios_action_delete?(params[:action]) | ||
Nagios.instance.delete('hostdependency', params[:name]) | ||
end | ||
end |
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,33 @@ | ||
# | ||
# Author:: Sander Botman <sbotman@schubergphilis.com> | ||
# Cookbook Name : nagios | ||
# Definition : hostescalation | ||
# | ||
# Copyright 2015, Sander Botman | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
define :nagios_hostescalation do | ||
params[:action] ||= :create | ||
params[:options] ||= {} | ||
|
||
if nagios_action_create?(params[:action]) | ||
o = Nagios::Hostescalation.create(params[:name]) | ||
o.import(params[:options]) | ||
end | ||
|
||
if nagios_action_delete?(params[:action]) | ||
Nagios.instance.delete('hostescalation', params[:name]) | ||
end | ||
end |
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,33 @@ | ||
# | ||
# Author:: Sander Botman <sbotman@schubergphilis.com> | ||
# Cookbook Name : nagios | ||
# Definition : hostgroup | ||
# | ||
# Copyright 2015, Sander Botman | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
define :nagios_hostgroup do | ||
params[:action] ||= :create | ||
params[:options] ||= {} | ||
|
||
if nagios_action_create?(params[:action]) | ||
o = Nagios::Hostgroup.create(params[:name]) | ||
o.import(params[:options]) | ||
end | ||
|
||
if nagios_action_delete?(params[:action]) | ||
Nagios.instance.delete('hostgroup', params[:name]) | ||
end | ||
end |
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,33 @@ | ||
# | ||
# Author:: Sander Botman <sbotman@schubergphilis.com> | ||
# Cookbook Name : nagios | ||
# Definition : resource | ||
# | ||
# Copyright 2015, Sander Botman | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
define :nagios_resource do | ||
params[:action] ||= :create | ||
params[:options] ||= {} | ||
|
||
if nagios_action_create?(params[:action]) | ||
o = Nagios::Resource.create(params[:name]) | ||
o.import(params[:options]) | ||
end | ||
|
||
if nagios_action_delete?(params[:action]) | ||
Nagios.instance.delete('resource', params[:name]) | ||
end | ||
end |
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,33 @@ | ||
# | ||
# Author:: Sander Botman <sbotman@schubergphilis.com> | ||
# Cookbook Name : nagios | ||
# Definition : service | ||
# | ||
# Copyright 2015, Sander Botman | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
define :nagios_service do | ||
params[:action] ||= :create | ||
params[:options] ||= {} | ||
|
||
if nagios_action_create?(params[:action]) | ||
o = Nagios::Service.create(params[:name]) | ||
o.import(params[:options]) | ||
end | ||
|
||
if nagios_action_delete?(params[:action]) | ||
Nagios.instance.delete('service', params[:name]) | ||
end | ||
end |
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,33 @@ | ||
# | ||
# Author:: Sander Botman <sbotman@schubergphilis.com> | ||
# Cookbook Name : nagios | ||
# Definition : servicedependency | ||
# | ||
# Copyright 2015, Sander Botman | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
define :nagios_servicedependency do | ||
params[:action] ||= :create | ||
params[:options] ||= {} | ||
|
||
if nagios_action_create?(params[:action]) | ||
o = Nagios::Servicedependency.create(params[:name]) | ||
o.import(params[:options]) | ||
end | ||
|
||
if nagios_action_delete?(params[:action]) | ||
Nagios.instance.delete('servicedependency', params[:name]) | ||
end | ||
end |
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,33 @@ | ||
# | ||
# Author:: Sander Botman <sbotman@schubergphilis.com> | ||
# Cookbook Name : nagios | ||
# Definition : serviceescalation | ||
# | ||
# Copyright 2015, Sander Botman | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
define :nagios_serviceescalation do | ||
params[:action] ||= :create | ||
params[:options] ||= {} | ||
|
||
if nagios_action_create?(params[:action]) | ||
o = Nagios::Serviceescalation.create(params[:name]) | ||
o.import(params[:options]) | ||
end | ||
|
||
if nagios_action_delete?(params[:action]) | ||
Nagios.instance.delete('serviceescalation', params[:name]) | ||
end | ||
end |
Oops, something went wrong.