| {%- if pillar.glusterfs.server is defined %} |
| {%- from "glusterfs/map.jinja" import server with context -%} |
| check: |
| local_glusterd_proc: |
| command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -C glusterd -u root -c 1:1" |
| interval: 60 |
| occurrences: 1 |
| subscribers: |
| - local-glusterfs-server |
| {%- for volume_name, volume in server.get('volumes', {}).iteritems() %} |
| local_glusterfs_volume_{{ volume_name }}_{{ grains['fqdn'] }}: |
| command: "PATH=$PATH:/etc/sensu/plugins check_glusterfs -v {{ volume_name }} -n {{ volume.bricks|length }} -w 5 -c 1" |
| {%- set interval=320+(loop.index*5) %} |
| interval: {{ interval }} |
| timeout: 120 |
| occurrences: 1 |
| subscribers: |
| - {{ grains['fqdn']|replace('.', '-') }} |
| {%- endfor %} |
| local_glusterfsd_proc_{{ grains['fqdn'] }}: |
| command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -C glusterfsd -u root -c {{ server.volumes|length }}" |
| interval: 60 |
| occurrences: 1 |
| subscribers: |
| - {{ grains['fqdn']|replace('.', '-') }} |
| local_glusterfs_proc_{{ grains['fqdn'] }}: |
| command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -C glusterfs -u root -c {{ server.volumes|length + 1 }}" |
| interval: 60 |
| occurrences: 1 |
| subscribers: |
| - {{ grains['fqdn']|replace('.', '-') }} |
| {%- endif %} |
| |
| {#- vim: syntax=jinja -#} |