No description
Find a file
2019-02-16 16:38:56 +01:00
defaults feat: first version 2019-02-06 22:07:38 +01:00
handlers feat: first version 2019-02-06 22:07:38 +01:00
library feat: add multiple namespaces for the checks, filters, handlers or assets 2019-02-16 10:00:31 +01:00
meta fix: meta name for ubuntu 2019-02-16 16:38:56 +01:00
module_utils feat: first version 2019-02-06 22:07:38 +01:00
tasks feat: add multiple namespaces for the checks, filters, handlers or assets 2019-02-16 10:00:31 +01:00
test/integration feat: add support of ubuntu 18.04 2019-02-16 10:19:39 +01:00
.gitignore feat: first version 2019-02-06 22:07:38 +01:00
.kitchen.yml feat: add support of ubuntu 16.04 2019-02-16 16:20:44 +01:00
.rubocop.yml feat: first version 2019-02-06 22:07:38 +01:00
.travis.yml feat: add support of ubuntu 18.04 2019-02-16 10:19:39 +01:00
.yamllint feat: first version 2019-02-06 22:07:38 +01:00
CHANGELOG.md feat: add support of ubuntu 16.04 2019-02-16 16:20:44 +01:00
Gemfile feat: first version 2019-02-06 22:07:38 +01:00
Gemfile.lock feat: first version 2019-02-06 22:07:38 +01:00
LICENSE feat: first version 2019-02-06 22:07:38 +01:00
README.md feat: add support of ubuntu 16.04 2019-02-16 16:20:44 +01:00

Ansible role: Sensu

Version Build Status License

Install and configure sensu-go backend and agent

Requirements

  • Ansible >= 2.5
  • OS
    • Debian Stretch
    • Ubuntu 18.04
    • Ubuntu 16.04

Role variables

General

  • sensu_repository_system - system for package repository (default: ansible_distribution)
  • sensu_repository_release - system release for package repository (default: ansible_distribution_release)

Agent

  • sensu_agent - enable sensu agent installation (default: yes)
  • sensu_agent_user - the user for backend authentification (default: agent)
  • sensu_agent_password - the password for backend authentification (default: P@ssw0rd!)
  • sensu_agent_plugins - array with the sensu ruby plugins to intall
  - name: sensu-plugins-http
    version: 4.0.0
  • sensu_agent_subscriptions - array with the subscriptions name
  - debian
  - mailserver
  • sensu_agent_labels - hash with the labels
  region: Europe
  disk:
    critical: 90
    warning: 75
  • sensu_agent_backends - array with the backends url
  - ws://localhost:8081
  • sensu_agent_namespace - the namespace for agent (default: default)
  • sensu_agent_config - hash with the optional configuration (see sensu configuration)

Backend

  • sensu_backend - enable sensu backend installation (default: no)
  • sensu_backend_config - hash with the optional configuration (see sensu configuration)
  • sensu_assets - array with the asset definitions
  - name: http-binary
    namespace:
      - default
    url: http://host.local
    sha512: XXXX
    filters: []
  • sensu_namespaces - array with the namespace definitions
  - name: production
    state: present
  • sensu_checks - array with the check definitions
  - name: load
    namespace:
      - default
    command: /usr/bin/load -w 2 -c 5
    handlers:
      - mailer
    subscriptions:
      - linux
    interval: 120
    options:
      ttl: 300
  • sensu_handlers - array with the handler definitions
  - name: mailer
    namespace:
      - default
    type: pipe
    command: /usr/local/bin/sensu-email-handler -t sensu@host.local
    filters:
      - is_incident
    options:
      timeout: 10
  • sensu_filters - array with the filter definitions
  - name: max_occurences
    namespace:
      - default
    action: allow
    expressions:
    runtime_assets: []
    state: present
  • sensu_users - array with the user definitions
  - name: john
    groups:
      - dev
    password: secret
    state: present
  • sensu_cluster_roles - array with the cluster role definitions
  - name: dev
    rules:
      - verbs:
          - get
          - list
        resources:
          - '*'
    state: present
  • sensu_api_url - url of sensu api (default: http://127.0.0.1:8080)
  • sensu_api_user - user for sensu api (default: admin)
  • sensu_api_password - password for sensu api (default: P@ssw0rd!)

How to use

- hosts: monitoring
  roles:
    - sensu

Development

Test syntax with yamllint

  • install python and python-pip
  • install yamllint pip install yamllint
  • run yamllint .

Test syntax with ansible-lint

  • install python and python-pip
  • install yamllint pip install ansible-lint
  • run ansible-lint .

Tests with docker

  • install docker
  • install ruby
  • install bundler gem install bundler
  • install dependencies bundle install
  • run the tests kitchen test

License

Copyright (c) 2019 Adrien Waksberg

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.