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 1.0.2

Chef LWRPs to interact with Icinga2 API

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

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

# Set connection to icinga2 API
icinga2_api = {
    host: '127.0.0.1',
    username: 'admin',
    password: 'mysecret',
    node_name: 'master',
    cluster: true,
    satellite: 'master',
}

icinga2_api_host 'host1' do
  attributes 'address' => '127.0.0.1',
         'templates' => ['check-host-tmpl-30s'],
         'vars' => {
        'myvar' => 'mygroup',
          }
  connection icinga2_api
end

LWRP Options

  • name (name_attribute, String) - chef resource name and icinga2 host name.
  • attributes (optional, Hash) - icinga2 host object attributes.
  • connection (optional, Hash) - icinga2 API connection settings.
  • action (optional) - options: [:create, :delete], default :create.

icinga2_api_service

LWRP service creates an icinga Service object.

LWRP Environment Service example

# Set connection to icinga2 API
icinga2_api = {
    host: '127.0.0.1',
    username: 'admin',
    password: 'mysecret',
    node_name: 'master',
    cluster: true,
    satellite: 'master',
}

icinga2_api_service 'host1_ping1' do
  host_name 'host1'
  attributes 'templates' => ['check-service-tmpl-30s'],
             'display_name' => 'PING1',
             'check_command' => 'hostalive'
  connection icinga2_api
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.
  • connection (optional, Hash) - icinga2 API connection settings.
  • 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

1.0.2 (2018-04-3)

  • Improve removing host object

1.0.1 (2018-03-26)

  • Decrease debuging
  • Support strings/symbols in arguments

1.0.0 (2018-03-23)

  • Switch to the new style custom resource

0.3.1 (2018-03-20)

  • Fix build-essential setup

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
            

1.0.2 failed this metric

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

Contributing File Metric
            

1.0.2 passed this metric

Foodcritic Metric
            

1.0.2 failed this metric

FC117: Do not use kind_of in custom resource properties: icinga2_api/resources/service.rb:23
Run with Foodcritic Version 13.0.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

1.0.2 passed this metric

No Binaries Metric
            

1.0.2 passed this metric

Testing File Metric
            

1.0.2 passed this metric

Version Tag Metric
            

1.0.2 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number