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

shinken (17) Versions 2.1.2

Installs/Configures shinken

Policyfile
Berkshelf
Knife
cookbook 'shinken', '= 2.1.2', :supermarket
cookbook 'shinken', '= 2.1.2'
knife supermarket install shinken
knife supermarket download shinken
README
Dependencies
Changelog
Quality 86%

Shinken Logo

shinken-cookbook

Set up the Shinken Monitor Server and its built in Web UI module.

Supported Platforms

Currently only tested on Ubuntu (and almost certainly will not work on RedHat).

Data Bags (Required)

These define the access credentials, email addresses, and phone numbers of the users for your Shinken system. You will need two data bag items, one encrypted and one unencrypted:

Users (this one's unencrypted)

Ideally this data bag is based on the structure from the Chef Users Cookbook, but all that's really required is that you create a data bag called users with one user per item, and the user items should look (at minimum) like this:

{
  "id": "testuser",
  "shinken": {
    "email": "testuser@domain.com",
    "phone": "6175551212",
    "is_admin": "1"
  }
}

…with is_admin being optional.

Credentials

This one can be anywhere you want. It's location is defined by these attributes:

  • node['shinken']['webui']['credentials_data_bag']
  • node['shinken']['webui']['credentials_data_bag_item']

…and its structure should look like this:

{
  "id": "example_credentials_data_bag_item",
  "shinken": {
    "testuser": "PASSWORD"
  }
}

Note that only the shinken key is sourced, so it does not have to be in its own data bag.

Attributes

All attributes live under the node['shinken'] key. Attributes fall into two basic groups, global configuration and resource definitions

Currently only services and hostgroups resources can be defined. Everything else is automatically populated.

Global Configuration

  • user - String - User to run Shinken (and all plugins) as (and own all of its config files).
  • group - String - Group to run Shinken (and all plugins) as.

The following will be parsed into their respective resource definition as such:

['key'] = 'value' becomes key value

…so you can pretty much add any key detailed in the linked configuration and expect it to end up in the config files.

  • global_defaults - Hash - Subkeys to this key will appear in resource definitions for all hosts and services.
  • service_defaults - Hash - Defaults for services (detailed here)
  • host_defaults - Hash - Defaults for hosts (detailed here)

Resource Definitions

  • hostgroups - Hostgroups can either be defined with a search, e.g.:
    json
    {
    "shinken": {
    "hostgroups": {
    "my-hostgroup": {
    "search_str": "recipes:important-recipe\\:\\:default",
    "conf": {
    "alias": "My HostGroup"
    }
    }
    }
    }
    }

    …or they can be defined with an array of server names:

    {
      "shinken": {
        "hostgroups": {
          "my-hostgroup": {
            "members": [
              "server-1",
              "server-2"
            ],
            "conf": {
              "alias": "My HostGroup"
            }
          }
        }
      }
    }
    

    either way, conf defines the other keys in the resource, all of which are detailed in the Shinken docs. hostgroup_name in the above example will automatically be set to "my-hostgroup".

  • services - Defined exactly according to the Shinken docs with little automation, e.g.:
    json
    {
    "shinken": {
    "services": {
    "my-service": {
    "hostgroup_name": "my-hostgroup",
    "service_description": "My Service Check",
    "check_command": "some_check_command",
    "contact_groups": "admins"
    }
    }
    }
    }

    key/value pairs are parsed directly into the resource definition file with defaults (defined above) automatically being merged in.

Usage

shinken::default

Include shinken in a wrapper cookbook (or a node run list):

include_recipe 'shinken::default'
include_recipe 'shinken::webui'
include_recipe 'shinken::broker'

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (i.e. add-new-recipe)
  3. Write your change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request

License and Authors

Author:: EverTrue, Inc. (devops@evertrue.com)

Dependent cookbooks

ark >= 0.0.0
apt >= 0.0.0
python >= 0.0.0
build-essential >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

CHANGELOG

2.0.3

  • Ensure that /var/run/shinken is owned by shinken/shinken

2.0.2

  • Don't use arithmetic operator for memory usage comparison (it doesn't work)

2.0.1

  • Actually install the webui2 module when running in package install mode

2.0.0

  • Upgrade the webui module to v2.4.2c
  • Add copy-button patch to the webui code

1.15.5

  • For Slack notifications: UP also counts as a good state.

1.15.4

  • Notifications: Create a distinction between host ping and other host services
  • Drop misleading word "service" from Slack notification description

1.15.3

  • Another missing space...

1.15.2

  • Add missing space to notify_slack_for_service definition

1.15.1

  • Escape $ in command definition so that Shinken doesn't interpret it

1.15.0

  • Use the same value for command name and command definition file name (if command_name is undefined)
  • Include build-essential cookbook (cassandra-driver gem requires it for building native code)
  • Add new command definitions
    • check_remote_process - Moved from the wrapper cookbook, just checks (using check_by_ssh with pgrep) to see if a process is running on a remote server.
    • check_remote_process_memory - This one's completely new and checks (again using check_by_ssh) to see if ARG1 has a resident memory size ("RSS") greater than ARG2 kilobytes.

1.14.0

  • New plugin: check_elasticsearch

1.13.2

  • Fix the supplied arguments for notify_slack_for_host

1.13.1

  • Add missing quote to Slack notifier message

1.13.0

  • Bump Shinken source install to 2.4.3
  • kitchen yaml: test host_defaults
  • Add notify_slack_for_host command
  • Oops: handler_enabled should be 1 not 0

1.12.6

  • Always enable event_handler if one is specified

1.12.5

  • Set default max_check_attempts to 1

1.12.4

  • Check that test-dns config is merged correctly
  • When merging, override defaults with specifics, not the other way around

1.12.3

  • Inherit generic-service in all services
  • Serverspec: Expect status code 2 from cassandra check

1.12.2

  • check_cassandra: Fail with 2 on connection refused

1.12.1

  • Add missing arguments to slack notifier command
  • Dramatically shorten the default check_interval from 60m to 5m

1.12.0

  • Add a Slack notification event handler
  • Don't fail if node['shinken']['hosts'] not defined

1.11.0

  • Add ability to check an API

1.10.0

  • Add a Pagerduty notification event handler

1.9.0

  • Add plugin: cassandra_check
  • Set an IAM profile so we can test with Fog

1.8.2

  • Don't check fake filesystems for inodes

1.8.1

  • Allow check_inodes_snmp script to take community as a parameter

1.8.0

  • Create a plugin to check for inode counts via snmp
  • Include nagios-snmp-plugins package of plugins
  • Test on real-life ec2

1.7.0

  • Add Mesos CPU/Memory check
  • Run shinken-init before setting up services

1.6.1

  • Attributize _hostgroups search (#4)
  • Clean up Test Kitchen config
  • Consistently use user/group attributes
  • Update ec2dnsserver to bring in bugfix

1.6.0

  • Bump shinken package version to 2.4 and update webui package

1.5.0

  • Move different definition types into their own recipies
  • Update install sources and associated checksums
  • Delete old services and hostgroups

v1.4.0

  • Add RuboCop config (#3)
  • Fix convergence by removing nonexistent user from test-data cookbook (#3)
  • Clean up unused files
  • Clean up README
  • Add Rakefile with test tasks
  • Fix up some Foodcritic violations
  • Fix up some RuboCop violations
  • Add integration testing on Ubuntu 14.04
  • Other misc. fixes to configs

v1.3.0

  • Update source-based install URLs to point to more recent copies of Shinken & its Web UI
  • Add install of cherrypy library as per Shinken’s pip install instruction

v1.2.1

  • Forgot super-important "map" method call

v1.2.0

  • Delete hosts and hostgroups if they no longer exist in the environment
  • Replace references to /etc/shinken with an attribute
  • Switch to rspec3 test syntax

v1.1.2

  • Add attribute for shinken agent user

v1.1.1

  • Add private key install code so that we can use check_by_ssh

v1.1.0

  • Add a "from source" install method and include a way to differentiate between that and "from package"

v1.0.6

  • Fix command name in check_http_content (to make it reflect the file name)

v1.0.5

  • Add command: check_http_content

v1.0.4

  • Attribute-ize host search string

v1.0.3

  • Move definitions to earlier in the process

v1.0.2

  • Add check_http command

v1.0.1

Initial release of shinken

  • Enhancements

    • an enhancement
  • Bug Fixes

    • a bug fix

Collaborator Number Metric
            

2.1.2 passed this metric

Collaborator Number Metric
            

2.1.2 passed this metric

Collaborator Number Metric
            

2.1.2 passed this metric

Collaborator Number Metric
            

2.1.2 passed this metric

Collaborator Number Metric
            

2.1.2 passed this metric

Foodcritic Metric
            

2.1.2 failed this metric

FC010: Invalid search syntax: /tmp/4ce0478a27fd248aac91d593/shinken/recipes/_hostgroups.rb:43
Run with Foodcritic Version 8.1.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

2.1.2 passed this metric