stdevel.omd

构建状态

omd

该角色安装和配置 OMD (开放监控分发版)

需求

系统需要能够访问互联网。此外,您需要一个 OMD 支持的 Linux 安装 - 例如:

  • CentOS / Red Hat 企业 Linux
    • 7
    • 8
  • SUSE Linux 企业服务器 12
  • Debian
    • 10 (Buster)
    • 11 (Bullseye)
  • Ubuntu
    • 18.04 (Bionic Beaver)
    • 20.04 (Focal Fossa)
    • 22.04 (Jammy Jellyfish)

确保在 CentOS 或 Red Hat 企业 Linux 系统上启用 EPEL

角色变量

变量 默认值 描述
omd_repo_flavor stable 使用 stabletesting 仓库(夜间构建
omd_version 4.60 要选择的 OMD 软件包版本

变量 sites 包含一个字典,指定要创建的站点及其相应配置。请参考以下表格获取可能的变量:

变量 描述
name 站点名称
core 站点核心(*icinga2naemon,对于 2.x 版本也包括 icinganagios*)
default_gui 默认 GUI(*thrukgrafana,对于 2.x 版本也包括 nagioscheck_mk*)
thruk_cookie_auth 是否使用 Thruk cookie 验证的标志(onoff
remove_nagios_protection 是否禁用不安全的 Nagios CGI 的标志(仅对 2.x 版本
admin_password omdadmin 默认密码(默认:空,由 OMD 自动设置

默认情况下,会创建一个 Icinga2 站点:

omd_sites:
  - name: icinga2
    core: icinga2
    default_gui: thruk
    thruk_cookie_auth: false
    remove_nagios_protection: false

依赖

无依赖。

示例剧本

请参考以下示例:

    - hosts: servers
      roles:
         - stdevel.omd

如有需要设置变量,可以这样做,例如:

---
- hosts: bacinga.giertz.loc
  remote_user: root
  roles:
    - role: stdevel.omd
      package_omd: '4.60'

请记住在 RHEL/CentOS 系统上启用 EPEL:

---
- hosts: bluecap.giertz.loc
  remote_user: root
  roles:
    - role: geerlingguy.repo-epel
    - role: stdevel.omd
      omd_version: '3.30'

许可证

GPL 3.0

作者信息

Christian Stankowic (info@cstan.io)

安装
ansible-galaxy install stdevel.omd
许可证
gpl-3.0
下载
121
拥有者
IT consultant and podcaster 🎙️