2023-10-26 18:45:28 +00:00
|
|
|
monitored
|
|
|
|
=========
|
|
|
|
|
|
|
|
Prepare remote machine for monitoring with Naemon/Nagios/Icinga via NRPE and/or SSH
|
|
|
|
|
|
|
|
Requirements
|
|
|
|
------------
|
|
|
|
|
|
|
|
- Role "epel" for RedHat-like systems
|
|
|
|
|
|
|
|
Role Variables
|
|
|
|
--------------
|
|
|
|
|
|
|
|
Defaults (config/overwrite required):
|
2024-11-08 10:52:58 +00:00
|
|
|
- `monitored_by_nrpe` (defaults: `false`): install/configure NRPE
|
|
|
|
- `monitored_by_ssh` (defaults: `false`): install/configure SSH incl. wrapper
|
2023-10-26 18:45:28 +00:00
|
|
|
script
|
|
|
|
- `monitored_server_ips` (defaults: `[127.0.0.1,]`: list(!) of monitoring server
|
|
|
|
ips
|
|
|
|
|
|
|
|
Required for SSH:
|
|
|
|
- `monitored_ssh_key_files` (defaults: `[]`): list(!) of SSH key strings(!)
|
|
|
|
|
|
|
|
Common variables:
|
2024-11-08 10:52:58 +00:00
|
|
|
- `monitored_packages_install` (defaults: `true`): install plugings
|
2023-10-26 18:45:28 +00:00
|
|
|
- `monitored_sudo_file` (defaults: `/etc/sudoers.d/monitored`): sudoers file
|
|
|
|
- `monitored_sudo_commands`: list of `sudoers` config lines
|
|
|
|
- `monitored_packages_additional(_nrpe|_ssh)`: additional packages to install
|
|
|
|
- `monitored_plugins_custom`: additional plugin scripts to copy
|
|
|
|
- `monitored_plugins_custom_path` (defaults: `/usr/local/plugins/`): path for
|
|
|
|
additional plugins
|
|
|
|
|
|
|
|
NRPE:
|
|
|
|
- `monitored_nrpe_*`: NRPE config variables
|
|
|
|
|
|
|
|
SSH:
|
|
|
|
- `monitored_ssh_key_wrapper`: local path/filename of wrapper
|
|
|
|
- `monitored_ssh_key_wrapper_src`: remote path and filename of wrapper
|
|
|
|
- `monitored_ssh_key_wrapper_*`: file attributes of wrapper
|
|
|
|
|
|
|
|
Example Playbook
|
|
|
|
----------------
|
|
|
|
|
2023-12-14 10:03:56 +00:00
|
|
|
- hosts: all
|
2023-10-26 18:45:28 +00:00
|
|
|
roles:
|
2023-12-14 10:03:56 +00:00
|
|
|
- role: monitored
|
2024-11-08 10:52:58 +00:00
|
|
|
when: monitored_dont|default(false) != true
|
2023-10-26 18:45:28 +00:00
|
|
|
|
|
|
|
License
|
|
|
|
-------
|
|
|
|
|
|
|
|
GPL-2.0-or-later
|
|
|
|
|
|
|
|
Author Information
|
|
|
|
------------------
|
|
|
|
|
|
|
|
Sven Velt - <sven-ansiblerole@velt.biz>
|
|
|
|
https://git.velt.biz/velt.biz/
|
|
|
|
|