doc: add example in readme
This commit is contained in:
parent
3c155cee59
commit
27f07c7a30
2 changed files with 55 additions and 0 deletions
|
@ -4,6 +4,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
- doc: add example in readme
|
||||||
|
|
||||||
## [1.1.0] - 2019-02-17
|
## [1.1.0] - 2019-02-17
|
||||||
- feat: add support of centos 7
|
- feat: add support of centos 7
|
||||||
|
|
54
README.md
54
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!`)
|
* `sensu_api_password` - password for sensu api (default: `P@ssw0rd!`)
|
||||||
|
|
||||||
## How to use
|
## 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
|
- hosts: monitoring
|
||||||
roles:
|
roles:
|
||||||
- sensu
|
- 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
|
## Development
|
||||||
|
|
Loading…
Reference in a new issue