Merge changes from topic 'add-failed-logins-metric'
* changes:
Add a filter counting the failed SSH logins
Rename authentications.lua to audit_authentications.lua
diff --git a/heka/files/lua/filters/instance_state.lua b/heka/files/lua/filters/instance_state.lua
deleted file mode 100644
index 9354267..0000000
--- a/heka/files/lua/filters/instance_state.lua
+++ /dev/null
@@ -1,48 +0,0 @@
--- Copyright 2015 Mirantis, Inc.
---
--- Licensed under the Apache License, Version 2.0 (the "License");
--- you may not use this file except in compliance with the License.
--- You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
-local utils = require 'lma_utils'
-
-local msg = {
- Type = "metric", -- will be prefixed by "heka.sandbox."
- Timestamp = nil,
- Severity = 6,
-}
-
-count = 0
-
-function process_message ()
- local state = read_message("Fields[state]")
- local old_state = read_message("Fields[old_state]")
- if old_state ~= nil and state == old_state then
- -- nothing to do
- return 0
- end
- msg.Timestamp = read_message("Timestamp")
- msg.Fields = {
- source = read_message('Logger'),
- name = "openstack_nova_instance_state",
- -- preserve the original hostname in the Fields attribute because
- -- sandboxed filters cannot override the Hostname attribute
- hostname = read_message("Fields[hostname]"),
- type = utils.metric_type['COUNTER'],
- value = 1,
- tenant_id = read_message("Fields[tenant_id]"),
- user_id = read_message("Fields[user_id]"),
- state = state,
- tag_fields = { 'state', 'hostname' },
- }
- utils.inject_tags(msg)
-
- return utils.safe_inject_message(msg)
-end
diff --git a/heka/meta/sensu.yml b/heka/meta/sensu.yml
new file mode 100644
index 0000000..2aeae8b
--- /dev/null
+++ b/heka/meta/sensu.yml
@@ -0,0 +1,25 @@
+check:
+ local_heka_log_collector_proc:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -a log_collector -u heka -c 1:1"
+ interval: 60
+ occurences: 1
+ subscribers:
+ - local-heka-log_collector
+ local_heka_metric_collector_proc:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -a metric_collector -u heka -c 1:1"
+ interval: 60
+ occurences: 1
+ subscribers:
+ - local-heka-metric_collector
+ local_heka_remote_collector_proc:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -a remote_collector -u heka -c 0:1"
+ interval: 60
+ occurences: 1
+ subscribers:
+ - local-heka-remote_collector
+ local_heka_aggregator_proc:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -a aggregator -u heka -c 0:1"
+ interval: 60
+ occurences: 1
+ subscribers:
+ - local-heka-aggregator
diff --git a/metadata/service/support.yml b/metadata/service/support.yml
index 8af2cd5..14a0a96 100644
--- a/metadata/service/support.yml
+++ b/metadata/service/support.yml
@@ -6,6 +6,6 @@
heka:
enabled: true
sensu:
- enabled: false
+ enabled: true
sphinx:
enabled: true