Class: LogStash::Outputs::Application_insights::Test_notification

Inherits:
Notification show all
Defined in:
lib/logstash/outputs/application_insights/test_notification.rb

Constant Summary

Constants inherited from Blob

Blob::CREATE_EXIST_ERRORS

Instance Attribute Summary

Attributes inherited from Blob

#last_io_exception

Instance Method Summary collapse

Methods inherited from Notification

#notify

Methods inherited from Blob

close, #create_container_exist_recovery, #create_exist_recovery, #create_table_exist_recovery, #state_table_delete, #state_table_insert, #state_table_query, #state_table_update, stopped?, #update_commited_or_uncommited_list

Methods inherited from Context

#clear_context, #context_to_table_entity, #context_to_tuple, #table_entity_to_context, #table_entity_to_tuple, #tuple_to_context

Constructor Details

#initializeTest_notification

Returns a new instance of Test_notification.



25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/logstash/outputs/application_insights/test_notification.rb', line 25

def initialize
  super( nil )
   = @configuration[:storage_account_name_key][0][0]
  @action = :test_notification
  @info = "#{@action}"
  @recoverable = [ :invalid_instrumentation_key, :invalid_table_id ]
  @force_client = true # to enable get a client even if all storage_accounts marked dead

  @container_name = "logstash-test-container"
  @blob_name = "logstash-test-blob"
  @table_id = GUID_NULL
  @instrumentation_key = GUID_NULL
end

Instance Method Details

#testObject



38
39
40
41
42
43
44
45
# File 'lib/logstash/outputs/application_insights/test_notification.rb', line 38

def test
  @max_tries = 1
  storage_io_block {
    if @recovery.nil?
      submit
    end
  }
end