fluent-plugin-barito 0.5.1 → 0.6.0

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
  SHA256:
3
- metadata.gz: 77b08876975a60787f945406ceef1c8c6885d6c14e9fce2f780e2a11aced749d
4
- data.tar.gz: 3422b7d24b4c836dce95fd5987e793ca798fff91691dcf256ff2835253c1f558
3
+ metadata.gz: 719527a2ab4a017c80796cc56f4ca5ec8b175e0f90d52c5b6f4fe9df56aa0c94
4
+ data.tar.gz: 12e76e2d75a6cff94e8d45abff5a4bfb99ed56b9af8713a80fa217950b29998c
5
5
  SHA512:
6
- metadata.gz: 9eeb839e61e1a6cfb1eb8223138873e58063e7d546b2106d51dddceb063e1ae8894d8d23782081f3184e4adad8dcd4afc53632fec7d0371651b0c1739e4f42d8
7
- data.tar.gz: 85657a49d27eeae2f4928c13c686e586d5349a31e62897a6b8e84687e5b8ef1b374b4c6b7951bfe8da8597f35325919d032188a35b7d85849f0d7d0208ab19a0
6
+ metadata.gz: 962ee85f1604ccff8669ee697fa9712f0196f7878d261d59a5576b55328e7ae1815d22b417842795841ade3cbe39610aa8cbcd786cd1e3047117699ddc10f7f3
7
+ data.tar.gz: b5b141cb68df817e293d4f42214a3b3eda09ab158c30193bd3961e527fe1e0d7363691fe9e290b6080c8ec50c167329477042210b976971b650ecbe0298b657a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ **0.6.0**
4
+
5
+ - put the actual log time on timber[@timestamp] record
6
+
3
7
  **0.5.1**
4
8
 
5
9
  - rename extralabels field to `additional_labels`
data/README.md CHANGED
@@ -4,12 +4,16 @@
4
4
 
5
5
  [Fluentd](https://fluentd.org/) output plugin for [BaritoLog](https://github.com/BaritoLog).
6
6
 
7
+ ## Overview
8
+
9
+ This Fluentd plugin enables you to send logs directly to Barito Log infrastructure. It supports both traditional VM deployments and Kubernetes environments with different output types optimized for each use case.
10
+
7
11
  ## Installation
8
12
 
9
13
  ### RubyGems
10
14
 
11
- ```
12
- $ gem install fluent-plugin-barito
15
+ ```bash
16
+ gem install fluent-plugin-barito
13
17
  ```
14
18
 
15
19
  ### Bundler
@@ -22,27 +26,41 @@ gem 'fluent-plugin-barito'
22
26
 
23
27
  And then execute:
24
28
 
25
- ```
26
- $ bundle
29
+ ```bash
30
+ bundle install
27
31
  ```
28
32
 
29
33
  ## Configuration
30
34
 
31
35
  You can generate configuration template:
32
36
 
37
+ ```bash
38
+ fluent-plugin-config-format output barito
33
39
  ```
34
- $ fluent-plugin-config-format output barito
35
- ```
36
40
 
37
- You can copy and paste generated documents here.
41
+ ### Configuration Parameters
42
+
43
+ Before configuring the plugin, you'll need to obtain the following from your Barito Market:
38
44
 
39
- ### Fluentd configuration example
45
+ - **Application Group Secret**: Your unique application group identifier
46
+ - **Produce URL**: The endpoint URL for sending logs to Barito
47
+ - **Application Name**: Your application identifier (for Kubernetes deployments)
48
+ - **Cluster Name**: Your cluster identifier (for Kubernetes deployments)
40
49
 
41
- ## Without Kubernetes
50
+ ## Plugin Types
42
51
 
43
- Use type `barito_vm` for deployment without kubernetes
52
+ ### VM/Traditional Deployment Configuration
44
53
 
45
- ```conf
54
+ For traditional VM deployments where logs are sent individually.
55
+
56
+ **Required Parameters:**
57
+
58
+ - `application_secret`: Your application group secret from Barito Market
59
+ - `produce_url`: The produce endpoint URL from Barito Market
60
+
61
+ Use type `barito_vm` for deployment without Kubernetes:
62
+
63
+ ```xml
46
64
  <source>
47
65
  @type tail
48
66
  tag "barito"
@@ -63,10 +81,21 @@ Use type `barito_vm` for deployment without kubernetes
63
81
  </match>
64
82
  ```
65
83
 
66
- ## With Kubernetes
67
- Change type to `barito_batch_k8s`.
84
+ ### Kubernetes Deployment Configuration
68
85
 
69
- ```
86
+ For Kubernetes deployments where logs are sent in batches for better performance.
87
+
88
+ **Required Parameters:**
89
+
90
+ - `name`: Container name identifier
91
+ - `cluster_name`: Your cluster name
92
+ - `application_name`: Your application name
93
+ - `application_group_secret`: Your application group secret from Barito Market
94
+ - `produce_url`: The batch produce endpoint URL from Barito Market
95
+
96
+ Use type `barito_batch_k8s` for Kubernetes environments:
97
+
98
+ ```xml
70
99
  <match kubernetes.var.log.containers.server-**.log>
71
100
  @type barito_batch_k8s
72
101
  name test_container
@@ -90,8 +119,33 @@ Change type to `barito_batch_k8s`.
90
119
  </match>
91
120
  ```
92
121
 
93
- ## Copyright
122
+ ## Troubleshooting
123
+
124
+ ### Common Issues
125
+
126
+ 1. **Connection refused**: Verify the `produce_url` is correct and accessible
127
+ 2. **Authentication failed**: Check your `application_group_secret` is valid
128
+ 3. **Buffer overflow**: Adjust buffer settings based on your log volume
129
+
130
+ ### Debug Mode
131
+
132
+ Add the following to your Fluentd configuration for debug logging:
133
+
134
+ ```xml
135
+ <system>
136
+ log_level debug
137
+ </system>
138
+ ```
139
+
140
+ ## Contributing
141
+
142
+ 1. Fork the repository
143
+ 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
144
+ 3. Commit your changes (`git commit -am 'Add some amazing feature'`)
145
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
146
+ 5. Open a Pull Request
147
+
148
+ ## License
94
149
 
95
- * Copyright(c) 2018- BaritoLog
96
- * License
97
- * Apache License, Version 2.0
150
+ - Copyright(c) 2018-2025 BaritoLog
151
+ - License: Apache License, Version 2.0
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "fluent-plugin-barito"
6
- spec.version = "0.5.1"
6
+ spec.version = "0.6.0"
7
7
  spec.authors = ["BaritoLog"]
8
8
  spec.email = ["fadli.nurhasan@gmail.com", "gnu.iben@gmail.com"]
9
9
 
@@ -17,7 +17,13 @@ class Fluent::Plugin::TimberFactory
17
17
  # Capture default information
18
18
  message = record[MESSAGE_KEY] if record.is_a?(Hash) and record.has_key?(MESSAGE_KEY)
19
19
  client_trail = trail
20
- timestamp = Time.now.utc.strftime('%FT%TZ')
20
+
21
+ # Determine timestamp to use
22
+ # Default to 'time' variable (Fluentd event time) formatted as string
23
+ effective_timestamp = Time.at(time).utc.strftime('%FT%TZ')
24
+ if record.is_a?(Hash) && record.key?('time')
25
+ effective_timestamp = record['time'] # Use record['time'] if it exists (overrides default)
26
+ end
21
27
 
22
28
  if message.nil? or message.empty?
23
29
  message = record.to_s
@@ -26,7 +32,7 @@ class Fluent::Plugin::TimberFactory
26
32
 
27
33
  timber['tag'] = tag
28
34
  timber['@message'] = message
29
- timber['@timestamp'] = timestamp
35
+ timber['@timestamp'] = effective_timestamp
30
36
  timber['client_trail'] = client_trail.to_hash
31
37
 
32
38
  timber
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-barito
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - BaritoLog
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-10-28 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: bundler
@@ -126,22 +125,22 @@ dependencies:
126
125
  name: fluentd
127
126
  requirement: !ruby/object:Gem::Requirement
128
127
  requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: 0.12.0
132
128
  - - "~>"
133
129
  - !ruby/object:Gem::Version
134
130
  version: '0.12'
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ version: 0.12.0
135
134
  type: :runtime
136
135
  prerelease: false
137
136
  version_requirements: !ruby/object:Gem::Requirement
138
137
  requirements:
139
- - - ">="
140
- - !ruby/object:Gem::Version
141
- version: 0.12.0
142
138
  - - "~>"
143
139
  - !ruby/object:Gem::Version
144
140
  version: '0.12'
141
+ - - ">="
142
+ - !ruby/object:Gem::Version
143
+ version: 0.12.0
145
144
  - !ruby/object:Gem::Dependency
146
145
  name: rest-client
147
146
  requirement: !ruby/object:Gem::Requirement
@@ -192,7 +191,6 @@ homepage: https://github.com/BaritoLog/Barito-Fluent-Plugin
192
191
  licenses:
193
192
  - Apache-2.0
194
193
  metadata: {}
195
- post_install_message:
196
194
  rdoc_options: []
197
195
  require_paths:
198
196
  - lib
@@ -207,8 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
205
  - !ruby/object:Gem::Version
208
206
  version: '0'
209
207
  requirements: []
210
- rubygems_version: 3.0.3.1
211
- signing_key:
208
+ rubygems_version: 3.6.9
212
209
  specification_version: 4
213
210
  summary: Fluentd output plugin for BaritoLog
214
211
  test_files: