Merge branch 'master' of github.com:tcpcloud/salt-formula-rabbitmq into stacklight
diff --git a/metadata/service/support.yml b/metadata/service/support.yml
index 1bd7620..9ff0c47 100644
--- a/metadata/service/support.yml
+++ b/metadata/service/support.yml
@@ -4,7 +4,7 @@
       collectd:
         enabled: true
       heka:
-        enabled: false
+        enabled: true
       sensu:
         enabled: true
       sphinx:
diff --git a/rabbitmq/meta/collectd.yml b/rabbitmq/meta/collectd.yml
index 6efc2c7..d3832d1 100644
--- a/rabbitmq/meta/collectd.yml
+++ b/rabbitmq/meta/collectd.yml
@@ -3,7 +3,7 @@
   rabbitmq_info:
     plugin: python
     execution: local
-    template: collectd/files/collectd_check_local_endpoint.conf
+    template: rabbitmq/files/collectd_rabbitmq_info.conf
     username: {{ server.admin.username }}
     password: {{ server.admin.password }}
   collectd_processes:
diff --git a/rabbitmq/meta/heka.yml b/rabbitmq/meta/heka.yml
index 9c93f74..90cd4ae 100644
--- a/rabbitmq/meta/heka.yml
+++ b/rabbitmq/meta/heka.yml
@@ -17,7 +17,7 @@
   splitter:
     rabbitmq_splitter:
       engine: token
-      delimiter: "\n\n(=[^=]+====)"
+      delimiter: '\n\n(=[^=]+====)'
       delimiter_eol: false
 metric_collector:
   filter:
@@ -29,7 +29,6 @@
       message_matcher: "(Type == 'metric' || Type == 'heka.sandbox.metric') && (Fields[name] == 'rabbitmq_check')"
       ticker_interval: 10
       config:
-        hostname: '{{ grains.fqdn.split('.')[0] }}'
         afd_type: 'service'
         afd_file: 'lma_alarms_rabbitmq_service_check'
         afd_cluster_name: 'rabbitmq-service'
@@ -44,7 +43,6 @@
       message_matcher: "(Type == 'metric' || Type == 'heka.sandbox.metric') && (Fields[name] == 'rabbitmq_remaining_disk')"
       ticker_interval: 10
       config:
-        hostname: '{{ grains.fqdn.split('.')[0] }}'
         afd_type: 'service'
         afd_file: 'lma_alarms_rabbitmq_cluster_disk'
         afd_cluster_name: 'rabbitmq-cluster'
diff --git a/rabbitmq/meta/sensu.yml b/rabbitmq/meta/sensu.yml
index c604042..d66c49b 100644
--- a/rabbitmq/meta/sensu.yml
+++ b/rabbitmq/meta/sensu.yml
@@ -6,8 +6,14 @@
 {%- set address = server.bind.address %}
 {%- endif %}
 check:
-  local_rabbitmq_server_proc:
-    command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -C beam.smp -u rabbitmq -c 1:2"
+  local_rabbitmq_server_beam.smp_proc:
+    command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -C beam.smp -u rabbitmq -c 1:5"
+    interval: 60
+    occurrences: 1
+    subscribers:
+    - local-rabbitmq-server
+  local_rabbitmq_server_epmd_proc:
+    command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -C epmd -u rabbitmq -c 1:2"
     interval: 60
     occurrences: 1
     subscribers:
@@ -34,122 +40,8 @@
     subscribers:
     - remote-network
   local_rabbitmq_eva_diag_{{ address }}:
-    command: "PATH=$PATH:/etc/sensu/plugins check_rabbitmq_stuck_nodes.sh"
+    command: "PATH=$PATH:/etc/sensu/plugins check_rabbitmq_stuck_nodes.sh -w 5 -c 10"
     interval: 300
-    occurrences: 1
+    occurrences: 3
     subscribers:
-    - local-rabbitmq-server
-
-{# 
-
-remote_rabbitmq_openstack_alive:
-  command: "PATH=$PATH:/etc/sensu/plugins rabbitmq-amqp-alive.rb -w {{ address }} -v %2Fopenstack -u {{ server.admin.name }} --password {{ server.admin.password }}"
-  interval: 60
-  occurrences: 1
-  subscribers:
-  - remote-network
-{%- if pillar.nova.compute is defined %}
-remote_rabbitmq_metrics_compute:
-  command: "PATH=$PATH:/etc/sensu/plugins rabbitmq-queue-metrics.rb --host {{ address }} --user {{ server.admin.name }} --password {{ server.admin.password }} --filter compute"
-  interval: 60
-  occurrences: 1
-  subscribers:
-  - remote-network
-{%- endif %}
-remote_rabbitmq_metrics_scheduler:
-  command: "PATH=$PATH:/etc/sensu/plugins rabbitmq-queue-metrics.rb --host {{ address }} --user {{ server.admin.name }} --password {{ server.admin.password }} --filter scheduler"
-  interval: 60
-  occurrences: 1
-  subscribers:
-  - remote-network
-remote_rabbitmq_metrics_engine:
-  command: "PATH=$PATH:/etc/sensu/plugins rabbitmq-queue-metrics.rb --host {{ address }} --user {{ server.admin.name }} --password {{ server.admin.password }} --filter engine"
-  interval: 60
-  occurrences: 1
-  subscribers:
-  - remote-network
-remote_rabbitmq_metrics_console:
-  command: "PATH=$PATH:/etc/sensu/plugins rabbitmq-queue-metrics.rb --host {{ address }} --user {{ server.admin.name }} --password {{ server.admin.password }} --filter console"
-  interval: 60
-  occurrences: 1
-  subscribers:
-  - remote-network
-remote_rabbitmq_metrics_cinder_volume:
-  command: "PATH=$PATH:/etc/sensu/plugins rabbitmq-queue-metrics.rb --host {{ address }} --user {{ server.admin.name }} --password {{ server.admin.password }} --filter cinder-volume"
-  interval: 60
-  occurrences: 1
-  subscribers:
-  - remote-network
-remote_rabbitmq_metrics_conductor:
-  command: "PATH=$PATH:/etc/sensu/plugins rabbitmq-queue-metrics.rb --host {{ address }} --user {{ server.admin.name }} --password {{ server.admin.password }} --filter conductor"
-  interval: 60
-  occurrences: 1
-  subscribers:
-  - remote-network
-remote_rabbitmq_overview_metrics:
-  command: "PATH=$PATH:/etc/sensu/plugins rabbitmq-overview-metrics.rb --host {{ address }} --user {{ server.admin.name }} --password {{ server.admin.password }}"
-  interval: 60
-  occurrences: 1
-  subscribers:
-  - remote-network
-remote_rabbitmq_metrics_contrail_device_manager:
-  command: "PATH=$PATH:/etc/sensu/plugins rabbitmq-queue-metrics.rb --host {{ address }} --filter device_manager"
-  interval: 60
-  occurrences: 1
-  subscribers:
-  - remote-network
-remote_rabbitmq_metrics_contrail_vnc_config:
-  command: "PATH=$PATH:/etc/sensu/plugins rabbitmq-queue-metrics.rb --host {{ address }} --filter vnc_config"
-  interval: 60
-  occurrences: 1
-  subscribers:
-  - remote-network
-remote_rabbitmq_metrics_openstack_reply:
-  command: "PATH=$PATH:/etc/sensu/plugins rabbitmq-queue-metrics.rb --host {{ address }} --user {{ server.admin.name }} --password {{ server.admin.password }} --filter reply"
-  interval: 60
-  occurrences: 1
-  subscribers:
-  - remote-network
-remote_rabbitmq_queue_scheduler:
-  command: "PATH=$PATH:/etc/sensu/plugins check-rabbitmq-queue.rb --host {{ address }} --password {{ server.admin.password }} --user {{ server.admin.name }} -w 50 -c 100 --queue scheduler"
-  interval: 60
-  occurrences: 1
-  subscribers:
-  - remote-network
-remote_rabbitmq_queue_engine:
-  command: "PATH=$PATH:/etc/sensu/plugins check-rabbitmq-queue.rb --host {{ address }} --password {{ server.admin.password }} --user {{ server.admin.name }} -w 50 -c 100 --queue engine"
-  interval: 60
-  occurrences: 1
-  subscribers:
-  - remote-network
-remote_rabbitmq_queue_console:
-  command: "PATH=$PATH:/etc/sensu/plugins check-rabbitmq-queue.rb --host {{ address }} --password {{ server.admin.password }} --user {{ server.admin.name }} -w 50 -c 100 --queue console"
-  interval: 60
-  occurrences: 1
-  subscribers:
-  - remote-network
-remote_rabbitmq_queue_cinder_volume:
-  command: "PATH=$PATH:/etc/sensu/plugins check-rabbitmq-queue.rb --host {{ address }} --password {{ server.admin.password }} --user {{ server.admin.name }} -w 50 -c 100 --queue cinder-volume"
-  interval: 60
-  occurrences: 1
-  subscribers:
-  - remote-network
-remote_rabbitmq_queue_cinder_scheduler:
-  command: "PATH=$PATH:/etc/sensu/plugins check-rabbitmq-queue.rb --host {{ address }} --password {{ server.admin.password }} --user {{ server.admin.name }} -w 50 -c 100 --queue cinder-scheduler"
-  interval: 60
-  occurrences: 1
-  subscribers:
-  - remote-network
-remote_rabbitmq_queue_conductor:
-  command: "PATH=$PATH:/etc/sensu/plugins check-rabbitmq-queue.rb --host {{ address }} --password {{ server.admin.password }} --user {{ server.admin.name }} -w 50 -c 100 --queue conductor"
-  interval: 60
-  occurrences: 1
-  subscribers:
-  - remote-network
-remote_rabbitmq_queue_compute:
-  command: "PATH=$PATH:/etc/sensu/plugins check-rabbitmq-queue.rb --host {{ address }} --password {{ server.admin.password }} --user {{ server.admin.name }} -w 50 -c 100 --queue compute"
-  interval: 60
-  occurrences: 1
-  subscribers:
-  - remote-network
-#}
+    - local-rabbitmq-server
\ No newline at end of file