fluent-plugin-uipath-parser 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: a9b6241edc03355b60efc7d0e29a408ce38359f0
4
- data.tar.gz: 4f83cea943633858b68ca851f0d749aa461ffe5b
3
+ metadata.gz: d3ee85cbe70f690a08203df0021b50df5fef3f0d
4
+ data.tar.gz: e8e933f58df5fe5e89714fa01c8a930002dec1a2
5
5
  SHA512:
6
- metadata.gz: 81ef6e727bb6e37fda5d8cb85e6dc15499920a0c410080e3970c704118cb5df3c659efc2ab6fbf80f8bc85743d8379e87c0ba61f0b5b8201eb3cb9af66010cfa
7
- data.tar.gz: 9ff4d60885bb3f0b08ba0c9b0515ceaba70e04724d315827b7f17ecf6bd4316173fe454a150247b0b52bc15e04fbcbe44bd0298a7d5cbdb8a652ff8ce6dba7a3
6
+ metadata.gz: 3567b4a2a0d7c1d9405dcc6ad203b5e266d61867a0333e5b3e208b81b37daa8de5b03e801ebb48cde68700a310123004cadfea7c5af287545ee1173a21c7ad58
7
+ data.tar.gz: 6afbf2c292d50ab17c2a142146f5c31cc0e7cd84b6c016b1559db26d66885927d3bf12fac4508d94416ceeeb35bdeab66058fe3c0e0fc855ede77f8711407d1f
data/README.md CHANGED
@@ -1,43 +1,41 @@
1
1
  # Fluent::Plugin::Uipath::Parser
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/fluent/plugin/uipath/parser`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Fluentd Parser plugin to parse UiPath Robot execution log
6
4
 
7
5
  ## Installation
8
6
 
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'fluent-plugin-uipath-parser'
13
- ```
14
-
15
- And then execute:
16
-
17
- $ bundle
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install fluent-plugin-uipath-parser
7
+ install it yourself as:
22
8
 
23
- ## Usage
9
+ $ fluent-gem install fluent-plugin-uipath-parser
24
10
 
25
- TODO: Write usage instructions here
11
+ ## Configration
12
+ * **encoding** (string) (optional): Encoding of log file.
13
+ * Default value: Windows-31J.
26
14
 
27
- ## Development
15
+ ## Example Configuration
28
16
 
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
- ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/fluent-plugin-uipath-parser. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
17
+ ```
18
+ <source>
19
+ @type tail
20
+ path "#{ENV['LOCALAPPDATA']}/UiPath/Logs/%Y-%m-%d_Execution.log"
21
+ pos_file "#{ENV['LOCALAPPDATA']}/UiPath/Logs/Execution_log.pos"
22
+ format uipath
23
+ encoding Windows-31J
24
+ tag uipath
25
+ </source>
26
+
27
+ <match uipath>
28
+ @type s3
29
+ aws_key_id <AccessKey ID>
30
+ aws_sec_key <Seclet AccessKey>
31
+ s3_bucket <Bucket>
32
+ s3_region <Region>
33
+ path logs/
34
+ time_slice_format %Y%m%d/%Y%m%d-%H
35
+ time_slice_wait 5m
36
+ </match>
37
+ ```
36
38
 
37
39
  ## License
38
40
 
39
41
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
40
-
41
- ## Code of Conduct
42
-
43
- Everyone interacting in the Fluent::Plugin::Uipath::Parser project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/fluent-plugin-uipath-parser/blob/master/CODE_OF_CONDUCT.md).
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "fluent-plugin-uipath-parser"
7
- spec.version = "0.0.1"
7
+ spec.version = "0.0.2"
8
8
  spec.authors = ["Yoshihiko Miyaichi"]
9
9
  spec.email = ["miyaichi@gmail.com"]
10
10
 
@@ -4,17 +4,20 @@ module Fluent
4
4
  class TextParser
5
5
  class UiPathParser < Parser
6
6
  Plugin.register_parser('uipath', self)
7
+
8
+ desc 'Encoding of log file'
9
+ config_param :encoding, :string, default: 'Windows31_J'
7
10
 
8
11
  def initialize
9
12
  super
10
13
  require 'json'
11
14
  end
12
-
15
+
13
16
  def parse(text)
14
17
  time = Fluent::Engine.now
15
18
  record = { 'raw' => text }
16
19
 
17
- text = text.encode('UTF-16BE', 'UTF-8',
20
+ text = text.encode('UTF-16BE', @encoding,
18
21
  :invalid => :replace, :undef => :replace,
19
22
  :replace => '?').encode('UTF-8')
20
23
 
@@ -22,6 +25,7 @@ module Fluent
22
25
  record = JSON.parse(md[1])
23
26
  if record.has_key?('timeStamp')
24
27
  time = Time.parse(record['timeStamp']).to_i
28
+ record['timeStamp'] = time.to_json
25
29
  end
26
30
  end
27
31
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-uipath-parser
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
  - Yoshihiko Miyaichi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-03 00:00:00.000000000 Z
11
+ date: 2018-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -46,14 +46,12 @@ extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
48
  - .gitignore
49
- - CODE_OF_CONDUCT.md
50
49
  - Gemfile
51
50
  - LICENSE.txt
52
51
  - README.md
53
52
  - Rakefile
54
53
  - fluent-plugin-uipath-parser.gemspec
55
54
  - lib/fluent/plugin/parser_uipath.rb
56
- - lib/fluent/plugin/x
57
55
  homepage: https://github.com/miyaichi/fluent-plugin-uipath-parser
58
56
  licenses:
59
57
  - MIT
@@ -1,74 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at TODO: Write your email address. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [http://contributor-covenant.org/version/1/4][version]
72
-
73
- [homepage]: http://contributor-covenant.org
74
- [version]: http://contributor-covenant.org/version/1/4/
@@ -1 +0,0 @@
1
- 08:23:27.7513 Info {"message":"Weather #1 execution started","level":"Information","logType":"Default","timeStamp":"2018-05-30T08:23:27.6466358+09:00","fingerprint":"b7cdfe34-2207-47dd-ad15-d408deaf75e6","windowsIdentity":"BA\\miyaichi.yoshihiko","machineName":"MIYAICHI344-1","processName":"Weather #1","processVersion":"1.0.6723.31130","fileName":"Main","jobId":"ccbd0dad-acdb-48e4-a330-0571e8e48e71","robotName":"MIYAICHI344-1"}