grains and pillars and mine. fuck this shit.
This commit is contained in:
@@ -1,18 +1,14 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=yaml
|
||||
---
|
||||
chaos-role:
|
||||
- prometheus-node_exporter
|
||||
|
||||
prometheus:
|
||||
wanted:
|
||||
- node_exporter
|
||||
service:
|
||||
node_exporter:
|
||||
args:
|
||||
web.listen-address: ":9110"
|
||||
web.listen-address: ":9100"
|
||||
# collector.textfile.directory: /var/tmp/node_exporter
|
||||
config:
|
||||
prometheus:
|
||||
scrape_configs:
|
||||
- job_name: 'node'
|
||||
static_configs:
|
||||
- targets:
|
||||
- {{ grains.get('fqdn') }}{{ salt['pillar.get']('prometheus:service:node_exporter:args:web.listen-address', ':9110') }}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=yaml
|
||||
---
|
||||
chaos-role:
|
||||
- prometheus-master
|
||||
- prometheus-node_exporter
|
||||
|
||||
prometheus:
|
||||
wanted:
|
||||
- prometheus
|
||||
@@ -10,3 +14,18 @@ prometheus:
|
||||
prometheus:
|
||||
args:
|
||||
web.listen-address: 0.0.0.0:9090
|
||||
config:
|
||||
prometheus:
|
||||
scrape_configs:
|
||||
- job_name: 'node'
|
||||
static_configs:
|
||||
- targets:
|
||||
- xxx
|
||||
{% set roles = salt.saltutil.runner('mine.get',
|
||||
tgt='*',
|
||||
fun='chaos_roles',
|
||||
tgt_type='glob'
|
||||
) %}
|
||||
- {{ roles.items() }}
|
||||
- xxx
|
||||
- {{ grains.get('fqdn') }}{{ salt['pillar.get']('prometheus:service:node_exporter:args:web.listen-address', ':9110') }}
|
||||
|
||||
6
salt/master.sls
Normal file
6
salt/master.sls
Normal file
@@ -0,0 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=yaml
|
||||
---
|
||||
chaos:
|
||||
role:
|
||||
- salt-master
|
||||
17
saltmine.sls
17
saltmine.sls
@@ -1,3 +1,18 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=yaml
|
||||
---
|
||||
|
||||
mine_functions:
|
||||
chaos_roles:
|
||||
- mine_function: pillar.get
|
||||
- chaos-role
|
||||
disk.usage: []
|
||||
grains.items: []
|
||||
pillar.items: []
|
||||
network.ip_addrs: [eth0]
|
||||
networkplus.internal_ip_addrs: []
|
||||
internal_ip_addrs:
|
||||
mine_function: network.ip_addrs
|
||||
cidr: 192.168.0.0/16
|
||||
ip_list:
|
||||
- mine_function: grains.get
|
||||
- ip_interfaces
|
||||
|
||||
Reference in New Issue
Block a user