1 # Copyright © 2018 AT&T, Amdocs, Bell Canada Intellectual Property. All rights reserved.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
19 url => "${dmaap_base_url}/events/${event_topic}/${dmaap_consumer_group}/${dmaap_consumer_id}?timeout=15000"
21 Accept => "application/json"
23 add_field => { "topic" => "${event_topic}" }
25 notification_queue => {
27 url => "${dmaap_base_url}/events/${notification_topic}/${dmaap_consumer_group}/${dmaap_consumer_id}?timeout=15000"
29 Accept => "application/json"
31 add_field => { "topic" => "${notification_topic}" }
35 url => "${dmaap_base_url}/events/${request_topic}/${dmaap_consumer_group}/${dmaap_consumer_id}?timeout=15000"
37 Accept => "application/json"
39 add_field => { "topic" => "${request_topic}" }
50 # avoid noise if no entry in the list
51 if [message] == "[]" {
55 # parse json, split the list into multiple events, and parse each event
66 mutate { remove_field => [ "message" ] }
67 # express timestamps in milliseconds instead of microseconds
69 code => "event.set('closedLoopAlarmStart', Integer(event.get('closedLoopAlarmStart')))"
72 match => [ "closedLoopAlarmStart", UNIX_MS ]
73 target => "closedLoopAlarmStart"
76 if [closedLoopAlarmEnd] {
78 code => "event.set('closedLoopAlarmEnd', Integer(event.get('closedLoopAlarmEnd')))"
81 match => [ "closedLoopAlarmEnd", UNIX_MS ]
82 target => "closedLoopAlarmEnd"
86 #"yyyy-MM-dd HH:mm:ss"
87 if [notificationTime] {
90 "notificationTime", " ", "T"
94 match => [ "notificationTime", ISO8601 ]
95 target => "notificationTime"
104 if [http_request_failure] {
107 hosts => ["${elasticsearch_base_url}"]
108 index => "errors-%{+YYYY.MM.DD}"
109 doc_as_upsert => true
114 hosts => ["${elasticsearch_base_url}"]
115 index => "logstash-%{+YYYY.MM.DD}" # creates daily indexes
116 doc_as_upsert => true