fluent-diagtool 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 180c7e58ee03d59778640b05042fca84197936b7bdd2b2fff236ef86f0639ef4
4
- data.tar.gz: b1ffccfb3a92af08dfa17fe4796e7a229a25d0abe1bf0f1362ac4618bf5c99f0
3
+ metadata.gz: 614c1b026136b0743f9c6439b6dd2349adbe9edf3cdb2d77e1ab78698a9d9e49
4
+ data.tar.gz: a2228adc3509363ba6bf8f4ddee4d6b1f3feaef2088452a5c69e72057eac2336
5
5
  SHA512:
6
- metadata.gz: b482bfc75cda3285976980d2f8a04abfe848dd9bb6ff4992c0760f871f237811fbae361dfb15075482a781ec284974d7471937423e3400f0b576bc3dff03ccf0
7
- data.tar.gz: 5810ec1b6f37b5ccf49f53bd8271beb885dde8c7b9e8be33aed38b5d137e8952085aaddbb8b7717e58535bd36decd19e1babde94a2ba78d07ba41d1ffd0cf9c5
6
+ metadata.gz: af815f59c3ed5492175d5fe988eb6eb33fae556b4a2fcd6a20cf89e7e71aa1db92438f7ec1002c08e7f00d59099f91b2d8764f91b18cfb52593c81c5ae89f8e4
7
+ data.tar.gz: c7adc36937ba9e1b74a2914a6c2fdf41a6f44dfbd155aa3eb99cf59126022280461a38972eb45f0f486e639b701db6ea7d1c3ec2de73893dd6c982ea9dde8f0c
data/README.md CHANGED
@@ -17,8 +17,7 @@ The scope of data collection:
17
17
  - snapshot of current process(ps)
18
18
  - network conectivity status/stats(netstat -plan/netstat -s)
19
19
  - memory information(/proc/meminfo)
20
- <br>
21
- (*) The diagtool automatically gather the path of td-agent configuration files and log files from td-agent daemon and use them during data collection.
20
+ <br>
22
21
 
23
22
  ## Prerequisite
24
23
  The diagtool provides support for td-agent based installation running on Linux OS. The td-agent is a stable distribution package of Fluentd.
@@ -43,13 +42,46 @@ Successfully installed fluent-diagtool-0.1.2
43
42
  ```
44
43
  # diagtool --help
45
44
  Usage: /usr/local/bin/diagtool -o OUTPUT_DIR -m {yes | no} -w {word1,[word2...]} -f {listfile} -s {hash seed}
45
+ --precheck Run Precheck (Optional)
46
46
  -o, --output DIR Output directory (Mandatory)
47
47
  -m, --mask yes|no Enable mask function (Optional : Default=no)
48
48
  -w, --word-list word1,word2 Provide a list of user-defined words which will to be masked (Optional : Default=None)
49
- -f, --word-file listfile provide a file which describes a List of user-defined words (Optional : Default=None)
49
+ -f, --word-file list_file provide a file which describes a List of user-defined words (Optional : Default=None)
50
50
  -s, --hash-seed seed provide a word which will be used when generate the mask (Optional : Default=None)
51
+ -c, --conf config_file provide a full path of td-agent configuration file (Optional : Default=None)
52
+ -l, --log log_file provide a full path of td-agent log file (Optional : Default=None)
51
53
  ```
52
- The list of user-defined words can be specified both -e option and -f option.
54
+ ### Pre-check
55
+ The diagtool automatically extract the path of td-agent configuration and log files from td-agent daemon and use them during data collection if the td-agent is managed as daemon. The precheck options provides the function to confirm if the diagtool could gather the td-agent information as expected.
56
+ The following command output shows the case when the diagtool successfully gather information from daemon.
57
+ ```
58
+ # diagtool --precheck
59
+ 2020-05-28 00:39:02 -0400: [Diagtool] [INFO] [Precheck] Check OS parameters...
60
+ 2020-05-28 00:39:02 -0400: [Diagtool] [INFO] [Precheck] operating system = CentOS Linux 8 (Core)
61
+ 2020-05-28 00:39:02 -0400: [Diagtool] [INFO] [Precheck] kernel version = Linux 4.18.0-147.el8.x86_64
62
+ 2020-05-28 00:39:02 -0400: [Diagtool] [INFO] [Precheck] Check td-agent parameters...
63
+ 2020-05-28 00:39:02 -0400: [Diagtool] [INFO] [Precheck] td-agent conf path = /etc/td-agent/
64
+ 2020-05-28 00:39:02 -0400: [Diagtool] [INFO] [Precheck] td-agent conf file = td-agent.conf
65
+ 2020-05-28 00:39:02 -0400: [Diagtool] [INFO] [Precheck] td-agent log path = /var/log/td-agent/
66
+ 2020-05-28 00:39:02 -0400: [Diagtool] [INFO] [Precheck] td-agent log = td-agent.log
67
+ 2020-05-28 00:39:02 -0400: [Diagtool] [INFO] [Precheck] Precheck completed. You can run diagtool command without -c and -l options
68
+ ```
69
+ In some cases, users do not manage td-agent as daemon but use own script to run td-agent with command line options. In that cases, users need to speccify the path of td-agent configuration and log files with -c and -l options respectively.
70
+ The following example shows the precheck results when the diagtool is not able to extract the path of td-agent configuration and log files.
71
+ ```
72
+ # diagtool --precheck
73
+ 2020-05-28 05:45:14 +0000: [Diagtool] [INFO] [Precheck] Check OS parameters...
74
+ 2020-05-28 05:45:14 +0000: [Diagtool] [INFO] [Precheck] operating system = CentOS Linux 8 (Core)
75
+ 2020-05-28 05:45:14 +0000: [Diagtool] [INFO] [Precheck] kernel version = Linux 4.18.0-147.5.1.el8_1.x86_64
76
+ 2020-05-28 05:45:14 +0000: [Diagtool] [INFO] [Precheck] Check td-agent parameters...
77
+ 2020-05-28 05:45:14 +0000: [Diagtool] [INFO] [Precheck] td-agent conf path =
78
+ 2020-05-28 05:45:14 +0000: [Diagtool] [INFO] [Precheck] td-agent conf file =
79
+ 2020-05-28 05:45:14 +0000: [Diagtool] [INFO] [Precheck] td-agent log path =
80
+ 2020-05-28 05:45:14 +0000: [Diagtool] [INFO] [Precheck] td-agent log =
81
+ 2020-05-28 05:45:14 +0000: [Diagtool] [WARN] [Precheck] can not find td-agent conf path: please run diagtool command with -c /path/to/<td-agent conf file>
82
+ 2020-05-28 05:45:14 +0000: [Diagtool] [WARN] [Precheck] can not find td-agent log path: please run diagtool command with -l /path/to/<td-agent log file>
83
+ ```
84
+ The user-defined words can be specified both -e option and -f option and the words are merged when both options are selected.
53
85
  The format of user-defined words list file specified in -f option should be followed format.
54
86
  ```
55
87
  # cat word_list_sample
@@ -58,6 +90,7 @@ centos8102
58
90
  ```
59
91
  NOTE: When user specified the keywork, only the exact match words will be masked. For instance, when users like to mask words like "nginx1" and "nginx2", users need to specify "nginx1" and "nginx2" respectively and "nginx*" should not work in the tool.
60
92
 
93
+ ### Run diagtool
61
94
  #### Command sample:
62
95
  ```
63
96
  # diagtool -o /tmp/work1 -w passwd1,passwd2 -f word_list_sample -m yes
@@ -19,6 +19,6 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_runtime_dependency("fileutils", ["~> 1.0"])
23
- spec.add_runtime_dependency("json", ["~> 2.1"])
22
+ spec.add_runtime_dependency("fileutils")
23
+ spec.add_runtime_dependency("json")
24
24
  end
@@ -1,5 +1,5 @@
1
1
  module Fluent
2
2
  module Diagtool
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-diagtool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - kubotat
@@ -14,30 +14,30 @@ dependencies:
14
14
  name: fileutils
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.0'
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.0'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: json
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '2.1'
33
+ version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '2.1'
40
+ version: '0'
41
41
  description: Bringing productivity of trouble shooting to the next level by automating
42
42
  collection of Fluentd configurations, settings and OS parameters as well as masking
43
43
  sensitive information in logs and configurations.