From 27f07c7a30f643bca2193a35d5b0ed4be5f0f6dd Mon Sep 17 00:00:00 2001 From: Adrien Waksberg Date: Fri, 22 Feb 2019 18:02:59 +0100 Subject: [PATCH] doc: add example in readme --- CHANGELOG.md | 1 + README.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45f2067..5e5c272 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). Which is based on [Keep A Changelog](http://keepachangelog.com/) ## [Unreleased] +- doc: add example in readme ## [1.1.0] - 2019-02-17 - feat: add support of centos 7 diff --git a/README.md b/README.md index 5a39a38..feb3a98 100644 --- a/README.md +++ b/README.md @@ -150,11 +150,65 @@ Notice: for debian9 set `sensu_repository_system` to `ubuntu` and `sensu_reposit * `sensu_api_password` - password for sensu api (default: `P@ssw0rd!`) ## How to use +### Agent + +``` +- hosts: webserver + roles: + - sensu + vars: + sensu_agent_subscriptions: + - debian + - webserver + sensu_agent_labels: + datacenter: paris + disk_warning: 30 + disk_critical: 50 + sensu_agent_plugins: + - name: sensu-plugins-disk-checks + version: 3.1.1 +``` + +### Backend ``` - hosts: monitoring roles: - sensu + vars: + sensu_backend: yes + sensu_namespaces: + - name: production + - name: dev + sensu_users: + - name: johndoe + password: secret1234 + groups: + - devops + - users + sensu_handlers: + - name: mail + command: /usr/local/bin/handler-mailer + namespaces: + - production + - dev + sensu_filters: + - name: state_changed + expressions: + - event.check.occurrences == 1 + namespaces: + - production + - dev + sensu_checks: + - name: ping + command: ping -c 1 127.0.0.1 + subscriptions: + - linux + namespaces: + - production + - dev + sensu_cluster_roles: + - name: superview ``` ## Development