Skip to content

Instantly share code, notes, and snippets.

@ipmb
Created December 17, 2013 18:05
Show Gist options
  • Save ipmb/8009715 to your computer and use it in GitHub Desktop.
Save ipmb/8009715 to your computer and use it in GitHub Desktop.
Sample schedule pillar for Salmon
{% set minutes = 5 %}
{% set returner = "salmon_return" %}
schedule:
# all servers no args
{% for func in ['ps.physical_memory_usage', 'ps.virtual_memory_usage', 'ps.disk_io_counters', 'ps.network_io_counters'] %}
stat{{ loop.revindex }}:
function: {{ func }}
minutes: {{ minutes }}
returner: {{ returner }}
{% endfor %}
# all servers with args/kwargs
stat_cpu_percent:
function: ps.cpu_percent
kwargs:
interval: 5
per_cpu: True
minutes: {{ minutes }}
returner: {{ returner }}
stat_cpu_times:
function: ps.cpu_times
kwargs:
per_cpu: True
minutes: {{ minutes }}
returner: {{ returner }}
stat_disk_usage:
function: ps.disk_usage
args:
- "/"
minutes: {{ minutes }}
returner: {{ returner }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment