fluent-plugin-azuremonitormetrics 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 316b0b3ac280185c4e006b8baa53cad80bb82eaa
4
+ data.tar.gz: 4aa30f29e6c173fdfa4b91f15d9ca44906f148f0
5
+ SHA512:
6
+ metadata.gz: fe130cd30fffc192d094f3d8fc222d43594c77a3e9dabaac7cf16d21e36b3f7a8490482fb71ee0e7411ef94e83cecd7edfe686ecb5b1aff9699bdc2a74390e97
7
+ data.tar.gz: 97e70e25755622aa86b662fb94ff17c1e61f4ccc1d5310413119c91a5dbd5e19f7fbf62278a6b1f8f9b1b97d69950f9e0783757449ada599daf4bba2ca5810fb
data/.bundle/config ADDED
@@ -0,0 +1,3 @@
1
+ ---
2
+ BUNDLE_PATH: "vendor/bundle"
3
+ BUNDLE_DISABLE_SHARED_GEMS: "true"
data/.idea/.rakeTasks ADDED
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Settings><!--This file was automatically generated by Ruby plugin.
3
+ You are allowed to:
4
+ 1. Remove rake task
5
+ 2. Add existing rake tasks
6
+ To add existing rake tasks automatically delete this file and reload the project.
7
+ --><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build fluent-plugin-azuremonitormetrics-0.0.1.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Remove any temporary products" fullCmd="clean" taksId="clean" /><RakeTask description="Remove any generated files" fullCmd="clobber" taksId="clobber" /><RakeTask description="Build and install fluent-plugin-azuremonitormetrics-0.0.1.gem into system gems" fullCmd="install" taksId="install" /><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="Build and install fluent-plugin-azuremonitormetrics-0.0.1.gem into system gems without network access" fullCmd="install:local" taksId="local" /></RakeGroup><RakeTask description="Create tag v0.0.1 and build and push fluent-plugin-azuremonitormetrics-0.0.1.gem to Rubygems" fullCmd="release[remote]" taksId="release[remote]" /><RakeTask description="Run tests" fullCmd="test" taksId="test" /></RakeGroup></Settings>
@@ -0,0 +1,35 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="ModuleRunConfigurationManager">
4
+ <shared />
5
+ </component>
6
+ <component name="NewModuleRootManager">
7
+ <content url="file://$MODULE_DIR$">
8
+ <excludeFolder url="file://$MODULE_DIR$/vendor/bundle" />
9
+ </content>
10
+ <orderEntry type="inheritedJdk" />
11
+ <orderEntry type="sourceFolder" forTests="false" />
12
+ <orderEntry type="library" scope="PROVIDED" name="azure_mgmt_monitor (v0.11.0, ruby-2.3.1-p112) [gem]" level="application" />
13
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v1.15.4, ruby-2.3.1-p112) [gem]" level="application" />
14
+ <orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.0.5, ruby-2.3.1-p112) [gem]" level="application" />
15
+ <orderEntry type="library" scope="PROVIDED" name="cool.io (v1.5.1, ruby-2.3.1-p112) [gem]" level="application" />
16
+ <orderEntry type="library" scope="PROVIDED" name="domain_name (v0.5.20170404, ruby-2.3.1-p112) [gem]" level="application" />
17
+ <orderEntry type="library" scope="PROVIDED" name="faraday (v0.13.1, ruby-2.3.1-p112) [gem]" level="application" />
18
+ <orderEntry type="library" scope="PROVIDED" name="faraday-cookie_jar (v0.0.6, ruby-2.3.1-p112) [gem]" level="application" />
19
+ <orderEntry type="library" scope="PROVIDED" name="fluentd (v0.12.40, ruby-2.3.1-p112) [gem]" level="application" />
20
+ <orderEntry type="library" scope="PROVIDED" name="http-cookie (v1.0.3, ruby-2.3.1-p112) [gem]" level="application" />
21
+ <orderEntry type="library" scope="PROVIDED" name="http_parser.rb (v0.6.0, ruby-2.3.1-p112) [gem]" level="application" />
22
+ <orderEntry type="library" scope="PROVIDED" name="ms_rest (v0.7.1, ruby-2.3.1-p112) [gem]" level="application" />
23
+ <orderEntry type="library" scope="PROVIDED" name="ms_rest_azure (v0.8.2, ruby-2.3.1-p112) [gem]" level="application" />
24
+ <orderEntry type="library" scope="PROVIDED" name="msgpack (v1.1.0, ruby-2.3.1-p112) [gem]" level="application" />
25
+ <orderEntry type="library" scope="PROVIDED" name="multipart-post (v2.0.0, ruby-2.3.1-p112) [gem]" level="application" />
26
+ <orderEntry type="library" scope="PROVIDED" name="rake (v12.1.0, ruby-2.3.1-p112) [gem]" level="application" />
27
+ <orderEntry type="library" scope="PROVIDED" name="sigdump (v0.2.4, ruby-2.3.1-p112) [gem]" level="application" />
28
+ <orderEntry type="library" scope="PROVIDED" name="thread_safe (v0.3.6, ruby-2.3.1-p112) [gem]" level="application" />
29
+ <orderEntry type="library" scope="PROVIDED" name="timeliness (v0.3.8, ruby-2.3.1-p112) [gem]" level="application" />
30
+ <orderEntry type="library" scope="PROVIDED" name="tzinfo (v1.2.3, ruby-2.3.1-p112) [gem]" level="application" />
31
+ <orderEntry type="library" scope="PROVIDED" name="unf (v0.1.4, ruby-2.3.1-p112) [gem]" level="application" />
32
+ <orderEntry type="library" scope="PROVIDED" name="unf_ext (v0.0.7.4, ruby-2.3.1-p112) [gem]" level="application" />
33
+ <orderEntry type="library" scope="PROVIDED" name="yajl-ruby (v1.3.0, ruby-2.3.1-p112) [gem]" level="application" />
34
+ </component>
35
+ </module>
@@ -0,0 +1,6 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="Rubocop" enabled="false" level="WARNING" enabled_by_default="false" />
5
+ </profile>
6
+ </component>
data/.idea/misc.xml ADDED
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectRootManager" version="2" project-jdk-name="ruby-2.3.1-p112" project-jdk-type="RUBY_SDK" />
4
+ </project>
data/.idea/modules.xml ADDED
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/fluent-plugin-azuremonitormetrics.iml" filepath="$PROJECT_DIR$/.idea/fluent-plugin-azuremonitormetrics.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
data/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,457 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ChangeListManager">
4
+ <list default="true" id="c7d31bc6-4041-4af4-8e88-da27a4a2c9ae" name="Default" comment="">
5
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.bundle/config" />
6
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/.rakeTasks" />
7
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/fluent-plugin-azuremonitormetrics.iml" />
8
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" />
9
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/misc.xml" />
10
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/modules.xml" />
11
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/vcs.xml" />
12
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
13
+ </list>
14
+ <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
15
+ <option name="TRACKING_ENABLED" value="true" />
16
+ <option name="SHOW_DIALOG" value="false" />
17
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
18
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
19
+ <option name="LAST_RESOLUTION" value="IGNORE" />
20
+ </component>
21
+ <component name="CoverageDataManager">
22
+ <SUITE FILE_PATH="coverage/fluent_plugin_azuremonitormetrics@test_configure_monitor_metrics__fluent_plugin_azuremonitormetrics.coverage" NAME="test_configure_monitor_metrics: fluent-plugin-azuremonitormetrics Coverage Results" MODIFIED="1508856254112" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="fluent-plugin-azuremonitormetrics" />
23
+ <SUITE FILE_PATH="coverage/fluent_plugin_azuremonitormetrics@activtylog.coverage" NAME="activtylog Coverage Results" MODIFIED="1508854594844" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="fluent-plugin-azuremonitormetrics" />
24
+ <SUITE FILE_PATH="coverage/fluent_plugin_azuremonitormetrics@test_set_query_options__fluent_plugin_azuremonitormetrics.coverage" NAME="test_set_query_options: fluent-plugin-azuremonitormetrics Coverage Results" MODIFIED="1508856260804" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="fluent-plugin-azuremonitormetrics" />
25
+ </component>
26
+ <component name="FileEditorManager">
27
+ <leaf>
28
+ <file leaf-file-name="in_azuremonitormetrics.rb" pinned="false" current-in-tab="false">
29
+ <entry file="file://$PROJECT_DIR$/lib/fluent/plugin/in_azuremonitormetrics.rb">
30
+ <provider selected="true" editor-type-id="text-editor">
31
+ <state relative-caret-position="440">
32
+ <caret line="99" column="23" lean-forward="true" selection-start-line="99" selection-start-column="23" selection-end-line="99" selection-end-column="23" />
33
+ <folding />
34
+ </state>
35
+ </provider>
36
+ </entry>
37
+ </file>
38
+ <file leaf-file-name="fluent-plugin-azuremonitormetrics.gemspec" pinned="false" current-in-tab="true">
39
+ <entry file="file://$PROJECT_DIR$/fluent-plugin-azuremonitormetrics.gemspec">
40
+ <provider selected="true" editor-type-id="text-editor">
41
+ <state relative-caret-position="234">
42
+ <caret line="13" column="34" lean-forward="true" selection-start-line="13" selection-start-column="34" selection-end-line="13" selection-end-column="34" />
43
+ <folding />
44
+ </state>
45
+ </provider>
46
+ </entry>
47
+ </file>
48
+ <file leaf-file-name="Gemfile.fluentd.0.12" pinned="false" current-in-tab="false">
49
+ <entry file="file://$PROJECT_DIR$/Gemfile.fluentd.0.12">
50
+ <provider selected="true" editor-type-id="text-editor">
51
+ <state relative-caret-position="0">
52
+ <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
53
+ <folding />
54
+ </state>
55
+ </provider>
56
+ </entry>
57
+ </file>
58
+ <file leaf-file-name="Gemfile" pinned="false" current-in-tab="false">
59
+ <entry file="file://$PROJECT_DIR$/Gemfile">
60
+ <provider selected="true" editor-type-id="text-editor">
61
+ <state relative-caret-position="0">
62
+ <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
63
+ <folding />
64
+ </state>
65
+ </provider>
66
+ </entry>
67
+ </file>
68
+ <file leaf-file-name="" pinned="false" current-in-tab="false">
69
+ <entry file="mock:///">
70
+ <provider selected="true" editor-type-id="text-editor">
71
+ <state relative-caret-position="0">
72
+ <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="34" selection-end-column="1" />
73
+ <folding />
74
+ </state>
75
+ </provider>
76
+ </entry>
77
+ </file>
78
+ <file leaf-file-name="README.md" pinned="false" current-in-tab="false">
79
+ <entry file="file://$PROJECT_DIR$/README.md">
80
+ <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
81
+ <state split_layout="SPLIT">
82
+ <first_editor relative-caret-position="371">
83
+ <caret line="52" column="0" lean-forward="true" selection-start-line="52" selection-start-column="0" selection-end-line="52" selection-end-column="0" />
84
+ <folding />
85
+ </first_editor>
86
+ <second_editor />
87
+ </state>
88
+ </provider>
89
+ </entry>
90
+ </file>
91
+ <file leaf-file-name="test_in_azuremonitormetrics.rb" pinned="false" current-in-tab="false">
92
+ <entry file="file://$PROJECT_DIR$/test/plugin/test_in_azuremonitormetrics.rb">
93
+ <provider selected="true" editor-type-id="text-editor">
94
+ <state relative-caret-position="432">
95
+ <caret line="47" column="28" lean-forward="false" selection-start-line="47" selection-start-column="28" selection-end-line="47" selection-end-column="28" />
96
+ <folding />
97
+ </state>
98
+ </provider>
99
+ </entry>
100
+ </file>
101
+ </leaf>
102
+ </component>
103
+ <component name="Git.Settings">
104
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
105
+ </component>
106
+ <component name="IdeDocumentHistory">
107
+ <option name="CHANGED_PATHS">
108
+ <list>
109
+ <option value="$PROJECT_DIR$/Gemfile" />
110
+ <option value="$PROJECT_DIR$/LICENSE" />
111
+ <option value="$PROJECT_DIR$/test/plugin/test_in_azuremonitormetrics.rb" />
112
+ <option value="$PROJECT_DIR$/activtylog.rb" />
113
+ <option value="$PROJECT_DIR$/fluent-plugin-azuremonitormetrics.gemspec" />
114
+ <option value="$PROJECT_DIR$/README.md" />
115
+ <option value="$PROJECT_DIR$/lib/fluent/plugin/in_azuremonitormetrics.rb" />
116
+ </list>
117
+ </option>
118
+ </component>
119
+ <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
120
+ <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
121
+ <component name="JsGulpfileManager">
122
+ <detection-done>true</detection-done>
123
+ <sorting>DEFINITION_ORDER</sorting>
124
+ </component>
125
+ <component name="ProjectFrameBounds" extendedState="6">
126
+ <option name="x" value="292" />
127
+ <option name="y" value="44" />
128
+ <option name="width" value="1400" />
129
+ <option name="height" value="883" />
130
+ </component>
131
+ <component name="ProjectView">
132
+ <navigator currentView="ProjectPane" proportions="" version="1">
133
+ <flattenPackages />
134
+ <showMembers />
135
+ <showModules />
136
+ <showLibraryContents />
137
+ <hideEmptyPackages />
138
+ <abbreviatePackageNames />
139
+ <autoscrollToSource />
140
+ <autoscrollFromSource />
141
+ <sortByType />
142
+ <manualOrder />
143
+ <foldersAlwaysOnTop value="true" />
144
+ </navigator>
145
+ <panes>
146
+ <pane id="Scope" />
147
+ <pane id="Scratches" />
148
+ <pane id="ProjectPane">
149
+ <subPane>
150
+ <expand>
151
+ <path>
152
+ <item name="fluent-plugin-azuremonitormetrics" type="b2602c69:ProjectViewProjectNode" />
153
+ <item name="fluent-plugin-azuremonitormetrics" type="462c0819:PsiDirectoryNode" />
154
+ </path>
155
+ <path>
156
+ <item name="fluent-plugin-azuremonitormetrics" type="b2602c69:ProjectViewProjectNode" />
157
+ <item name="fluent-plugin-azuremonitormetrics" type="462c0819:PsiDirectoryNode" />
158
+ <item name="lib" type="462c0819:PsiDirectoryNode" />
159
+ </path>
160
+ <path>
161
+ <item name="fluent-plugin-azuremonitormetrics" type="b2602c69:ProjectViewProjectNode" />
162
+ <item name="fluent-plugin-azuremonitormetrics" type="462c0819:PsiDirectoryNode" />
163
+ <item name="lib" type="462c0819:PsiDirectoryNode" />
164
+ <item name="fluent" type="462c0819:PsiDirectoryNode" />
165
+ </path>
166
+ <path>
167
+ <item name="fluent-plugin-azuremonitormetrics" type="b2602c69:ProjectViewProjectNode" />
168
+ <item name="fluent-plugin-azuremonitormetrics" type="462c0819:PsiDirectoryNode" />
169
+ <item name="lib" type="462c0819:PsiDirectoryNode" />
170
+ <item name="fluent" type="462c0819:PsiDirectoryNode" />
171
+ <item name="plugin" type="462c0819:PsiDirectoryNode" />
172
+ </path>
173
+ <path>
174
+ <item name="fluent-plugin-azuremonitormetrics" type="b2602c69:ProjectViewProjectNode" />
175
+ <item name="fluent-plugin-azuremonitormetrics" type="462c0819:PsiDirectoryNode" />
176
+ <item name="test" type="462c0819:PsiDirectoryNode" />
177
+ </path>
178
+ <path>
179
+ <item name="fluent-plugin-azuremonitormetrics" type="b2602c69:ProjectViewProjectNode" />
180
+ <item name="fluent-plugin-azuremonitormetrics" type="462c0819:PsiDirectoryNode" />
181
+ <item name="test" type="462c0819:PsiDirectoryNode" />
182
+ <item name="plugin" type="462c0819:PsiDirectoryNode" />
183
+ </path>
184
+ </expand>
185
+ <select />
186
+ </subPane>
187
+ </pane>
188
+ </panes>
189
+ </component>
190
+ <component name="PropertiesComponent">
191
+ <property name="WebServerToolWindowFactoryState" value="false" />
192
+ <property name="last_opened_file_path" value="$PROJECT_DIR$/../../fluent-plugin-azureactivitylog" />
193
+ </component>
194
+ <component name="RunDashboard">
195
+ <option name="ruleStates">
196
+ <list>
197
+ <RuleState>
198
+ <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
199
+ </RuleState>
200
+ <RuleState>
201
+ <option name="name" value="StatusDashboardGroupingRule" />
202
+ </RuleState>
203
+ </list>
204
+ </option>
205
+ </component>
206
+ <component name="RunManager" selected="Test::Unit/Shoulda/Minitest.test_set_query_options: fluent-plugin-azuremonitormetrics">
207
+ <configuration name="activtylog" type="RubyRunConfigurationType" factoryName="Ruby" temporary="true">
208
+ <module name="fluent-plugin-azuremonitormetrics" />
209
+ <RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
210
+ <RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$MODULE_DIR$" />
211
+ <RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
212
+ <RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
213
+ <RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
214
+ <envs />
215
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
216
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
217
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
218
+ <COVERAGE_PATTERN ENABLED="true">
219
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
220
+ </COVERAGE_PATTERN>
221
+ </EXTENSION>
222
+ <RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$MODULE_DIR$/activtylog.rb" />
223
+ <RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
224
+ </configuration>
225
+ <configuration name="test_configure_monitor_metrics: fluent-plugin-azuremonitormetrics" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true">
226
+ <predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
227
+ <module name="fluent-plugin-azuremonitormetrics" />
228
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) -Ilib:test" />
229
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
230
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
231
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
232
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
233
+ <envs>
234
+ <env name="JRUBY_OPTS" value="-X+O" />
235
+ </envs>
236
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
237
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
238
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
239
+ <COVERAGE_PATTERN ENABLED="true">
240
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
241
+ </COVERAGE_PATTERN>
242
+ </EXTENSION>
243
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
244
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/test/plugin/test_in_azuremonitormetrics.rb" />
245
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
246
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="test_configure_monitor_metrics" />
247
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_METHOD" />
248
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
249
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
250
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
251
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
252
+ </configuration>
253
+ <configuration name="test_set_query_options: fluent-plugin-azuremonitormetrics" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true">
254
+ <predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
255
+ <module name="fluent-plugin-azuremonitormetrics" />
256
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) -Ilib:test" />
257
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
258
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
259
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
260
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
261
+ <envs>
262
+ <env name="JRUBY_OPTS" value="-X+O" />
263
+ </envs>
264
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
265
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
266
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
267
+ <COVERAGE_PATTERN ENABLED="true">
268
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
269
+ </COVERAGE_PATTERN>
270
+ </EXTENSION>
271
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
272
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/test/plugin/test_in_azuremonitormetrics.rb" />
273
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
274
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="test_set_query_options" />
275
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_METHOD" />
276
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
277
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
278
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
279
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
280
+ </configuration>
281
+ <list size="3">
282
+ <item index="0" class="java.lang.String" itemvalue="Test::Unit/Shoulda/Minitest.test_set_query_options: fluent-plugin-azuremonitormetrics" />
283
+ <item index="1" class="java.lang.String" itemvalue="Test::Unit/Shoulda/Minitest.test_configure_monitor_metrics: fluent-plugin-azuremonitormetrics" />
284
+ <item index="2" class="java.lang.String" itemvalue="Ruby.activtylog" />
285
+ </list>
286
+ <recent_temporary>
287
+ <list size="3">
288
+ <item index="0" class="java.lang.String" itemvalue="Test::Unit/Shoulda/Minitest.test_set_query_options: fluent-plugin-azuremonitormetrics" />
289
+ <item index="1" class="java.lang.String" itemvalue="Test::Unit/Shoulda/Minitest.test_configure_monitor_metrics: fluent-plugin-azuremonitormetrics" />
290
+ <item index="2" class="java.lang.String" itemvalue="Ruby.activtylog" />
291
+ </list>
292
+ </recent_temporary>
293
+ </component>
294
+ <component name="ShelveChangesManager" show_recycled="false">
295
+ <option name="remove_strategy" value="false" />
296
+ </component>
297
+ <component name="SpringUtil" SPRING_PRE_LOADER_OPTION="true" />
298
+ <component name="TaskManager">
299
+ <task active="true" id="Default" summary="Default task">
300
+ <changelist id="c7d31bc6-4041-4af4-8e88-da27a4a2c9ae" name="Default" comment="" />
301
+ <created>1508741060343</created>
302
+ <option name="number" value="Default" />
303
+ <option name="presentableId" value="Default" />
304
+ <updated>1508741060343</updated>
305
+ <workItem from="1508741061579" duration="1036000" />
306
+ <workItem from="1508844897798" duration="12349000" />
307
+ </task>
308
+ <servers />
309
+ </component>
310
+ <component name="TestHistory">
311
+ <history-entry file="test_configure_monitor_metrics__fluent-plugin-azuremonitormetrics - 2017.10.24 at 12h 33m 09s.xml">
312
+ <configuration name="test_configure_monitor_metrics: fluent-plugin-azuremonitormetrics" configurationId="TestUnitRunConfigurationType" />
313
+ </history-entry>
314
+ <history-entry file="test_configure_monitor_metrics__fluent-plugin-azuremonitormetrics - 2017.10.24 at 14h 44m 15s.xml">
315
+ <configuration name="test_configure_monitor_metrics: fluent-plugin-azuremonitormetrics" configurationId="TestUnitRunConfigurationType" />
316
+ </history-entry>
317
+ <history-entry file="test_set_query_options__fluent-plugin-azuremonitormetrics - 2017.10.24 at 12h 29m 27s.xml">
318
+ <configuration name="test_set_query_options: fluent-plugin-azuremonitormetrics" configurationId="TestUnitRunConfigurationType" />
319
+ </history-entry>
320
+ <history-entry file="test_set_query_options__fluent-plugin-azuremonitormetrics - 2017.10.24 at 12h 30m 02s.xml">
321
+ <configuration name="test_set_query_options: fluent-plugin-azuremonitormetrics" configurationId="TestUnitRunConfigurationType" />
322
+ </history-entry>
323
+ <history-entry file="test_set_query_options__fluent-plugin-azuremonitormetrics - 2017.10.24 at 12h 30m 13s.xml">
324
+ <configuration name="test_set_query_options: fluent-plugin-azuremonitormetrics" configurationId="TestUnitRunConfigurationType" />
325
+ </history-entry>
326
+ <history-entry file="test_set_query_options__fluent-plugin-azuremonitormetrics - 2017.10.24 at 12h 32m 01s.xml">
327
+ <configuration name="test_set_query_options: fluent-plugin-azuremonitormetrics" configurationId="TestUnitRunConfigurationType" />
328
+ </history-entry>
329
+ <history-entry file="test_set_query_options__fluent-plugin-azuremonitormetrics - 2017.10.24 at 12h 32m 16s.xml">
330
+ <configuration name="test_set_query_options: fluent-plugin-azuremonitormetrics" configurationId="TestUnitRunConfigurationType" />
331
+ </history-entry>
332
+ <history-entry file="test_set_query_options__fluent-plugin-azuremonitormetrics - 2017.10.24 at 12h 33m 05s.xml">
333
+ <configuration name="test_set_query_options: fluent-plugin-azuremonitormetrics" configurationId="TestUnitRunConfigurationType" />
334
+ </history-entry>
335
+ <history-entry file="test_set_query_options__fluent-plugin-azuremonitormetrics - 2017.10.24 at 12h 35m 53s.xml">
336
+ <configuration name="test_set_query_options: fluent-plugin-azuremonitormetrics" configurationId="TestUnitRunConfigurationType" />
337
+ </history-entry>
338
+ <history-entry file="test_set_query_options__fluent-plugin-azuremonitormetrics - 2017.10.24 at 14h 44m 21s.xml">
339
+ <configuration name="test_set_query_options: fluent-plugin-azuremonitormetrics" configurationId="TestUnitRunConfigurationType" />
340
+ </history-entry>
341
+ </component>
342
+ <component name="TimeTrackingManager">
343
+ <option name="totallyTimeSpent" value="13385000" />
344
+ </component>
345
+ <component name="ToolWindowManager">
346
+ <frame x="65" y="-4" width="1855" height="979" extended-state="6" />
347
+ <editor active="true" />
348
+ <layout>
349
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18867925" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
350
+ <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
351
+ <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
352
+ <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
353
+ <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
354
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.34146342" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
355
+ <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
356
+ <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
357
+ <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
358
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3991131" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
359
+ <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
360
+ <window_info id="Messages" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.30487806" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
361
+ <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
362
+ <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
363
+ <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
364
+ <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
365
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
366
+ <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
367
+ </layout>
368
+ </component>
369
+ <component name="TypeScriptGeneratedFilesManager">
370
+ <option name="version" value="1" />
371
+ </component>
372
+ <component name="VcsContentAnnotationSettings">
373
+ <option name="myLimit" value="2678400000" />
374
+ </component>
375
+ <component name="XDebuggerManager">
376
+ <breakpoint-manager />
377
+ <watches-manager />
378
+ </component>
379
+ <component name="editorHistoryManager">
380
+ <entry file="file://$PROJECT_DIR$/Rakefile" />
381
+ <entry file="file://$PROJECT_DIR$/LICENSE" />
382
+ <entry file="file:///usr/bin/rake">
383
+ <provider selected="true" editor-type-id="text-editor">
384
+ <state relative-caret-position="144">
385
+ <caret line="8" column="33" lean-forward="false" selection-start-line="8" selection-start-column="33" selection-end-line="8" selection-end-column="33" />
386
+ </state>
387
+ </provider>
388
+ </entry>
389
+ <entry file="file://$APPLICATION_HOME_DIR$/rubystubs23/date_time.rb">
390
+ <provider selected="true" editor-type-id="text-editor">
391
+ <state relative-caret-position="192">
392
+ <caret line="287" column="13" lean-forward="false" selection-start-line="287" selection-start-column="13" selection-end-line="287" selection-end-column="13" />
393
+ <folding />
394
+ </state>
395
+ </provider>
396
+ </entry>
397
+ <entry file="file://$PROJECT_DIR$/Gemfile.fluentd.0.12">
398
+ <provider selected="true" editor-type-id="text-editor">
399
+ <state relative-caret-position="0">
400
+ <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
401
+ <folding />
402
+ </state>
403
+ </provider>
404
+ </entry>
405
+ <entry file="file://$PROJECT_DIR$/activtylog.rb">
406
+ <provider selected="true" editor-type-id="text-editor">
407
+ <state relative-caret-position="432">
408
+ <caret line="45" column="29" lean-forward="true" selection-start-line="45" selection-start-column="29" selection-end-line="45" selection-end-column="29" />
409
+ <folding />
410
+ </state>
411
+ </provider>
412
+ </entry>
413
+ <entry file="file://$PROJECT_DIR$/Gemfile">
414
+ <provider selected="true" editor-type-id="text-editor">
415
+ <state relative-caret-position="0">
416
+ <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
417
+ <folding />
418
+ </state>
419
+ </provider>
420
+ </entry>
421
+ <entry file="file://$PROJECT_DIR$/test/plugin/test_in_azuremonitormetrics.rb">
422
+ <provider selected="true" editor-type-id="text-editor">
423
+ <state relative-caret-position="432">
424
+ <caret line="47" column="28" lean-forward="false" selection-start-line="47" selection-start-column="28" selection-end-line="47" selection-end-column="28" />
425
+ <folding />
426
+ </state>
427
+ </provider>
428
+ </entry>
429
+ <entry file="file://$PROJECT_DIR$/README.md">
430
+ <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
431
+ <state split_layout="SPLIT">
432
+ <first_editor relative-caret-position="371">
433
+ <caret line="52" column="0" lean-forward="true" selection-start-line="52" selection-start-column="0" selection-end-line="52" selection-end-column="0" />
434
+ <folding />
435
+ </first_editor>
436
+ <second_editor />
437
+ </state>
438
+ </provider>
439
+ </entry>
440
+ <entry file="file://$PROJECT_DIR$/lib/fluent/plugin/in_azuremonitormetrics.rb">
441
+ <provider selected="true" editor-type-id="text-editor">
442
+ <state relative-caret-position="440">
443
+ <caret line="99" column="23" lean-forward="true" selection-start-line="99" selection-start-column="23" selection-end-line="99" selection-end-column="23" />
444
+ <folding />
445
+ </state>
446
+ </provider>
447
+ </entry>
448
+ <entry file="file://$PROJECT_DIR$/fluent-plugin-azuremonitormetrics.gemspec">
449
+ <provider selected="true" editor-type-id="text-editor">
450
+ <state relative-caret-position="234">
451
+ <caret line="13" column="34" lean-forward="true" selection-start-line="13" selection-start-column="34" selection-end-line="13" selection-end-column="34" />
452
+ <folding />
453
+ </state>
454
+ </provider>
455
+ </entry>
456
+ </component>
457
+ </project>
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in fluent-plugin-azuremonitormetrics.gemspec
4
+ gemspec
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem 'fluentd', '~> 0.12.0'
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,76 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ fluent-plugin-azuremonitormetrics (0.0.10)
5
+ azure_mgmt_monitor (~> 0.11.0)
6
+ fluentd (>= 0.10.30)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ azure_mgmt_monitor (0.11.0)
12
+ ms_rest_azure (~> 0.8.0)
13
+ concurrent-ruby (1.0.5)
14
+ cool.io (1.5.1)
15
+ domain_name (0.5.20170404)
16
+ unf (>= 0.0.5, < 1.0.0)
17
+ faraday (0.13.1)
18
+ multipart-post (>= 1.2, < 3)
19
+ faraday-cookie_jar (0.0.6)
20
+ faraday (>= 0.7.4)
21
+ http-cookie (~> 1.0.0)
22
+ fluentd (0.14.21)
23
+ cool.io (>= 1.4.5, < 2.0.0)
24
+ http_parser.rb (>= 0.5.1, < 0.7.0)
25
+ msgpack (>= 0.7.0, < 2.0.0)
26
+ ruby_dig (~> 0.0.2)
27
+ serverengine (>= 2.0.4, < 3.0.0)
28
+ sigdump (~> 0.2.2)
29
+ strptime (~> 0.1.7)
30
+ tzinfo (~> 1.0)
31
+ tzinfo-data (~> 1.0)
32
+ yajl-ruby (~> 1.0)
33
+ http-cookie (1.0.3)
34
+ domain_name (~> 0.5)
35
+ http_parser.rb (0.6.0)
36
+ ms_rest (0.7.1)
37
+ concurrent-ruby (~> 1.0)
38
+ faraday (~> 0.9)
39
+ timeliness (~> 0.3)
40
+ ms_rest_azure (0.8.2)
41
+ concurrent-ruby (~> 1.0)
42
+ faraday (~> 0.9)
43
+ faraday-cookie_jar (~> 0.0.6)
44
+ ms_rest (~> 0.7.0)
45
+ msgpack (1.1.0)
46
+ multipart-post (2.0.0)
47
+ power_assert (1.1.0)
48
+ rake (12.0.0)
49
+ ruby_dig (0.0.2)
50
+ serverengine (2.0.5)
51
+ sigdump (~> 0.2.2)
52
+ sigdump (0.2.4)
53
+ strptime (0.1.9)
54
+ test-unit (3.2.5)
55
+ power_assert
56
+ thread_safe (0.3.6)
57
+ timeliness (0.3.8)
58
+ tzinfo (1.2.3)
59
+ thread_safe (~> 0.1)
60
+ tzinfo-data (1.2017.3)
61
+ tzinfo (>= 1.0.0)
62
+ unf (0.1.4)
63
+ unf_ext
64
+ unf_ext (0.0.7.4)
65
+ yajl-ruby (1.3.0)
66
+
67
+ PLATFORMS
68
+ ruby
69
+
70
+ DEPENDENCIES
71
+ fluent-plugin-azuremonitormetrics!
72
+ rake (>= 0.9.2)
73
+ test-unit (>= 3.1.0)
74
+
75
+ BUNDLED WITH
76
+ 1.15.4
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2017 Microsoft
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,107 @@
1
+ # fluent-plugin-azuremonitormetric, a plugin for [Fluentd](http://fluentd.org)
2
+ ## Overview
3
+
4
+ [Azure Monitor Metrics](https://docs.microsoft.com/en-us/rest/api/monitor/Metrics/List) input plugin.
5
+
6
+ This plugin gets the monitor metrics from Azure Monitor API to fluentd.
7
+
8
+ ## Installation
9
+
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 from RubyGems:
14
+ ```
15
+ $ gem install fluent-plugin-azuremonitormetrics
16
+ ```
17
+
18
+ ## Configuration
19
+
20
+ ```config
21
+ <source>
22
+ @type azuremonitormetrics
23
+ tag azuremonitormetrics
24
+ tenant_id [Azure_Tenant_ID]
25
+ client_id [Azure_Client_Id]
26
+ client_secret [Azure_Client_Secret]
27
+
28
+ timespan [timespan in second] (default: 300)
29
+ interval [time grain of the query: string] (default: PT1M)
30
+ resource_uri [the identifier of the resource]
31
+ aggregation [list of aggregation types] (example: Average,count)
32
+ top [Max number of records to retrive]
33
+ orderby [The aggregation to use for sorting] (example: sum asc)
34
+ filter [filter to reduce metric data] (example A eq 'a1' and B eq '*')
35
+ result_type [reduces the set of data collected]
36
+ metric [The name of the metric to retrive]
37
+ api_version [api version] (default: "2017-05-01-preview")
38
+ </source>
39
+ ```
40
+
41
+ Documentation for all the parameters can found [here](https://docs.microsoft.com/en-us/rest/api/monitor/Metrics/List#get_metric_for_data)<br/>
42
+ This plugin is porting from [fluent-plugin-cloudwatch](https://github.com/yunomu/fluent-plugin-cloudwatch)
43
+
44
+ Start fluentd:
45
+
46
+ ```
47
+ $ fluentd -c ./fluentd.conf
48
+ ```
49
+
50
+ #### output data format
51
+
52
+ Example of Average aggregation on Percentage CPU metric, on timespan of 5 minutes and 1 minute grain:
53
+
54
+ ```
55
+ 2017-10-22 14:25:28 azuremonitormetrics {
56
+ "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my_resource_group/providers/Microsoft.Compute/virtualMachines/my-vm/providers/Microsoft.Insights/metrics/Percentage CPU",
57
+ "type": "Microsoft.Insights/metrics",
58
+ "name": {
59
+ "value": "Percentage CPU",
60
+ "localizedValue": "Percentage CPU"
61
+ },
62
+ "unit": "Percent",
63
+ "timeseries": [
64
+ {
65
+ "metadatavalues": [],
66
+ "data": [
67
+ {
68
+ "timeStamp": "2017-10-24T14:11:00Z",
69
+ "average": 2.5075
70
+ },
71
+ {
72
+ "timeStamp": "2017-10-24T14:12:00Z",
73
+ "average": 2.505
74
+ },
75
+ {
76
+ "timeStamp": "2017-10-24T14:13:00Z",
77
+ "average": 2.455
78
+ },
79
+ {
80
+ "timeStamp": "2017-10-24T14:14:00Z",
81
+ "average": 2.4375
82
+ },
83
+ {
84
+ "timeStamp": "2017-10-24T14:15:00Z",
85
+ "average": 2.4375
86
+ }
87
+ ]
88
+ }
89
+ ]
90
+ }
91
+ ```
92
+
93
+ ## Test
94
+
95
+ Run tests:
96
+
97
+ ```
98
+ $ rake test
99
+ ```
100
+
101
+ ## Contributing
102
+
103
+ 1. Fork it
104
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
105
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
106
+ 4. Push to the branch (`git push origin my-new-feature`)
107
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
3
+
4
+ require "rake/testtask"
5
+ Rake::TestTask.new(:test) do |test|
6
+ test.libs << 'lib' << 'test'
7
+ test.pattern = 'test/**/test_*.rb'
8
+ test.verbose = true
9
+ end
10
+
11
+ task :default => :test
@@ -0,0 +1,22 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |gem|
6
+ gem.name = "fluent-plugin-azuremonitormetrics"
7
+ gem.version = "0.0.1"
8
+ gem.authors = ["Ilana Kantorov"]
9
+ gem.email = ["ilanak@microsoft.com"]
10
+ gem.description = %q{Input plugin for Azure Monitor Metrics.}
11
+ gem.homepage = "https://github.com/Ilanak/fluent-plugin-azuremonitormetrics"
12
+ gem.summary = gem.description
13
+ gem.files = `git ls-files`.split($\)
14
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
15
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
16
+ gem.require_paths = ["lib"]
17
+ gem.add_dependency "fluentd", ">= 0.10.30"
18
+ gem.add_dependency "azure_mgmt_monitor", "~> 0.11.0"
19
+ gem.add_development_dependency "rake", ">= 0.9.2"
20
+ gem.add_development_dependency "test-unit", ">= 3.1.0"
21
+ gem.license = 'MIT'
22
+ end
@@ -0,0 +1,135 @@
1
+ require 'fluent/input'
2
+ require 'azure_mgmt_monitor'
3
+ require 'uri'
4
+
5
+ class Fluent::AzureMonitorMetricsInput < Fluent::Input
6
+ Fluent::Plugin.register_input("azuremonitormetrics", self)
7
+
8
+ # To support log_level option implemented by Fluentd v0.10.43
9
+ unless method_defined?(:log)
10
+ define_method("log") { $log }
11
+ end
12
+
13
+ # Define `router` method of v0.12 to support v0.10 or earlier
14
+ unless method_defined?(:router)
15
+ define_method("router") { Fluent::Engine }
16
+ end
17
+
18
+ config_param :tag, :string
19
+ config_param :tenant_id, :string, :default => nil
20
+ config_param :client_id, :string, :default => nil
21
+ config_param :client_secret, :string, :default => nil, :secret => true
22
+
23
+ config_param :timespan, :integer, :default => 300
24
+ config_param :interval, :string, :default => "PT1M"
25
+ config_param :resource_uri, :string, :default => nil
26
+ config_param :aggregation, :string, :default => nil
27
+ config_param :top, :integer, :default => nil
28
+ config_param :orderby, :string, :default => nil
29
+ config_param :filter, :string, :default => nil
30
+ config_param :result_type, :string, :default => nil
31
+ config_param :metric, :string, :default => nil
32
+ config_param :api_version, :string, :default => "2017-05-01-preview"
33
+
34
+ def initialize
35
+ super
36
+ end
37
+
38
+ def configure(conf)
39
+ super
40
+
41
+ provider = MsRestAzure::ApplicationTokenProvider.new(@tenant_id, @client_id, @client_secret)
42
+ credentials = MsRest::TokenCredentials.new(provider)
43
+ @client = Azure::ARM::Monitor::MonitorManagementClient.new(credentials);
44
+ end
45
+
46
+ def start
47
+ super
48
+ @watcher = Thread.new(&method(:watch))
49
+ end
50
+
51
+ def shutdown
52
+ super
53
+ @watcher.terminate
54
+ @watcher.join
55
+ end
56
+
57
+ def set_path_options(timespan, custom_headers)
58
+ fail ArgumentError, 'timespan is nil' if timespan.nil?
59
+ request_headers = {}
60
+
61
+ # Set Headers
62
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
63
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
64
+
65
+ {
66
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
67
+ path_params: {'resourceUri' => @resource_uri},
68
+ query_params: {'api-version' => @api_version,
69
+ 'timespan' => timespan,
70
+ 'interval' => @interval,
71
+ 'aggregation' => @aggregation,
72
+ '$top' => @top,
73
+ '$orderby' => @orderby,
74
+ '$filter' => @filter,
75
+ 'resultType' => @result_type,
76
+ 'metric' => @metric},
77
+ headers: request_headers.merge(custom_headers || {}),
78
+ base_url: @client.base_url
79
+ }
80
+ end
81
+
82
+ private
83
+
84
+ def watch
85
+ log.debug "azure monitor metrics: watch thread starting"
86
+ @next_fetch_time = Time.now
87
+
88
+ until @finished
89
+ start_time = @next_fetch_time - @timespan
90
+ end_time = @next_fetch_time
91
+
92
+ log.debug "start time: #{start_time}, end time: #{end_time}"
93
+ timespan_string = "#{start_time.utc.iso8601}/#{end_time.utc.iso8601}"
94
+
95
+ monitor_metrics_promise = get_monitor_metrics_async(timespan_string)
96
+ monitor_metrics = monitor_metrics_promise.value!
97
+
98
+ router.emit(@tag, Time.now.to_i, monitor_metrics.body['value'])
99
+ @next_fetch_time += @timespan
100
+ sleep @timespan
101
+ end
102
+
103
+ end
104
+
105
+ def get_monitor_metrics_async(timespan,filter = nil, custom_headers = nil)
106
+ path_template = '/{resourceUri}/providers/microsoft.insights/metrics'
107
+
108
+ options = set_path_options(timespan, custom_headers)
109
+ promise = @client.make_request_async(:get, path_template, options)
110
+
111
+ promise = promise.then do |result|
112
+ http_response = result.response
113
+ status_code = http_response.status
114
+ response_content = http_response.body
115
+ unless status_code == 200
116
+ error_model = JSON.load(response_content)
117
+ log.error(error_model['error']['message'])
118
+ end
119
+
120
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
121
+ # Deserialize Response
122
+ if status_code == 200
123
+ begin
124
+ result.body = response_content.to_s.empty? ? nil : JSON.load(response_content)
125
+ rescue Exception => e
126
+ log.error("Error occurred in parsing the response")
127
+ end
128
+ end
129
+
130
+ result
131
+ end
132
+
133
+ promise.execute
134
+ end
135
+ end
data/test/helper.rb ADDED
@@ -0,0 +1,31 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ require 'fluent/input'
4
+
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require "test/unit"
13
+
14
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
15
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
16
+ require "fluent/test"
17
+ unless ENV.has_key?("VERBOSE")
18
+ nulllogger = Object.new
19
+ nulllogger.instance_eval {|obj|
20
+ def method_missing(method, *args)
21
+ #pass
22
+ end
23
+ }
24
+ $log = nulllogger
25
+ end
26
+
27
+ require "fluent/plugin/in_azuremonitormetrics"
28
+
29
+ class Test::Unit::TestCase
30
+ end
31
+
@@ -0,0 +1,62 @@
1
+ require 'helper'
2
+
3
+ class AzureMonitorMetricsInputTest < Test::Unit::TestCase
4
+ def setup
5
+ Fluent::Test.setup
6
+ end
7
+
8
+ ### for monitor metrics
9
+ CONFIG_MONITOR_METRICS = %[
10
+ tag azuremonitormetrics
11
+ tenant_id test_tenant_id
12
+ client_id test_client_id
13
+ client_secret test_client_secret
14
+
15
+ timespan 300
16
+ interval PT1M
17
+ resource_uri /subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default/providers/Microsoft.Insights/metrics/BlobCapacity
18
+ aggregation Average,count
19
+ top 20
20
+ orderby sum asc
21
+ filter A eq 'a1' and B eq '*'
22
+ result_type Success
23
+ metric Percentage CPU
24
+ api_version 2017-05-01-preview
25
+ ]
26
+
27
+ def create_driver_monitor_metrics(conf = CONFIG_MONITOR_METRICS)
28
+ Fluent::Test::InputTestDriver.new(Fluent::AzureMonitorMetricsInput).configure(conf)
29
+ end
30
+
31
+ def test_configure_monitor_metrics
32
+ d = create_driver_monitor_metrics
33
+ assert_equal 'azuremonitormetrics', d.instance.tag
34
+ assert_equal 'test_tenant_id', d.instance.tenant_id
35
+ assert_equal 'test_client_id', d.instance.client_id
36
+ assert_equal 300, d.instance.timespan
37
+ assert_equal 'PT1M', d.instance.interval
38
+ assert_equal '/subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default/providers/Microsoft.Insights/metrics/BlobCapacity', d.instance.resource_uri
39
+ assert_equal 'Average,count', d.instance.aggregation
40
+ assert_equal 20, d.instance.top
41
+ assert_equal 'sum asc', d.instance.orderby
42
+ assert_equal 'A eq \'a1\' and B eq \'*\'', d.instance.filter
43
+ assert_equal 'Success', d.instance.result_type
44
+ assert_equal 'Percentage CPU', d.instance.metric
45
+ assert_equal '2017-05-01-preview', d.instance.api_version
46
+ end
47
+
48
+ def test_set_query_options
49
+ d = create_driver_monitor_metrics
50
+ query_options = d.instance.set_path_options(d.instance.filter, {})
51
+ assert_equal '2017-05-01-preview', query_options[:query_params]['api-version']
52
+ assert_equal 'A eq \'a1\' and B eq \'*\'', query_options[:query_params]['$filter']
53
+ assert_equal 'Average,count', query_options[:query_params]['aggregation']
54
+ assert_equal 'PT1M', query_options[:query_params]['interval']
55
+ assert_equal 20, query_options[:query_params]['$top']
56
+ assert_equal 'sum asc', query_options[:query_params]['$orderby']
57
+ assert_equal 'Success', query_options[:query_params]['resultType']
58
+ assert_equal 'Percentage CPU', query_options[:query_params]['metric']
59
+ assert_equal '/subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default/providers/Microsoft.Insights/metrics/BlobCapacity', query_options[:path_params]['resourceUri']
60
+ end
61
+
62
+ end
metadata ADDED
@@ -0,0 +1,120 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fluent-plugin-azuremonitormetrics
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Ilana Kantorov
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-10-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: fluentd
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 0.10.30
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 0.10.30
27
+ - !ruby/object:Gem::Dependency
28
+ name: azure_mgmt_monitor
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.11.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.11.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: 0.9.2
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 0.9.2
55
+ - !ruby/object:Gem::Dependency
56
+ name: test-unit
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: 3.1.0
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: 3.1.0
69
+ description: Input plugin for Azure Monitor Metrics.
70
+ email:
71
+ - ilanak@microsoft.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - ".bundle/config"
77
+ - ".idea/.rakeTasks"
78
+ - ".idea/fluent-plugin-azuremonitormetrics.iml"
79
+ - ".idea/inspectionProfiles/Project_Default.xml"
80
+ - ".idea/misc.xml"
81
+ - ".idea/modules.xml"
82
+ - ".idea/vcs.xml"
83
+ - ".idea/workspace.xml"
84
+ - Gemfile
85
+ - Gemfile.fluentd.0.12
86
+ - Gemfile.lock
87
+ - LICENSE
88
+ - README.md
89
+ - Rakefile
90
+ - fluent-plugin-azuremonitormetrics.gemspec
91
+ - lib/fluent/plugin/in_azuremonitormetrics.rb
92
+ - test/helper.rb
93
+ - test/plugin/test_in_azuremonitormetrics.rb
94
+ homepage: https://github.com/Ilanak/fluent-plugin-azuremonitormetrics
95
+ licenses:
96
+ - MIT
97
+ metadata: {}
98
+ post_install_message:
99
+ rdoc_options: []
100
+ require_paths:
101
+ - lib
102
+ required_ruby_version: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ version: '0'
107
+ required_rubygems_version: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ requirements: []
113
+ rubyforge_project:
114
+ rubygems_version: 2.6.14
115
+ signing_key:
116
+ specification_version: 4
117
+ summary: Input plugin for Azure Monitor Metrics.
118
+ test_files:
119
+ - test/helper.rb
120
+ - test/plugin/test_in_azuremonitormetrics.rb