gabops.appoptics

gabops.appoptics

构建状态

安装和配置 SolarWinds Appoptics

要求

无。

角色变量

变量 默认值 描述
appoptics_managed_config_file true 使用默认变量配置代理。如果是 false,则仅安装代理。
appoptics_service_state started 安装/配置后设置代理服务是否启动。
appoptics_service_enabled true 控制 AppOptics 服务是否启用。
appoptics_log_level info 设置守护进程的日志级别。
appoptics_log_path /var/log/SolarWinds/Snap 设置存储代理日志的路径。
appoptics_log_format text 设置代理日志文件的格式。
appoptics_auto_discover_path /opt/SolarWinds/Snap/autoload 设置在代理启动时自动加载插件和任务的目录。
appoptics_plugin_trust_level 1 设置插件的信任级别。
appoptics_tls_cert_path "" 设置 TLS 证书路径,以启用安全插件通信并验证插件。
appoptics_tls_key_path "" 设置 TLS 密钥路径,以启用安全插件通信并验证插件。
appoptics_plugin_tls_key_path "" 设置用于自动加载的插件证书密钥文件的路径。
appoptics_plugin_tls_cert_path "" 设置用于自动加载的插件证书文件的路径。
appoptics_ca_cert_paths "" 设置 CA 证书的文件系统路径(文件/目录)列表,用于验证。
appoptics_plugin_load_timeout 15 设置插件加载的最大允许时间。某些插件可能需要更多时间初始化。
appoptics_listen_address 127.0.0.1 代理用来控制和接收插件数据的绑定地址。
appoptics_listen_port 21414 代理用来控制和接收插件数据的端口。
appoptics_temp_dir_path /tmp/SolarWinds/Snap 设置存放临时文件的临时目录。
appoptics_temp_dir_enable false 设置应用启动是否使用 temp_path_dir 来启动插件。使用临时位置被视为遗留功能。
appoptics_plugin_path /opt/SolarWinds/Snap/bin 加载插件二进制文件的搜索路径。
appoptics_task_path /opt/SolarWinds/Snap/etc/tasks.d 任务文件的搜索路径。
appoptics_task_autoload_path /opt/SolarWinds/Snap/etc/tasks-autoload.d 自动加载任务文件的搜索路径。
appoptics_plugins_include /opt/SolarWinds/Snap/etc/plugins.d 插件配置文件的搜索路径。
appoptics_token "" 设置 appoptics 身份验证令牌。
appoptics_metrics_url https://api.appoptics.com/v1/measurements 设置 appoptics 指标端点。
appoptics_agent_url https://api.appoptics.com/v1/agent/report 设置 appoptics 代理端点。
appoptics_hostname_alias "" 设置主机名别名,如果您希望使用不同于当前主机名的主机标签。
appoptics_proxy_url "" 设置代理 URL。
appoptics_proxy_user "" 设置用于验证代理的用户。
appoptics_proxy_password "" 设置用于验证代理的密码。
appoptics_ec2_check_timeout 5s 设置查询 EC2 实例元数据 URL 的超时时间,以确定代理是否在 EC2(或 OpenStack)上运行。
appoptics_global_tags [] 定义将在所有收集的指标中应用的全局标签。
appoptics_rest_api_enable false 控制守护进程的 REST API 是否启用。
appoptics_rest_api_https false 为 REST API 启用 HTTPS。如果没有提供默认证书和密钥,REST API 将生成一个私钥和公钥用于通信。
appoptics_rest_api_rest_auth false 为 REST API 启用身份验证。
appoptics_rest_api_rest_auth_password "" 设置用于 REST API 的密码。当前不支持用户和密码组合。
appoptics_rest_api_rest_certificate "" 定义在启用 HTTPS 时用于 REST API 的证书路径。
appoptics_rest_api_rest_key "" 在启用 HTTPS 时 REST API 使用的证书的私钥路径。
appoptics_rest_api_rest_port 21413 设置 REST API 服务器的启动端口。
appoptics_plugins [{file_name: "", content: {} }] 定义用于 appoptics 的插件。“content” 变量的内容将直接写入“file_name:”中声明的文件。
appoptics_tasks [{file_name: "", content: {} }] 定义用于 appoptics 的任务。“content” 变量的内容将直接写入“file_name:”中声明的文件。
appoptics_autoload_tasks [{file_name: "", content: {} }] 定义用于 appoptics 的自动加载任务。“content” 变量的内容将直接写入“file_name:”中声明的文件。

有关代理配置的更多详细信息,请参阅 Appoptics 代理配置

有关插件和任务配置的更多详细信息,请参阅 Appoptics 插件和任务配置

依赖关系

无。

示例剧本

    - hosts: servers
      vars:
        appoptics_token: secretoken123abc
        appoptics_metrics_url: https://api.appoptics.com/v1/measurements
        appoptics_hostname_alias: hostname-01
        appoptics_proxy_url: https://192.168.0.1:8080
        appoptics_proxy_user: user
        appoptics_proxy_password: 123abc
        appoptics_ec2_check_timeout: 5s
        appoptics_tls_cert_path: /tmp/snaptest-cli.crt
        appoptics_tls_key_path: /tmp/snaptest-cli.key
        appoptics_global_tags:
          environment: production
          project: foo
        appoptics_plugins:
          - file_name: mysql.yaml
            content:
              collector:
                mysql:
                  all:
                    mysql_connection_string: "foo:passwd@tcp(localhost:3306)/mydb"
              load:
                plugin: snap-plugin-collector-aomysql
                task: task-aomysql.yaml
        appoptics_tasks:
          - file_name: task-aomysql.yaml
            content:
              version: 1
              schedule:
                type: cron
                interval: 0 * * * * *
              workflow:
                collect:
                  metrics:
                    /mysql/aborted/clients: {}
              publish:
                - plugin_name: publisher-appoptics
        appoptics_autoload_tasks:
          - file_name: task-bridge-tomcat.yaml
            content:
              version: 2

              schedule:
                type: cron
                interval: "0 * * * * *"

              plugins:
                - plugin_name: bridge
                  config:
                    tomcat:
                      url: "http://127.0.0.1:8080/manager/status/all?XML=true"
                      username: "foo"
                      password: "passwd"
                  publish:
                    - plugin_name: publisher-appoptics
              roles:
                 - role: gabops.appoptics

许可证

MIT

作者信息

Gabriel Suarez (Gabops)

安装
ansible-galaxy install gabops.appoptics
许可证
mit
下载
7.5k
拥有者
I am a DevOps engineer who likes Python, Go, AWS, Kubernetes and climbing with friends.