Skip to content

Commit 803cb80

Browse files
chore: update lts plugins schema (#92)
* update lts plugins schema * update dependencies
1 parent 1edf46e commit 803cb80

File tree

4 files changed

+297
-19
lines changed

4 files changed

+297
-19
lines changed

.github/workflows/ci.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Go
22
on:
3+
workflow_dispatch:
34
push:
45
branches: [main]
56
tags:
@@ -12,13 +13,13 @@ jobs:
1213
steps:
1314
# Checkout your project with git
1415
- name: Checkout
15-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1617

1718
# Install Go on the VM running the action.
1819
- name: Set up Go
19-
uses: actions/setup-go@v4
20+
uses: actions/setup-go@v5
2021
with:
21-
go-version: "^1.20"
22+
go-version: "^1.22"
2223

2324
# Install gotestfmt on the VM running the action.
2425
- name: Set up gotestfmt
@@ -28,11 +29,11 @@ jobs:
2829
- name: Run tests
2930
run: |
3031
set -euo pipefail
31-
go test -json -race -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt -hide all
32+
go test -json -fullpath -race -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt -hide all
3233
3334
# Upload the original go test log as an artifact for later review.
3435
- name: Upload test log
35-
uses: actions/upload-artifact@v3
36+
uses: actions/upload-artifact@v4
3637
if: always()
3738
with:
3839
name: test-log

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
module github.com/calyptia/go-fluentbit-config/v2
22

3-
go 1.20
3+
go 1.22
44

55
require (
6-
github.com/alecthomas/assert/v2 v2.3.0
7-
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df
6+
github.com/alecthomas/assert/v2 v2.9.0
7+
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
88
gopkg.in/yaml.v3 v3.0.1
99
)
1010

1111
require (
12-
github.com/alecthomas/repr v0.2.0 // indirect
12+
github.com/alecthomas/repr v0.4.0 // indirect
1313
github.com/hexops/gotextdiff v1.0.3 // indirect
1414
)

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
github.com/alecthomas/assert/v2 v2.3.0 h1:mAsH2wmvjsuvyBvAmCtm7zFsBlb8mIHx5ySLVdDZXL0=
2-
github.com/alecthomas/assert/v2 v2.3.0/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ=
3-
github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk=
4-
github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
1+
github.com/alecthomas/assert/v2 v2.9.0 h1:ZcLG8ccMEtlMLkLW4gwGpBWBb0N8MUCmsy1lYBVd1xQ=
2+
github.com/alecthomas/assert/v2 v2.9.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
3+
github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
4+
github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
55
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
66
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
7-
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME=
8-
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
7+
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM=
8+
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc=
99
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
1010
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
1111
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

schema.go

Lines changed: 281 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func (s Schema) findSections(kind SectionKind) ([]SchemaSection, bool) {
111111

112112
func (s *Schema) InjectLTSPlugins() {
113113
s.Inputs = append(s.Inputs, SchemaSection{
114-
// See https://github.com/calyptia/lts-advanced-plugin-s3-replay
114+
// See https://github.com/chronosphereio/calyptia-core-fluent-bit-s3-replay
115115
Type: "input",
116116
Name: "go-s3-replay-plugin",
117117
Description: "Calyptia LTS advanced plugin providing logs replay from s3",
@@ -147,12 +147,12 @@ func (s *Schema) InjectLTSPlugins() {
147147
},
148148
},
149149
}, SchemaSection{
150-
// See https://github.com/calyptia/lts-advanced-plugin-dummy
150+
// See https://github.com/chronosphereio/calyptia-core-fluent-bit-dummy
151151
Type: "input",
152152
Name: "gdummy",
153153
Description: "dummy GO!",
154154
}, SchemaSection{
155-
// See https://github.com/calyptia/lts-advanced-plugin-gsuite-reporter
155+
// See https://github.com/chronosphereio/calyptia-core-fluent-bit-gsuite-reporter
156156
Type: "input",
157157
Name: "gsuite-reporter",
158158
Description: "A Calyptia LTS advanced plugin providing activity streams from Gsuite",
@@ -204,7 +204,7 @@ func (s *Schema) InjectLTSPlugins() {
204204
},
205205
},
206206
}, SchemaSection{
207-
// See https://github.com/calyptia/core-fluent-bit-plugin-http-loader
207+
// See https://github.com/chronosphereio/calyptia-core-fluent-bit-plugin-http-loader
208208
Type: "input",
209209
Name: "http_loader",
210210
Description: "HTTP Loader plugin provides a way to load/dump data from a paginated HTTP endpoint.",
@@ -326,6 +326,46 @@ func (s *Schema) InjectLTSPlugins() {
326326
Description: "Controls when to stop collecting, supports templating. Defaults to never stop.",
327327
Default: "false",
328328
},
329+
{
330+
Name: "proxy",
331+
Type: "string",
332+
Description: "Proxy URL, allows comma separated list of URLs.",
333+
},
334+
{
335+
Name: "no_proxy",
336+
Type: "string",
337+
Description: "Exclude URLs from proxy, allows comma separated list of URLs.",
338+
},
339+
{
340+
Name: "tls_cert_file",
341+
Type: "string",
342+
Description: "TLS certificate file path.",
343+
},
344+
{
345+
Name: "tls_key_file",
346+
Type: "string",
347+
Description: "TLS key file path.",
348+
},
349+
{
350+
Name: "tls_cert",
351+
Type: "string",
352+
Description: "TLS certificate in PEM format.",
353+
},
354+
{
355+
Name: "tls_key",
356+
Type: "string",
357+
Description: "TLS key in PEM format.",
358+
},
359+
{
360+
Name: "ca_cert_file",
361+
Type: "string",
362+
Description: "CA certificate file path.",
363+
},
364+
{
365+
Name: "ca_cert",
366+
Type: "string",
367+
Description: "CA certificate in PEM format.",
368+
},
329369
{
330370
Name: "data_dir",
331371
Type: "string",
@@ -338,6 +378,243 @@ func (s *Schema) InjectLTSPlugins() {
338378
Description: "Controls for how much time data can be used after resume.",
339379
Default: "0s",
340380
},
381+
{
382+
Name: "store_response_body",
383+
Type: "string",
384+
Description: "JSON value to store as response body, supports templating.",
385+
Default: "{{toJson .Response.Body}}",
386+
},
387+
},
388+
},
389+
}, SchemaSection{
390+
// See https://github.com/chronosphereio/calyptia-core-fluent-bit-azure-event-grid
391+
Type: "input",
392+
Name: "azeventgrid",
393+
Description: "A Calyptia Core fluent-bit plugin providing input from Azure Event Grid.",
394+
Properties: SchemaProperties{
395+
Options: []SchemaOptions{
396+
{
397+
Name: "topicName",
398+
Type: "string",
399+
Description: "The name of the topic to subscribe to.",
400+
},
401+
{
402+
Name: "eventSubscriptionName",
403+
Type: "string",
404+
Description: "The name of the event subscription to subscribe to.",
405+
},
406+
{
407+
Name: "endpoint",
408+
Type: "string",
409+
Description: "The endpoint domain to use for the subscription.",
410+
},
411+
{
412+
Name: "key",
413+
Type: "string",
414+
Description: "The key to use to authenticate.",
415+
},
416+
},
417+
},
418+
}, SchemaSection{
419+
// See https://github.com/chronosphereio/calyptia-core-fluent-bit-aws-kinesis-stream-input
420+
Type: "input",
421+
Name: "aws_kinesis_stream",
422+
Description: "AWS Kinesis stream input plugin.",
423+
Properties: SchemaProperties{
424+
Options: []SchemaOptions{
425+
{
426+
Name: "aws_access_key_id",
427+
Type: "string",
428+
Description: "AWS access key ID.",
429+
},
430+
{
431+
Name: "aws_secret_access_key",
432+
Type: "string",
433+
Description: "AWS secret access key.",
434+
},
435+
{
436+
Name: "aws_region",
437+
Type: "string",
438+
Description: "AWS region.",
439+
},
440+
{
441+
Name: "stream_name",
442+
Type: "string",
443+
Description: "AWS Kinesis stream name.",
444+
},
445+
{
446+
Name: "empty_interval",
447+
Type: "string",
448+
Description: "Interval to wait for new records when the stream is empty, string duration.",
449+
Default: "10s",
450+
},
451+
{
452+
Name: "limit",
453+
Type: "integer",
454+
Description: "Maximum number of records to read per request, integer.",
455+
},
456+
{
457+
Name: "data_dir",
458+
Type: "string",
459+
Description: "Directory to store data. It holds a 1MB cache.",
460+
Default: "/data/storage",
461+
},
462+
},
463+
},
464+
}, SchemaSection{
465+
// See https://github.com/chronosphereio/calyptia-core-fluent-bit-azure-blob-input
466+
Type: "input",
467+
Name: "flb_core_fluent_bit_azure_blob",
468+
Description: "Calyptia LTS Azure Blob Storage Input Plugin",
469+
Properties: SchemaProperties{
470+
Options: []SchemaOptions{
471+
{
472+
Name: "account_name",
473+
Type: "string",
474+
Description: "Azure Storage Account Name",
475+
},
476+
{
477+
Name: "container",
478+
Type: "string",
479+
Description: "If set, the plugin will only read from this container. Otherwise, it will read from all containers in the account.",
480+
},
481+
{
482+
Name: "bucket",
483+
Type: "string",
484+
Description: "-",
485+
},
486+
},
487+
},
488+
}, SchemaSection{
489+
// See https://github.com/chronosphereio/calyptia-core-fluent-bit-plugin-input-s3-sqs
490+
Type: "input",
491+
Name: "s3_sqs",
492+
Description: "Calyptia LTS advanced plugin providing logs replay from sqs events",
493+
Properties: SchemaProperties{
494+
Options: []SchemaOptions{
495+
{
496+
Name: "delete_messages",
497+
Type: "boolean",
498+
Description: "If true, messages will be deleted from the queue after being processed.",
499+
Default: "true",
500+
},
501+
{
502+
Name: "aws_s3_role_arn",
503+
Type: "string",
504+
Description: "The role ARN to assume when reading from S3.",
505+
},
506+
{
507+
Name: "aws_s3_role_session_name",
508+
Type: "string",
509+
Description: "The session name to use when assuming the role.",
510+
},
511+
{
512+
Name: "aws_s3_role_external_id",
513+
Type: "string",
514+
Description: "The external ID to use when assuming the role.",
515+
},
516+
{
517+
Name: "aws_s3_role_duration",
518+
Type: "string",
519+
Description: "The duration to assume the role for, string duration.",
520+
},
521+
{
522+
Name: "aws_sqs_role_arn",
523+
Type: "string",
524+
Description: "The role ARN to assume when reading from SQS.",
525+
},
526+
{
527+
Name: "aws_sqs_role_session_name",
528+
Type: "string",
529+
Description: "The session name to use when assuming the role.",
530+
},
531+
{
532+
Name: "aws_sqs_role_external_id",
533+
Type: "string",
534+
Description: "The external ID to use when assuming the role.",
535+
},
536+
{
537+
Name: "aws_sqs_role_duration",
538+
Type: "string",
539+
Description: "The duration to assume the role for, string duration.",
540+
},
541+
{
542+
Name: "aws_access_key",
543+
Type: "string",
544+
Description: "AWS access key.",
545+
},
546+
{
547+
Name: "aws_secret_key",
548+
Type: "string",
549+
Description: "AWS secret key.",
550+
},
551+
{
552+
Name: "aws_bucket_name",
553+
Type: "string",
554+
Description: "AWS S3 bucket name.",
555+
},
556+
{
557+
Name: "aws_bucket_region",
558+
Type: "string",
559+
Description: "AWS S3 bucket region.",
560+
},
561+
{
562+
Name: "match_regexp",
563+
Type: "string",
564+
Description: "The regular expression to match against the SQS message body.",
565+
Default: ".*",
566+
},
567+
{
568+
Name: "aws_s3_enable_imds",
569+
Type: "boolean",
570+
Description: "If true, the plugin will use the Instance Metadata Service to retrieve credentials.",
571+
},
572+
{
573+
Name: "sqs_queue_name",
574+
Type: "string",
575+
Description: "The name of the SQS queue to read from.",
576+
},
577+
{
578+
Name: "sqs_queue_region",
579+
Type: "string",
580+
Description: "The region of the SQS queue to read from.",
581+
},
582+
{
583+
Name: "aws_sqs_endpoint",
584+
Type: "string",
585+
Description: "The endpoint to use when reading from SQS.",
586+
},
587+
{
588+
Name: "max_line_buffer_size",
589+
Type: "size",
590+
Description: "The maximum size of the line buffer, size.",
591+
Default: "10 MB",
592+
},
593+
{
594+
Name: "s3_read_concurrency",
595+
Type: "integer",
596+
Description: "The number of concurrent S3 reads, integer. Defaults to the number of CPUs.",
597+
},
598+
},
599+
},
600+
}, SchemaSection{
601+
// See https://github.com/chronosphereio/calyptia-core-fluent-bit-plugin-datagen
602+
Type: "input",
603+
Name: "datagen",
604+
Description: "Datagen input plugin generates fake logs at a given interval",
605+
Properties: SchemaProperties{
606+
Options: []SchemaOptions{
607+
{
608+
Name: "template",
609+
Type: "string",
610+
Description: "Golang template that evaluates into a JSON string.",
611+
},
612+
{
613+
Name: "rate",
614+
Type: "string",
615+
Description: "Duration rate at which records are produced.",
616+
Default: "1s",
617+
},
341618
},
342619
},
343620
})

0 commit comments

Comments
 (0)