fluent-plugin-azuremonitorlog 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bc27eaae665cf1497fcb31b343eab908af3d48a8
4
- data.tar.gz: ffaa0adb94b8ca19d7c880afc78d78b41dab8846
3
+ metadata.gz: 05b66cd3d2120526437f61005bff414797df9685
4
+ data.tar.gz: 88cc5ce594122d68b6f552d2ce07fdc902b329ff
5
5
  SHA512:
6
- metadata.gz: a856ecc2e3208d0d1b17dfba8727c8dd846dc33a54dd961ff90479bf61f865bf2b1afc6b7344d55f2916c9bd64a8ac8284d99ca852597482b64c4e241caf49ea
7
- data.tar.gz: 23f60100301a8a6d9cee11aeb42a488a3635e05c607d20cba64bac299b06cc1a753b57bf02471db6cec4d2a5b1586ca1fc74956587d19919a1ce4a0fcc4aabd8
6
+ metadata.gz: 0ce3bb48e1689507682094a7ea3990fd3bc85b32d82f5d5511cda57b015dfcc31bdb83ec2a0bdb33735eee28d6faee0b60a295cb41fafc430d6f489b34008547
7
+ data.tar.gz: cc6eb58994b18f23e5b5b2e70e7bdf846fe5e435ca01cfb3040598abb2e23a0bab05834a42f67c494dd06888acf40228e5e21467cc0b544314f6ed9e43099c0f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluent-plugin-azuremonitorlog (0.0.2)
4
+ fluent-plugin-azuremonitorlog (0.0.1)
5
5
  azure_mgmt_monitor (~> 0.11.0)
6
6
  fluentd (>= 0.10.30)
7
7
 
data/README.md CHANGED
@@ -1,20 +1,20 @@
1
1
  # fluent-plugin-azuremonitorlog, a plugin for [Fluentd](http://fluentd.org)
2
2
  ## Overview
3
3
 
4
- ***Azure Monitor log*** input plugin.
4
+ [Azure Monitor log](https://docs.microsoft.com/en-us/rest/api/monitor/ActivityLogs/List) input plugin.
5
5
 
6
6
  This plugin gets the monitor activity logs from Azure Monitor API to fluentd.
7
7
 
8
8
  ## Installation
9
9
 
10
- Install from RubyGems:
10
+ To use this plugin, you need to have Azure Service Principal.<br/>
11
+ Create an Azure Service Principal through [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli?toc=%2fazure%2fazure-resource-manager%2ftoc.json) or [Azure portal](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal).
12
+
13
+ Install plugin from RubyGems:
11
14
  ```
12
15
  $ gem install fluent-plugin-azuremonitorlog
13
16
  ```
14
17
 
15
- To use this plugin, you need to have Azure Service Principal.<br/>
16
- Create an Azure Service Principal through [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli?toc=%2fazure%2fazure-resource-manager%2ftoc.json) or [Azure portal](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal).
17
-
18
18
  ## Configuration
19
19
 
20
20
  ```config
@@ -48,6 +48,45 @@ Documentation for select and filter can be found [here](https://docs.microsoft.c
48
48
  select_filter eventName,id,resourceGroupName,resourceProviderName,operationName,status,eventTimestamp,correlationId,submissionTimestamp,level
49
49
  </source>
50
50
 
51
+ ```
52
+ Start fluentd:
53
+
54
+ ```
55
+ $ fluentd -c ./fluentd.conf
56
+ ```
57
+
58
+ output example:
59
+ ```
60
+ {
61
+ "correlationId": "00000000-0000-0000-0000-000000000000",
62
+ "eventName": {
63
+ "value": "EndRequest",
64
+ "localizedValue": "End request"
65
+ },
66
+ "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myresourcegroup/events/00000000-0000-0000-0000-000000000000/ticks/636444295616045190",
67
+ "resourceGroupName": "myresourcegroup",
68
+ "resourceProviderName": {
69
+ "value": "Microsoft.Resources",
70
+ "localizedValue": "Microsoft Resources"
71
+ },
72
+ "operationName": {
73
+ "value": "Microsoft.Resources/subscriptions/resourcegroups/write",
74
+ "localizedValue": "Update resource group"
75
+ },
76
+ "status": {
77
+ "value": "Succeeded",
78
+ "localizedValue": "Succeeded"
79
+ },
80
+ "eventTimestamp": "2017-10-24T08:12:41.604519Z"
81
+ }
82
+ ```
83
+
84
+ ## Test
85
+
86
+ Run tests:
87
+
88
+ ```
89
+ $ rake test
51
90
  ```
52
91
 
53
92
  ## Contributing
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = "fluent-plugin-azuremonitorlog"
7
- gem.version = "0.0.1"
7
+ gem.version = "0.0.2"
8
8
  gem.authors = ["Ilana Kantorov"]
9
9
  gem.email = ["ilanak@microsoft.com"]
10
10
  gem.description = %q{Input plugin for Azure Monitor Activity logs.}
@@ -40,11 +40,13 @@ class Fluent::AzureMonitorLogInput < Fluent::Input
40
40
 
41
41
  def start
42
42
  super
43
+ @finished = false
43
44
  @watcher = Thread.new(&method(:watch))
44
45
  end
45
46
 
46
47
  def shutdown
47
48
  super
49
+ @finished = true
48
50
  @watcher.terminate
49
51
  @watcher.join
50
52
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-azuremonitorlog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilana Kantorov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-24 00:00:00.000000000 Z
11
+ date: 2017-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd