Skip to content

Commit

Permalink
release 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yokawasa committed Jul 21, 2020
1 parent 128ce51 commit 518d103
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
@@ -1,20 +1,31 @@
## 0.5.0

* Change base [azure-loganalytics-datacollector-api](https://github.com/yokawasa/azure-log-analytics-data-collector) to ">= 0.5.0"
* Support sprintf syntax like `%{my_log_type}` for `log_type` config param - [Issue #13](https://github.com/yokawasa/logstash-output-azure_loganalytics/issues/13)

## 0.4.0

* Change base [azure-loganalytics-datacollector-api](https://github.com/yokawasa/azure-log-analytics-data-collector) to ">= 0.4.0"

## 0.3.2

* Improvement: removed unnecessary key check

## 0.3.1

* Performance optimization for large key_names list scenario - [Issue#10](https://github.com/yokawasa/logstash-output-azure_loganalytics/issues/10)

## 0.3.0

* Support `key_types` param - [Issue#8](https://github.com/yokawasa/logstash-output-azure_loganalytics/issues/8)
* Support custom log analytics API endpoint (for supporting Azure sovereign cloud) - [Issue#9](https://github.com/yokawasa/logstash-output-azure_loganalytics/issues/9)

## 0.2.3

* Added additional debug logging for successful requests - [PR#7](https://github.com/yokawasa/logstash-output-azure_loganalytics/pull/7) by [@daniel-chambers](https://github.com/daniel-chambers)

## 0.2.2

* Fix logging failure - [PR#6](https://github.com/yokawasa/logstash-output-azure_loganalytics/pull/6) by [@daniel-chambers](https://github.com/daniel-chambers)

## 0.2.1
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -29,7 +29,7 @@ output {

* **customer\_id (required)** - Your Operations Management Suite workspace ID
* **shared\_key (required)** - The primary or the secondary Connected Sources client authentication key.
* **log\_type (required)** - The name of the event type that is being submitted to Log Analytics. This must be only alpha characters.
* **log\_type (required)** - The name of the event type that is being submitted to Log Analytics. It must only contain alpha numeric and _, and not exceed 100 chars. sprintf syntax like `%{my_log_type}` is supported.
* **time\_generated\_field (optional)** - Default:''(empty string) The name of the time generated field. Be carefule that the value of field should strictly follow the ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). See also [this](https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-data-collector-api#create-a-request) for more details
* **key\_names (optional)** - Default:[] (empty array). The list of key names in in-coming record that you want to submit to Log Analytics.
* **key\_types (optional)** - Default:{} (empty hash). The list of data types for each column as which you want to store in Log Analytics (`string`, `boolean`, or `double`)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
0.4.0
0.5.0
11 changes: 6 additions & 5 deletions lib/logstash/outputs/azure_loganalytics.rb
Expand Up @@ -16,7 +16,8 @@ class LogStash::Outputs::AzureLogAnalytics < LogStash::Outputs::Base
config :shared_key, :validate => :string, :required => true

# The name of the event type that is being submitted to Log Analytics.
# This must be only alpha characters.
# This must only contain alpha numeric and _, and not exceed 100 chars.
# sprintf syntax like %{my_log_type} is supported.
config :log_type, :validate => :string, :required => true

# The service endpoint (Default: ods.opinsights.azure.com)
Expand Down Expand Up @@ -50,10 +51,9 @@ class LogStash::Outputs::AzureLogAnalytics < LogStash::Outputs::Base
def register
require 'azure/loganalytics/datacollectorapi/client'

## Configure
if not @log_type.match(/^[[:alpha:]]+$/)
raise ArgumentError, 'log_type must be only alpha characters'
end
#if not @log_type.match(/^[[:alpha:]]+$/)
# raise ArgumentError, 'log_type must be only alpha characters'
#end

@key_types.each { |k, v|
t = v.downcase
Expand All @@ -75,6 +75,7 @@ def register

public
def receive(event)
@log_type = event.sprintf(@log_type)
# Simply save an event for later delivery
buffer_receive(event)
end # def receive
Expand Down

0 comments on commit 518d103

Please sign in to comment.