Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

icinga2_api (14) Versions 0.3.0

Chef LWRPs to interact with Icinga2 API

Policyfile
Berkshelf
Knife
cookbook 'icinga2_api', '= 0.3.0', :supermarket
cookbook 'icinga2_api', '= 0.3.0'
knife supermarket install icinga2_api
knife supermarket download icinga2_api
README
Dependencies
Changelog
Quality 71%

icinga2_api Cookbook

Cookbook Version
Build Status
License

Created by gh-md-toc

Description

Chef cookbook with LWRPs used to interact with icinga2 API.

Requirements

Cookbooks

Chef

  • Chef 12 or higher

Platforms

  • Debian => 6
  • Ubuntu => 14.04
  • RHEL => 6

Notes: This cookbook has been tested on the listed platforms. It may work on other platforms with or without modification.

Recipes

  • default - installing icinga2 gem for LWRPs.

Usage

The main use case is to create icinga2 objects on the node bootstrap time. Thus you don't need to create any autodiscovery tools that will describe all nodes in icinga2 setup.
Please refer to integration cookbook for examples.

icinga2_api_host

LWRP host creates an icinga Host object.

LWRP Environment Host example

  icinga2_api_host 'host1' do
    attributes address: '127.0.0.1',
               templates: ['check-host-tmpl-30s'],
               display_name: 'host1'
    icinga_api_pass 'mysecret'
  end

LWRP Options

  • name (name_attribute, String) - chef resource name and icinga2 host name.
  • attributes (optional, Hash) - icinga2 host object attributes.
  • icinga_api_host (optional, String) - icinga2 API host, default: 'localhost'.
  • icinga_api_port (optional, Integer) - icinga2 API port, default: 5665.
  • icinga_api_user (optional, String) - icinga2 API username, default: 'admin'.
  • icinga_api_pass (required, String) - icinga2 API password.
  • icinga_api_pki_path (optional, String) - icinga2 API path to pki for cert auth, default: '/etc/icinga2'.
  • icinga_api_node_name (optional, String) - icinga2 API node endpoint.
  • icinga_cluster (optional, Boolean) - icinga2 cluster mode enabled, default: false.
  • icinga_satellite (optional, String) - icinga2 satellite name.
  • action (optional) - options: [:create, :delete], default :create.

icinga2_api_service

LWRP service creates an icinga Service object.

LWRP Environment Service example

  icinga2_api_service 'host1_ping1' do
    host_name 'host1'
    attributes templates: ['check-service-tmpl-30s'],
               display_name: 'PING1',
               check_command: 'hostalive'
    icinga_api_pass 'mysecret'
  end

LWRP Options

  • name (name_attribute, String) - chef resource name and icinga2 service name. Should be unique in icinga2 setup.
  • host_name (required, Hash) - icinga2 host name object attributes.
  • attributes (optional, Hash) - icinga2 service object attributes.
  • icinga_api_host (optional, String) - icinga2 API host, default: 'localhost'.
  • icinga_api_port (optional, Integer) - icinga2 API port, default: 5665.
  • icinga_api_user (optional, String) - icinga2 API username, default: 'admin'.
  • icinga_api_pass (required, String) - icinga2 API password.
  • icinga_api_pki_path (optional, String) - icinga2 API path to pki for cert auth, default: '/etc/icinga2'.
  • icinga_api_node_name (optional, String) - icinga2 API node endpoint.
  • icinga_cluster (optional, Boolean) - icinga2 cluster mode enabled, default: false.
  • icinga_satellite (optional, String) - icinga2 satellite name.
  • action (optional) - options: [:create, :delete], default :create.

License & Authors

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.

Dependent cookbooks

build-essential >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

icinga2_api CHANGELOG

0.3.0 (2018-03-08)

  • Fix API calls
  • Update teskitchen env

0.2.1 (2017-11-21)

  • Fix docs

0.2.0 (2017-11-21)

  • Add icinga2_api_service LWRP
  • Update docs

0.1.5 (2017-11-19)

  • Add TESTING.md
  • Add CONTRIBUTING.md

0.1.4 (2017-11-17)

  • Fix readme

0.1.3 (2017-11-17)

  • Fix rubocop
  • Update email info

0.1.2 (2017-11-17)

  • Fix integration tests
  • Add build-essential dep

0.1.1 (2017-11-16)

  • Update docs

0.1.0 (2017-11-16)

  • Initial release

Collaborator Number Metric
            

0.3.0 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.3.0 passed this metric

Foodcritic Metric
            

0.3.0 failed this metric

FC108: Resource should not define a property named 'name': icinga2_api/resources/host.rb:22
FC108: Resource should not define a property named 'name': icinga2_api/resources/service.rb:22
Run with Foodcritic Version 12.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

0.3.0 passed this metric

No Binaries Metric
            

0.3.0 passed this metric

Testing File Metric
            

0.3.0 passed this metric

Version Tag Metric
            

0.3.0 passed this metric