onkeldom.pushgateway
Ansible 角色: Pushgateway
描述
使用 Ansible 部署 Prometheus Pushgateway。
要求
- Ansible >= 2.9 (可能在之前版本上也可用,但无法保证)
角色变量
所有可被覆盖的变量存储在 defaults/main.yml 文件中,以及下面的表格中。
名称 | 默认值 | 描述 |
---|---|---|
proxy_env |
{} | 代理环境变量 |
pushgateway_version |
1.4.1 | 节点导出程序包版本 |
pushgateway_web_listen_address |
0.0.0.0 | 默认监听地址 |
pushgateway_web_listen_port |
9091 | 默认监听端口 |
pushgateway_web_external_url |
"http://{{ ansible_domain }}.{{ ansible_hostname }}:{{ pushgateway_web_listen_port }}" | Pushgateway 可用的外部地址。 在反向代理后会很有用。例如 http://example.org/pushgateway |
pushgateway_persistence |
true | 启用持久化文件 |
pushgateway_create_consul_agent_service |
"true" | 添加 consul 代理配置片段 |
pushgateway_config_flags_extra |
{} | 启动时传递给 Pushgateway 二进制文件的额外配置标志 |
pushgateway_limit_nofile |
8192 | systemd 单元中的 nofile 限制 |
pushgateway_system_user |
prometheus | 默认系统用户 |
pushgateway_system_group |
prometheus | 默认系统组 |
pushgateway_log_level |
warn | 默认日志级别 |
pushgateway_log_format |
json | 默认日志格式 |
pushgateway_binary_local_dir |
/usr/local/bin | 默认二进制目录 |
pushgateway_persistence_dir |
/var/lib/pushgateway | 默认数据目录 |
pushgateway_http_proxy |
null | 定义应用程序代理 |
pushgateway_config_flags_extra |
{} | 额外的启动参数 |
示例
Playbook
在 Playbook 中使用如下:
- hosts: all
roles:
- onkeldom.pushgateway
贡献
请参阅 贡献指南。
许可证
本项目采用 MIT 许可证。有关更多信息,请查看 LICENSE。
关于项目
Ansible role for installing and configuring Prometheus Pushgateway
安装
ansible-galaxy install onkeldom.pushgateway
许可证
mit
下载
104
拥有者