grains and pillars and mine. fuck this shit.
This commit is contained in:
@@ -1,18 +1,14 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: ft=yaml
|
# vim: ft=yaml
|
||||||
---
|
---
|
||||||
|
chaos-role:
|
||||||
|
- prometheus-node_exporter
|
||||||
|
|
||||||
prometheus:
|
prometheus:
|
||||||
wanted:
|
wanted:
|
||||||
- node_exporter
|
- node_exporter
|
||||||
service:
|
service:
|
||||||
node_exporter:
|
node_exporter:
|
||||||
args:
|
args:
|
||||||
web.listen-address: ":9110"
|
web.listen-address: ":9100"
|
||||||
# collector.textfile.directory: /var/tmp/node_exporter
|
# 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 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: ft=yaml
|
# vim: ft=yaml
|
||||||
---
|
---
|
||||||
|
chaos-role:
|
||||||
|
- prometheus-master
|
||||||
|
- prometheus-node_exporter
|
||||||
|
|
||||||
prometheus:
|
prometheus:
|
||||||
wanted:
|
wanted:
|
||||||
- prometheus
|
- prometheus
|
||||||
@@ -10,3 +14,18 @@ prometheus:
|
|||||||
prometheus:
|
prometheus:
|
||||||
args:
|
args:
|
||||||
web.listen-address: 0.0.0.0:9090
|
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:
|
mine_functions:
|
||||||
|
chaos_roles:
|
||||||
|
- mine_function: pillar.get
|
||||||
|
- chaos-role
|
||||||
|
disk.usage: []
|
||||||
grains.items: []
|
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