新增部署Prometheus监控工具脚本;更新README.md文件

This commit is contained in:
2023-12-12 16:08:29 +08:00
committed by huty
parent 32e4e8070b
commit 30c8ad0f9a
98 changed files with 4591 additions and 2 deletions

View File

@@ -0,0 +1,24 @@
server:
http_listen_port: 9080
grpc_listen_port: 0
positions:
filename: /tmp/positions.yaml
clients:
- url: http://{{ groups.server.0 }}:{{ loki.port }}/loki/api/v1/push
scrape_configs:
{% for node in promtail.nodes -%}
{% if node.host == inventory_hostname -%}
{% for target in node.targets -%}
- job_name: {{ target.name }}
static_configs:
- targets:
- localhost
labels:
job: {{ target.name }}
__path__: {{ target.path }}/*log
{% endfor %}
{% endif %}
{% endfor %}