bin/datadog-notification.rb in sensu-plugins-datadog-0.0.4 vs bin/datadog-notification.rb in sensu-plugins-datadog-1.0.0

- old
+ new

@@ -67,11 +67,11 @@ exit 0 end end # submit the event to datadog - def datadog # rubocop:disable all + def datadog description = @event['notification'] || [@event['client']['name'], @event['check']['name'], @event['check']['output']].join(' ') action = acquire_action priority = acquire_priority tags = [] tags.push('sensu') @@ -86,13 +86,12 @@ description, msg_title: @event['check']['name'], tags: tags, alert_type: action, priority: priority, - source_type_name: 'nagios', # make events appear as nagios alerts so the weekly nagios report can be produced + source_type_name: settings['datadog']['source_type_name'] || 'sensu', # let the user set the source_type_name aggregation_key: @event['check']['name'] - ), host: @event['client']['name'] - ) + ), host: @event['client']['name']) begin if response[0] == '202' puts 'Submitted event to Datadog' else