From 35e3235faca85898b286577e2106ea52fb570a3b Mon Sep 17 00:00:00 2001 From: Joshua Williams Date: Wed, 8 Jul 2020 15:52:22 -0400 Subject: [PATCH 1/2] Renamed relevant files to carbon --- .circleci/config.yml | 8 +++--- .circleci/testdata/benchmark.yaml | 1 + .github/ISSUE_TEMPLATE.md | 2 +- CONTRIBUTING.md | 16 +++++------ Dockerfile | 16 +++++------ Makefile | 4 +-- README.md | 26 ++++++++--------- agent/agent.go | 8 +++--- agent/agent_test.go | 2 +- agent/config.go | 2 +- commands/default_paths.go | 2 +- commands/example_test.go | 2 +- commands/graph.go | 6 ++-- commands/offsets.go | 6 ++-- commands/offsets_test.go | 4 +-- commands/root.go | 4 +-- commands/service.go | 6 ++-- commands/version.go | 4 +-- docs/README.md | 4 +-- docs/plugins.md | 2 +- docs/types/severity.md | 2 +- examples/k8s/daemonset.yaml | 28 +++++++++---------- go.mod | 2 +- internal/testutil/plugin.go | 4 +-- internal/testutil/util.go | 2 +- main.go | 2 +- pipeline/config.go | 6 ++-- pipeline/config_test.go | 6 ++-- pipeline/node.go | 2 +- pipeline/pipeline.go | 4 +-- pipeline/pipeline_test.go | 4 +-- plugin/buffer/buffer.go | 6 ++-- plugin/buffer/buffer_test.go | 4 +-- plugin/buffer/memory_buffer.go | 2 +- plugin/buffer/memory_buffer_test.go | 4 +-- plugin/builtin/builtin.go | 8 +++--- plugin/builtin/input/file/file.go | 6 ++-- plugin/builtin/input/file/file_test.go | 8 +++--- plugin/builtin/input/file/read_to_end.go | 6 ++-- plugin/builtin/input/generate.go | 6 ++-- plugin/builtin/input/generate_test.go | 8 +++--- plugin/builtin/input/input.go | 2 +- plugin/builtin/input/journald.go | 6 ++-- plugin/builtin/input/journald_test.go | 8 +++--- plugin/builtin/input/tcp.go | 4 +-- plugin/builtin/input/tcp_test.go | 8 +++--- plugin/builtin/input/udp.go | 4 +-- plugin/builtin/input/udp_test.go | 8 +++--- plugin/builtin/output/drop.go | 6 ++-- plugin/builtin/output/drop_test.go | 2 +- plugin/builtin/output/elastic.go | 10 +++---- plugin/builtin/output/elastic_test.go | 2 +- plugin/builtin/output/file.go | 6 ++-- plugin/builtin/output/google_cloud.go | 10 +++---- plugin/builtin/output/google_cloud_test.go | 10 +++---- plugin/builtin/output/stdout.go | 6 ++-- plugin/builtin/output/stdout_test.go | 6 ++-- plugin/builtin/parser/json.go | 6 ++-- plugin/builtin/parser/json_test.go | 8 +++--- plugin/builtin/parser/regex.go | 6 ++-- plugin/builtin/parser/regex_test.go | 8 +++--- plugin/builtin/parser/severity.go | 8 +++--- plugin/builtin/parser/severity_test.go | 8 +++--- plugin/builtin/parser/syslog.go | 6 ++-- plugin/builtin/parser/syslog_test.go | 8 +++--- plugin/builtin/parser/time.go | 8 +++--- plugin/builtin/parser/time_test.go | 8 +++--- .../transformer/k8s_metadata_decorator.go | 8 +++--- .../k8s_metadata_decorator_test.go | 8 +++--- plugin/builtin/transformer/metadata.go | 8 +++--- plugin/builtin/transformer/metadata_test.go | 8 +++--- plugin/builtin/transformer/noop.go | 6 ++-- plugin/builtin/transformer/noop_test.go | 4 +-- plugin/builtin/transformer/rate_limit.go | 6 ++-- plugin/builtin/transformer/rate_limit_test.go | 8 +++--- plugin/builtin/transformer/restructure.go | 6 ++-- .../builtin/transformer/restructure_test.go | 8 +++--- plugin/builtin/transformer/router.go | 6 ++-- plugin/builtin/transformer/router_test.go | 8 +++--- plugin/custom.go | 2 +- plugin/helper/expr_string.go | 2 +- plugin/helper/expr_string_test.go | 2 +- plugin/helper/input.go | 6 ++-- plugin/helper/input_test.go | 4 +-- plugin/helper/output.go | 4 +-- plugin/helper/output_test.go | 4 +-- plugin/helper/parser.go | 6 ++-- plugin/helper/parser_test.go | 6 ++-- plugin/helper/persister.go | 2 +- plugin/helper/plugin.go | 4 +-- plugin/helper/plugin_test.go | 4 +-- plugin/helper/severity.go | 4 +-- plugin/helper/severity_builder.go | 4 +-- plugin/helper/time.go | 6 ++-- plugin/helper/transformer.go | 6 ++-- plugin/helper/transformer_test.go | 6 ++-- plugin/helper/writer.go | 6 ++-- plugin/helper/writer_test.go | 6 ++-- plugin/plugin.go | 2 +- scripts/unix-install.sh | 12 ++++---- scripts/windows-install.ps1 | 8 +++--- 101 files changed, 304 insertions(+), 303 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9cd26082d..2be4cbecf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -137,7 +137,7 @@ jobs: command: mkdir {bin,out,tmp} - run: name: Build Log Agent - command: go get -v -t -d ./... && go build -v -o ./bin/bplogagent ./ + command: go get -v -t -d ./... && go build -v -o ./bin/carbon ./ - run: name: Build Log Bench command: GOPROXY=direct go get github.com/observiq/amazon-log-agent-benchmark-tool/cmd/logbench/ && @@ -173,7 +173,7 @@ jobs: - run: name: Setup VM Workspace command: gcloud compute ssh << parameters.instance >> --ssh-key-file=~/.ssh/key --ssh-flag="-o LogLevel=QUIET" -- 'mkdir -p ~/benchmark/out' && - gcloud compute scp --ssh-key-file=~/.ssh/key ./bin/bplogagent << parameters.instance >>:~/benchmark/ && + gcloud compute scp --ssh-key-file=~/.ssh/key ./bin/carbon << parameters.instance >>:~/benchmark/ && gcloud compute scp --ssh-key-file=~/.ssh/key ./bin/logbench << parameters.instance >>:~/benchmark/ && gcloud compute scp --ssh-key-file=~/.ssh/key ./.circleci/testdata/benchmark.yaml << parameters.instance >>:~/benchmark/config.yaml && gcloud compute ssh << parameters.instance >> --ssh-key-file=~/.ssh/key --ssh-flag="-o LogLevel=QUIET" -- 'chmod -R 777 ~/benchmark' @@ -187,7 +187,7 @@ jobs: gcloud compute ssh << parameters.instance >> --ssh-key-file=~/.ssh/key --ssh-flag="-o LogLevel=QUIET" -- \ '~/benchmark/logbench -log $(echo stream{1..<< parameters.files >>}.log | tr " " ,) \ -rate << parameters.rate >> -t << parameters.duration >> -r 30s -f 2s -out ~/benchmark/out/results.json \ - ~/benchmark/bplogagent --database ~/benchmark/logagent.db --config ~/benchmark/config.yaml --cpu_profile ~/benchmark/out/cpu.pprof --cpu_profile_duration 30s \ + ~/benchmark/carbon --database ~/benchmark/logagent.db --config ~/benchmark/config.yaml --cpu_profile ~/benchmark/out/cpu.pprof --cpu_profile_duration 30s \ --mem_profile ~/benchmark/out/mem.pprof --mem_profile_delay 10s > ~/benchmark/out/notes 2>&1' - unless: condition: << parameters.profile >> @@ -198,7 +198,7 @@ jobs: gcloud compute ssh << parameters.instance >> --ssh-key-file=~/.ssh/key --ssh-flag="-o LogLevel=QUIET" -- \ '~/benchmark/logbench -log $(echo stream{1..<< parameters.files >>}.log | tr " " ,) \ -rate << parameters.rate >> -t << parameters.duration >> -r 30s -f 2s -out ~/benchmark/out/results.json \ - ~/benchmark/bplogagent --database ~/benchmark/logagent.db --config ~/benchmark/config.yaml > ~/benchmark/out/notes 2>&1' + ~/benchmark/carbon --database ~/benchmark/logagent.db --config ~/benchmark/config.yaml > ~/benchmark/out/notes 2>&1' - run: name: Retrieve Results diff --git a/.circleci/testdata/benchmark.yaml b/.circleci/testdata/benchmark.yaml index a051c0d7f..9f925214d 100644 --- a/.circleci/testdata/benchmark.yaml +++ b/.circleci/testdata/benchmark.yaml @@ -9,3 +9,4 @@ pipeline: type: google_cloud_output project_id: bplogagent-benchmark # credentials found automatically on gce instance + # TODO: replace project with carbon-benchmark? diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 285eddc3a..2c8a51aa3 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,7 +1,7 @@ # Description If reporting a bug, please fill out the following additional information: -- Version (`bplogagent version`): +- Version (`carbon version`): - OS version: - Config file: - Debug logs (use `--debug` flag): diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fc8ee676e..35cefaf20 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,34 +1,34 @@ -# Contributing to bplogagent +# Contributing to Carbon ## Development You can view and edit the source code by cloning this repository: ```bash -git clone https://github.com/observiq/bplogagent.git +git clone https://github.com/observiq/carbon.git ``` ## Pull Requests ### How to Send Pull Requests -Everyone is welcome to contribute code to `bplogagent` via +Everyone is welcome to contribute code to `carbon` via GitHub pull requests (PRs). To create a new PR, fork the project in GitHub and clone the upstream repo: ```sh -$ go get -d github.com/observiq/bplogagent +$ go get -d github.com/observiq/carbon ``` -This will put the project in `${GOPATH}/src/github.com/observiq/bplogagent`. You +This will put the project in `${GOPATH}/src/github.com/observiq/carbon`. You can alternatively use `git` directly with: ```sh -$ git clone https://github.com/observiq/bplogagent +$ git clone https://github.com/observiq/carbon ``` -This would put the project in the `bplogagent` directory in +This would put the project in the `carbon` directory in current working directory. Enter the newly created directory and add your fork as a new remote: @@ -49,7 +49,7 @@ $ git commit $ git push ``` -Open a pull request against the main `bplogagent` repo. +Open a pull request against the main `carbon` repo. ### How to Receive Comments diff --git a/Dockerfile b/Dockerfile index 45dbf2a02..602a25b7a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ FROM ubuntu:bionic -RUN mkdir -p /bplogagent_home/plugins -ENV BPLOGAGENT_HOME=/bplogagent_home -RUN echo "pipeline:\n" >> /bplogagent_home/config.yaml +RUN mkdir -p /carbon_home/plugins +ENV CARBON_HOME=/carbon_home +RUN echo "pipeline:\n" >> /carbon_home/config.yaml -COPY ./artifacts/bplogagent_linux_amd64 /bplogagent_home/bplogagent -ENTRYPOINT /bplogagent_home/bplogagent \ - --config /bplogagent_home/config.yaml \ - --database /bplogagent_home/bplogagent.db \ - --plugin_dir /bplogagent_home/plugins +COPY ./artifacts/carbon_linux_amd64 /carbon_home/carbon +ENTRYPOINT /carbon_home/carbon \ + --config /carbon_home/config.yaml \ + --database /carbon_home/carbon.db \ + --plugin_dir /carbon_home/plugins diff --git a/Makefile b/Makefile index e43124bda..485455f3f 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ GOARCH=$(shell go env GOARCH) GIT_SHA=$(shell git rev-parse --short HEAD) -BUILD_INFO_IMPORT_PATH=github.com/observiq/bplogagent/internal/version +BUILD_INFO_IMPORT_PATH=github.com/observiq/carbon/internal/version BUILD_X1=-X $(BUILD_INFO_IMPORT_PATH).GitHash=$(GIT_SHA) ifdef VERSION BUILD_X2=-X $(BUILD_INFO_IMPORT_PATH).Version=$(VERSION) @@ -30,7 +30,7 @@ generate: .PHONY: build build: - CGO_ENABLED=0 go build -o ./artifacts/observiq_logagent_$(GOOS)_$(GOARCH) $(BUILD_INFO) . + CGO_ENABLED=0 go build -o ./artifacts/carbon_$(GOOS)_$(GOARCH) $(BUILD_INFO) . .PHONY: install install: diff --git a/README.md b/README.md index 8fe8a150e..df49c0ebb 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,31 @@ -[![](https://circleci.com/gh/observIQ/observiq-logagent.svg?style=shield&circle-token=980a514f9dc5a48ac2b8e61a4cdb7555ea5646ca)](https://app.circleci.com/pipelines/github/observIQ/observiq-logagent) -[![codecov](https://codecov.io/gh/observIQ/observiq-logagent/branch/master/graph/badge.svg?token=i50h3UFXLg)](https://codecov.io/gh/observIQ/observiq-logagent) +[![](https://circleci.com/gh/observIQ/carbon.svg?style=shield&circle-token=980a514f9dc5a48ac2b8e61a4cdb7555ea5646ca)](https://app.circleci.com/pipelines/github/observIQ/carbon) +[![codecov](https://codecov.io/gh/observIQ/carbon/branch/master/graph/badge.svg?token=i50h3UFXLg)](https://codecov.io/gh/observIQ/carbon) -# observIQ Log Agent +# Carbon Log Agent ## How do I install the agent? #### Golang Project ```shell -go get github.com/observiq/observiq-logagent +go get github.com/observiq/carbon ``` #### Linux ```shell -sh -c "$(curl -fsSl https://github.com/observiq/observiq-logagent/releases/latest/download/unix-install.sh)" unix-install.sh +sh -c "$(curl -fsSl https://github.com/observiq/carbon/releases/latest/download/unix-install.sh)" unix-install.sh ``` #### Darwin ```shell -sh -c "$(curl -fsSl https://github.com/observiq/observiq-logagent/releases/latest/download/unix-install.sh)" unix-install.sh +sh -c "$(curl -fsSl https://github.com/observiq/carbon/releases/latest/download/unix-install.sh)" unix-install.sh ``` #### Windows ```pwsh -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; Invoke-Expression ((New-Object net.webclient).DownloadString('https://github.com/observiq/observiq-logagent/releases/latest/download/windows-install.ps1')); Log-Agent-Install +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; Invoke-Expression ((New-Object net.webclient).DownloadString('https://github.com/observiq/carbon/releases/latest/download/windows-install.ps1')); Log-Agent-Install ``` ## How do I run the agent? #### Manual ```shell # Example Command -observiq_logagent --config ./config.yaml --plugin_dir ./plugins +carbon --config ./config.yaml --plugin_dir ./plugins # Supported flags: --config The location of the agent config file @@ -37,18 +37,18 @@ observiq_logagent --config ./config.yaml --plugin_dir ./plugins #### Linux ```shell # systemd -systemctl start observiq_logagent +systemctl start carbon_log_agent # sysv -service observiq_logagent start +service carbon_log_agent start ``` #### Darwin ```shell -launchctl start com.observiq.observiq_logagent +launchctl start com.observiq.carbon_log_agent ``` #### Windows ```pwsh -Start-Service -Name "observiq-logagent" +Start-Service -Name "carbon_log_agent" ``` ## How do I configure the agent? @@ -73,7 +73,7 @@ pipeline: If you have [`graphviz`](https://graphviz.org/) installed, you can view the plugin graph with a command like: ```bash -observiq_logagent graph --config './config.yaml' | dot -Tsvg -o /tmp/graph.svg && open /tmp/graph.svg +carbon graph --config './config.yaml' | dot -Tsvg -o /tmp/graph.svg && open /tmp/graph.svg ``` ## What is a plugin? diff --git a/agent/agent.go b/agent/agent.go index 1e2068a02..d33edab25 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -6,10 +6,10 @@ import ( "path/filepath" "time" - "github.com/observiq/bplogagent/errors" - "github.com/observiq/bplogagent/pipeline" - pg "github.com/observiq/bplogagent/plugin" - _ "github.com/observiq/bplogagent/plugin/builtin" // register plugins + "github.com/observiq/carbon/errors" + "github.com/observiq/carbon/pipeline" + pg "github.com/observiq/carbon/plugin" + _ "github.com/observiq/carbon/plugin/builtin" // register plugins "go.etcd.io/bbolt" "go.uber.org/zap" ) diff --git a/agent/agent_test.go b/agent/agent_test.go index 83f40977a..dd4ad3665 100644 --- a/agent/agent_test.go +++ b/agent/agent_test.go @@ -6,7 +6,7 @@ import ( "runtime" "testing" - "github.com/observiq/bplogagent/internal/testutil" + "github.com/observiq/carbon/internal/testutil" "github.com/stretchr/testify/require" ) diff --git a/agent/config.go b/agent/config.go index 210c09896..ca1cf6667 100644 --- a/agent/config.go +++ b/agent/config.go @@ -5,7 +5,7 @@ import ( "io/ioutil" "path/filepath" - "github.com/observiq/bplogagent/pipeline" + "github.com/observiq/carbon/pipeline" yaml "gopkg.in/yaml.v2" ) diff --git a/commands/default_paths.go b/commands/default_paths.go index 1c682d66f..3d954395c 100644 --- a/commands/default_paths.go +++ b/commands/default_paths.go @@ -8,7 +8,7 @@ import ( "strings" ) -var agentName = "bplogagent" +var agentName = "carbon" func defaultPluginDir() string { if stat, err := os.Stat("./plugins"); err == nil { diff --git a/commands/example_test.go b/commands/example_test.go index 0e306b187..2f0d2e9c6 100644 --- a/commands/example_test.go +++ b/commands/example_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/observiq/bplogagent/plugin/builtin/output" + "github.com/observiq/carbon/plugin/builtin/output" "github.com/stretchr/testify/require" ) diff --git a/commands/graph.go b/commands/graph.go index 4a0f5dbe5..60f7a448f 100644 --- a/commands/graph.go +++ b/commands/graph.go @@ -3,9 +3,9 @@ package commands import ( "os" - "github.com/observiq/bplogagent/agent" - "github.com/observiq/bplogagent/plugin" - pg "github.com/observiq/bplogagent/plugin" + "github.com/observiq/carbon/agent" + "github.com/observiq/carbon/plugin" + pg "github.com/observiq/carbon/plugin" "github.com/spf13/cobra" "go.uber.org/zap" "go.uber.org/zap/zapcore" diff --git a/commands/offsets.go b/commands/offsets.go index 9c0ad77e0..c7fb7f531 100644 --- a/commands/offsets.go +++ b/commands/offsets.go @@ -5,8 +5,8 @@ import ( "io" "os" - agent "github.com/observiq/bplogagent/agent" - "github.com/observiq/bplogagent/plugin/helper" + agent "github.com/observiq/carbon/agent" + "github.com/observiq/carbon/plugin/helper" "github.com/spf13/cobra" "go.etcd.io/bbolt" ) @@ -19,7 +19,7 @@ func NewOffsetsCmd(rootFlags *RootFlags) *cobra.Command { Short: "Manage input plugin offsets", Args: cobra.NoArgs, Run: func(command *cobra.Command, args []string) { - stdout.Write([]byte("No offsets subcommand specified. See `bplogagent offsets help` for details\n")) + stdout.Write([]byte("No offsets subcommand specified. See `carbon offsets help` for details\n")) }, } diff --git a/commands/offsets_test.go b/commands/offsets_test.go index b7d1c7a25..a84a12e09 100644 --- a/commands/offsets_test.go +++ b/commands/offsets_test.go @@ -7,8 +7,8 @@ import ( "path/filepath" "testing" - agent "github.com/observiq/bplogagent/agent" - "github.com/observiq/bplogagent/plugin/helper" + agent "github.com/observiq/carbon/agent" + "github.com/observiq/carbon/plugin/helper" "github.com/stretchr/testify/require" "go.etcd.io/bbolt" ) diff --git a/commands/root.go b/commands/root.go index 668baa798..1423d6020 100644 --- a/commands/root.go +++ b/commands/root.go @@ -12,7 +12,7 @@ import ( "sync" "time" - agent "github.com/observiq/bplogagent/agent" + agent "github.com/observiq/carbon/agent" "github.com/spf13/cobra" "go.uber.org/zap" "go.uber.org/zap/zapcore" @@ -36,7 +36,7 @@ func NewRootCmd() *cobra.Command { rootFlags := &RootFlags{} root := &cobra.Command{ - Use: "bplogagent [-c ./config.yaml]", + Use: "carbon [-c ./config.yaml]", Short: "A log parser and router", Long: "A log parser and router", Args: cobra.NoArgs, diff --git a/commands/service.go b/commands/service.go index a062f0198..80950096e 100644 --- a/commands/service.go +++ b/commands/service.go @@ -7,7 +7,7 @@ import ( "syscall" "github.com/kardianos/service" - "github.com/observiq/bplogagent/agent" + "github.com/observiq/carbon/agent" "go.uber.org/zap" ) @@ -39,8 +39,8 @@ func (a *AgentService) Stop(s service.Service) error { func newAgentService(agent *agent.LogAgent, ctx context.Context, cancel context.CancelFunc) (service.Service, error) { agentService := &AgentService{cancel, agent} config := &service.Config{ - Name: "bplogagent", - DisplayName: "bplogagent", + Name: "carbon_log_agent", + DisplayName: "carbon_log_agent", Description: "Monitors and processes log entries", Option: service.KeyValue{ "RunWait": func() { diff --git a/commands/version.go b/commands/version.go index 39161401a..eeb9c93ee 100644 --- a/commands/version.go +++ b/commands/version.go @@ -1,7 +1,7 @@ package commands import ( - "github.com/observiq/bplogagent/internal/version" + "github.com/observiq/carbon/internal/version" "github.com/spf13/cobra" ) @@ -9,7 +9,7 @@ func NewVersionCommand() *cobra.Command { return &cobra.Command{ Use: "version", Args: cobra.NoArgs, - Short: "Print the bplogagent version", + Short: "Print the carbon version", Run: func(_ *cobra.Command, _ []string) { if version.Version != "" { println(version.Version) diff --git a/docs/README.md b/docs/README.md index ecc555e9b..d27fa543f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ -# Bindplane Log Agent Documentation +# Carbon Log Agent Documentation -This repo contains documentation for the Bindplane Log Agent. +This repo contains documentation for the Carbon Log Agent. ## How do I configure the agent? The agent is configured using a YAML config file that is passed in using the `--config` flag. This file defines a collection of plugins beneath a top-level `plugins` key. Each plugin possesses a `type` and `id` field. diff --git a/docs/plugins.md b/docs/plugins.md index 70731fa6b..d065a85cb 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -46,4 +46,4 @@ Plugins use Go's [`text/template`](https://golang.org/pkg/text/template/) packag the plugin configuration are available as variables in the templates except the `type` field. For the log agent to discover a plugin, it needs to be in the log agent's `plugin` directory. This can be set with the -`--plugin_dir` argument. For a default installation, the plugin directory is located at `$BPLOGAGENT_HOME/plugins`. +`--plugin_dir` argument. For a default installation, the plugin directory is located at `$CARBON_HOME/plugins`. diff --git a/docs/types/severity.md b/docs/types/severity.md index a8b6e13c7..388db12b1 100644 --- a/docs/types/severity.md +++ b/docs/types/severity.md @@ -1,6 +1,6 @@ ## Severity Parsing -`bplogagent` uses a flexible severity parsing system based on the integers 0 to 100. Standard severities are provided at multiples of 10. +`carbon` uses a flexible severity parsing system based on the integers 0 to 100. Standard severities are provided at multiples of 10. This severity system allows each output plugin to interpret the values 0 to 100 as appropriate for the corresponding backend. diff --git a/examples/k8s/daemonset.yaml b/examples/k8s/daemonset.yaml index 247eb21d9..260fed207 100644 --- a/examples/k8s/daemonset.yaml +++ b/examples/k8s/daemonset.yaml @@ -2,14 +2,14 @@ kind: ServiceAccount apiVersion: v1 metadata: - name: bplogagent-metadata + name: carbon-metadata namespace: default --- kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 # kubernetes versions before 1.8.0 should use rbac.authorization.k8s.io/v1beta1 metadata: - name: bplogagent-metadata + name: carbon-metadata namespace: default rules: - apiGroups: [""] @@ -21,19 +21,19 @@ rules: kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1beta1 metadata: - name: bplogagent-metadata + name: carbon-metadata roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: bplogagent-metadata + name: carbon-metadata subjects: - kind: ServiceAccount - name: bplogagent-metadata + name: carbon-metadata namespace: default --- kind: ConfigMap metadata: - name: bplogagent-config + name: carbon-config namespace: default apiVersion: v1 data: @@ -64,21 +64,21 @@ data: apiVersion: apps/v1 kind: DaemonSet metadata: - name: bplogagent + name: carbon namespace: default spec: selector: matchLabels: - name: bplogagent + name: carbon template: metadata: labels: - name: bplogagent + name: carbon spec: - serviceAccountName: bplogagent-metadata + serviceAccountName: carbon-metadata containers: - - name: bplogagent - image: observiq/bplogagent:0.0.0-alpha.1 + - name: carbon + image: observiq/carbon:0.0.0-alpha.1 imagePullPolicy: Always resources: limits: @@ -88,7 +88,7 @@ spec: memory: "250Mi" cpu: 100m volumeMounts: - - mountPath: /bplogagent_home/config.yaml + - mountPath: /carbon_home/config.yaml name: config subPath: config.yaml - mountPath: /var/log @@ -106,4 +106,4 @@ spec: path: /var/lib/docker/containers - name: config configMap: - name: bplogagent-config + name: carbon-config diff --git a/go.mod b/go.mod index e5b8d2640..9d04907b2 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/observiq/bplogagent +module github.com/observiq/carbon go 1.14 diff --git a/internal/testutil/plugin.go b/internal/testutil/plugin.go index d956134db..2e6d6f9bf 100644 --- a/internal/testutil/plugin.go +++ b/internal/testutil/plugin.go @@ -5,10 +5,10 @@ package testutil import ( context "context" - entry "github.com/observiq/bplogagent/entry" + entry "github.com/observiq/carbon/entry" mock "github.com/stretchr/testify/mock" - plugin "github.com/observiq/bplogagent/plugin" + plugin "github.com/observiq/carbon/plugin" zap "go.uber.org/zap" ) diff --git a/internal/testutil/util.go b/internal/testutil/util.go index 30b0e237d..e33744b50 100644 --- a/internal/testutil/util.go +++ b/internal/testutil/util.go @@ -6,7 +6,7 @@ import ( "path/filepath" "testing" - "github.com/observiq/bplogagent/plugin" + "github.com/observiq/carbon/plugin" "go.etcd.io/bbolt" "go.uber.org/zap/zaptest" ) diff --git a/main.go b/main.go index 8f182ce25..edfa6d572 100644 --- a/main.go +++ b/main.go @@ -3,7 +3,7 @@ package main import ( "os" - "github.com/observiq/bplogagent/commands" + "github.com/observiq/carbon/commands" ) func main() { diff --git a/pipeline/config.go b/pipeline/config.go index c55ac93c1..bc3cf36ba 100644 --- a/pipeline/config.go +++ b/pipeline/config.go @@ -4,9 +4,9 @@ import ( "fmt" "strings" - "github.com/observiq/bplogagent/errors" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/errors" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" yaml "gopkg.in/yaml.v2" ) diff --git a/pipeline/config_test.go b/pipeline/config_test.go index aa0e6a923..c50f442aa 100644 --- a/pipeline/config_test.go +++ b/pipeline/config_test.go @@ -4,9 +4,9 @@ import ( "fmt" "testing" - "github.com/observiq/bplogagent/plugin" - _ "github.com/observiq/bplogagent/plugin/builtin" - "github.com/observiq/bplogagent/plugin/builtin/transformer" + "github.com/observiq/carbon/plugin" + _ "github.com/observiq/carbon/plugin/builtin" + "github.com/observiq/carbon/plugin/builtin/transformer" "github.com/stretchr/testify/require" "go.uber.org/zap" ) diff --git a/pipeline/node.go b/pipeline/node.go index df94b3493..6b027f72b 100644 --- a/pipeline/node.go +++ b/pipeline/node.go @@ -3,7 +3,7 @@ package pipeline import ( "hash/fnv" - "github.com/observiq/bplogagent/plugin" + "github.com/observiq/carbon/plugin" ) // PluginNode is a basic node that represents a plugin in a pipeline. diff --git a/pipeline/pipeline.go b/pipeline/pipeline.go index c61bcbf7a..97d8d5251 100644 --- a/pipeline/pipeline.go +++ b/pipeline/pipeline.go @@ -3,8 +3,8 @@ package pipeline import ( "strings" - "github.com/observiq/bplogagent/errors" - "github.com/observiq/bplogagent/plugin" + "github.com/observiq/carbon/errors" + "github.com/observiq/carbon/plugin" "gonum.org/v1/gonum/graph/encoding/dot" "gonum.org/v1/gonum/graph/simple" "gonum.org/v1/gonum/graph/topo" diff --git a/pipeline/pipeline_test.go b/pipeline/pipeline_test.go index 296309f22..23ea62c12 100644 --- a/pipeline/pipeline_test.go +++ b/pipeline/pipeline_test.go @@ -3,8 +3,8 @@ package pipeline import ( "testing" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "gonum.org/v1/gonum/graph" diff --git a/plugin/buffer/buffer.go b/plugin/buffer/buffer.go index 7316422b7..cf7aedb88 100644 --- a/plugin/buffer/buffer.go +++ b/plugin/buffer/buffer.go @@ -5,9 +5,9 @@ import ( "fmt" "time" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/errors" - "github.com/observiq/bplogagent/plugin" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/errors" + "github.com/observiq/carbon/plugin" ) type Buffer interface { diff --git a/plugin/buffer/buffer_test.go b/plugin/buffer/buffer_test.go index 3f0e8024f..56d9601e9 100644 --- a/plugin/buffer/buffer_test.go +++ b/plugin/buffer/buffer_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/plugin" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/plugin" "github.com/stretchr/testify/require" "go.uber.org/zap" yaml "gopkg.in/yaml.v2" diff --git a/plugin/buffer/memory_buffer.go b/plugin/buffer/memory_buffer.go index fc4cca63b..1c4bf9eb2 100644 --- a/plugin/buffer/memory_buffer.go +++ b/plugin/buffer/memory_buffer.go @@ -7,7 +7,7 @@ import ( "time" "github.com/cenkalti/backoff/v4" - "github.com/observiq/bplogagent/entry" + "github.com/observiq/carbon/entry" "go.uber.org/zap" "google.golang.org/api/support/bundler" ) diff --git a/plugin/buffer/memory_buffer_test.go b/plugin/buffer/memory_buffer_test.go index 47b265ee5..9b563a996 100644 --- a/plugin/buffer/memory_buffer_test.go +++ b/plugin/buffer/memory_buffer_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/plugin" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/plugin" "github.com/stretchr/testify/require" "go.uber.org/zap" "go.uber.org/zap/zaptest" diff --git a/plugin/builtin/builtin.go b/plugin/builtin/builtin.go index b0f26cee5..694c54e92 100644 --- a/plugin/builtin/builtin.go +++ b/plugin/builtin/builtin.go @@ -2,8 +2,8 @@ package builtin import ( // Load embedded packages when importing builtin plugins - _ "github.com/observiq/bplogagent/plugin/builtin/input" - _ "github.com/observiq/bplogagent/plugin/builtin/output" - _ "github.com/observiq/bplogagent/plugin/builtin/parser" - _ "github.com/observiq/bplogagent/plugin/builtin/transformer" + _ "github.com/observiq/carbon/plugin/builtin/input" + _ "github.com/observiq/carbon/plugin/builtin/output" + _ "github.com/observiq/carbon/plugin/builtin/parser" + _ "github.com/observiq/carbon/plugin/builtin/transformer" ) diff --git a/plugin/builtin/input/file/file.go b/plugin/builtin/input/file/file.go index f20fccd66..b8df515bc 100644 --- a/plugin/builtin/input/file/file.go +++ b/plugin/builtin/input/file/file.go @@ -14,9 +14,9 @@ import ( "sync" "time" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" "go.uber.org/zap" ) diff --git a/plugin/builtin/input/file/file_test.go b/plugin/builtin/input/file/file_test.go index 211c7abc6..ed5a20b3b 100644 --- a/plugin/builtin/input/file/file_test.go +++ b/plugin/builtin/input/file/file_test.go @@ -11,10 +11,10 @@ import ( "testing" "time" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" diff --git a/plugin/builtin/input/file/read_to_end.go b/plugin/builtin/input/file/read_to_end.go index ab5fba472..62d724e84 100644 --- a/plugin/builtin/input/file/read_to_end.go +++ b/plugin/builtin/input/file/read_to_end.go @@ -6,9 +6,9 @@ import ( "fmt" "os" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/errors" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/errors" + "github.com/observiq/carbon/plugin/helper" ) func ReadToEnd(ctx context.Context, path string, startOffset int64, messenger fileUpdateMessenger, splitFunc bufio.SplitFunc, pathField *entry.Field, inputPlugin helper.InputPlugin, maxLogSize int) error { diff --git a/plugin/builtin/input/generate.go b/plugin/builtin/input/generate.go index a77d66b50..b96582363 100644 --- a/plugin/builtin/input/generate.go +++ b/plugin/builtin/input/generate.go @@ -6,9 +6,9 @@ import ( "sync" "time" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" ) func init() { diff --git a/plugin/builtin/input/generate_test.go b/plugin/builtin/input/generate_test.go index 3efff00d8..b81b225b4 100644 --- a/plugin/builtin/input/generate_test.go +++ b/plugin/builtin/input/generate_test.go @@ -5,10 +5,10 @@ import ( "text/template" "time" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) diff --git a/plugin/builtin/input/input.go b/plugin/builtin/input/input.go index 6c20fa2b9..350a6cf1f 100644 --- a/plugin/builtin/input/input.go +++ b/plugin/builtin/input/input.go @@ -1,5 +1,5 @@ package input import ( - _ "github.com/observiq/bplogagent/plugin/builtin/input/file" + _ "github.com/observiq/carbon/plugin/builtin/input/file" ) diff --git a/plugin/builtin/input/journald.go b/plugin/builtin/input/journald.go index 5f5eb5c71..ae50ed9be 100644 --- a/plugin/builtin/input/journald.go +++ b/plugin/builtin/input/journald.go @@ -14,9 +14,9 @@ import ( "time" jsoniter "github.com/json-iterator/go" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" "go.uber.org/zap" ) diff --git a/plugin/builtin/input/journald_test.go b/plugin/builtin/input/journald_test.go index 282449d02..f5f27345c 100644 --- a/plugin/builtin/input/journald_test.go +++ b/plugin/builtin/input/journald_test.go @@ -10,10 +10,10 @@ import ( "testing" "time" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) diff --git a/plugin/builtin/input/tcp.go b/plugin/builtin/input/tcp.go index bb4ddfa3e..a3eca15e4 100644 --- a/plugin/builtin/input/tcp.go +++ b/plugin/builtin/input/tcp.go @@ -8,8 +8,8 @@ import ( "net" "sync" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" ) func init() { diff --git a/plugin/builtin/input/tcp_test.go b/plugin/builtin/input/tcp_test.go index 3d4d69ff1..ba529b5b3 100644 --- a/plugin/builtin/input/tcp_test.go +++ b/plugin/builtin/input/tcp_test.go @@ -5,10 +5,10 @@ import ( "testing" "time" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) diff --git a/plugin/builtin/input/udp.go b/plugin/builtin/input/udp.go index 09f6793b1..399b8c77d 100644 --- a/plugin/builtin/input/udp.go +++ b/plugin/builtin/input/udp.go @@ -7,8 +7,8 @@ import ( "strings" "sync" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" ) func init() { diff --git a/plugin/builtin/input/udp_test.go b/plugin/builtin/input/udp_test.go index ed4dd54c1..dbe3af46b 100644 --- a/plugin/builtin/input/udp_test.go +++ b/plugin/builtin/input/udp_test.go @@ -5,10 +5,10 @@ import ( "testing" "time" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) diff --git a/plugin/builtin/output/drop.go b/plugin/builtin/output/drop.go index 471d084d1..9acb75424 100644 --- a/plugin/builtin/output/drop.go +++ b/plugin/builtin/output/drop.go @@ -3,9 +3,9 @@ package output import ( "context" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" ) func init() { diff --git a/plugin/builtin/output/drop_test.go b/plugin/builtin/output/drop_test.go index 0a6062a00..0cda288a4 100644 --- a/plugin/builtin/output/drop_test.go +++ b/plugin/builtin/output/drop_test.go @@ -1,7 +1,7 @@ package output import ( - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/plugin/helper" ) func newFakeNullOutput() *DropOutput { diff --git a/plugin/builtin/output/elastic.go b/plugin/builtin/output/elastic.go index 4b41e8496..382b4b30d 100644 --- a/plugin/builtin/output/elastic.go +++ b/plugin/builtin/output/elastic.go @@ -9,11 +9,11 @@ import ( elasticsearch "github.com/elastic/go-elasticsearch/v7" "github.com/elastic/go-elasticsearch/v7/esapi" uuid "github.com/hashicorp/go-uuid" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/errors" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/buffer" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/errors" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/buffer" + "github.com/observiq/carbon/plugin/helper" "go.uber.org/zap" ) diff --git a/plugin/builtin/output/elastic_test.go b/plugin/builtin/output/elastic_test.go index 22fccce9b..810344769 100644 --- a/plugin/builtin/output/elastic_test.go +++ b/plugin/builtin/output/elastic_test.go @@ -3,7 +3,7 @@ package output import ( "testing" - "github.com/observiq/bplogagent/entry" + "github.com/observiq/carbon/entry" "github.com/stretchr/testify/require" ) diff --git a/plugin/builtin/output/file.go b/plugin/builtin/output/file.go index e16cf9cb2..7a5222bdb 100644 --- a/plugin/builtin/output/file.go +++ b/plugin/builtin/output/file.go @@ -8,9 +8,9 @@ import ( "os" "sync" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" ) func init() { diff --git a/plugin/builtin/output/google_cloud.go b/plugin/builtin/output/google_cloud.go index 797c12dd7..ce8dca22a 100644 --- a/plugin/builtin/output/google_cloud.go +++ b/plugin/builtin/output/google_cloud.go @@ -12,10 +12,10 @@ import ( "github.com/golang/protobuf/ptypes" structpb "github.com/golang/protobuf/ptypes/struct" gax "github.com/googleapis/gax-go" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/buffer" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/buffer" + "github.com/observiq/carbon/plugin/helper" "go.uber.org/zap" "golang.org/x/oauth2/google" "google.golang.org/api/option" @@ -135,7 +135,7 @@ func (p *GoogleCloudOutput) Start() error { options := make([]option.ClientOption, 0, 2) options = append(options, option.WithCredentials(credentials)) - options = append(options, option.WithUserAgent("BindPlaneLogAgent/2.0.0")) + options = append(options, option.WithUserAgent("CarbonLogAgent/0.0.9")) ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() diff --git a/plugin/builtin/output/google_cloud_test.go b/plugin/builtin/output/google_cloud_test.go index 83f961943..9b26e657d 100644 --- a/plugin/builtin/output/google_cloud_test.go +++ b/plugin/builtin/output/google_cloud_test.go @@ -9,11 +9,11 @@ import ( "github.com/golang/protobuf/ptypes" tspb "github.com/golang/protobuf/ptypes/timestamp" gax "github.com/googleapis/gax-go" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/buffer" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/buffer" + "github.com/observiq/carbon/plugin/helper" "github.com/stretchr/testify/require" "google.golang.org/genproto/googleapis/api/monitoredres" sev "google.golang.org/genproto/googleapis/logging/type" diff --git a/plugin/builtin/output/stdout.go b/plugin/builtin/output/stdout.go index e0fa49d11..c5888c922 100644 --- a/plugin/builtin/output/stdout.go +++ b/plugin/builtin/output/stdout.go @@ -7,9 +7,9 @@ import ( "os" "sync" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" ) var Stdout io.Writer = os.Stdout diff --git a/plugin/builtin/output/stdout_test.go b/plugin/builtin/output/stdout_test.go index f5e926e20..eda366f0f 100644 --- a/plugin/builtin/output/stdout_test.go +++ b/plugin/builtin/output/stdout_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin/helper" "github.com/stretchr/testify/require" ) diff --git a/plugin/builtin/parser/json.go b/plugin/builtin/parser/json.go index 3849a5caf..0b813ed16 100644 --- a/plugin/builtin/parser/json.go +++ b/plugin/builtin/parser/json.go @@ -5,9 +5,9 @@ import ( "fmt" jsoniter "github.com/json-iterator/go" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" ) func init() { diff --git a/plugin/builtin/parser/json_test.go b/plugin/builtin/parser/json_test.go index 04dce0e7b..edb87c6dd 100644 --- a/plugin/builtin/parser/json_test.go +++ b/plugin/builtin/parser/json_test.go @@ -6,10 +6,10 @@ import ( "time" jsoniter "github.com/json-iterator/go" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/plugin/builtin/parser/regex.go b/plugin/builtin/parser/regex.go index 307ffea00..05869a7dc 100644 --- a/plugin/builtin/parser/regex.go +++ b/plugin/builtin/parser/regex.go @@ -5,9 +5,9 @@ import ( "fmt" "regexp" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" ) func init() { diff --git a/plugin/builtin/parser/regex_test.go b/plugin/builtin/parser/regex_test.go index 1176cf58e..eb419e56f 100644 --- a/plugin/builtin/parser/regex_test.go +++ b/plugin/builtin/parser/regex_test.go @@ -5,10 +5,10 @@ import ( "regexp" "testing" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" diff --git a/plugin/builtin/parser/severity.go b/plugin/builtin/parser/severity.go index 26f9a7c10..67fe1e38d 100644 --- a/plugin/builtin/parser/severity.go +++ b/plugin/builtin/parser/severity.go @@ -3,10 +3,10 @@ package parser import ( "context" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/errors" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/errors" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" ) func init() { diff --git a/plugin/builtin/parser/severity_test.go b/plugin/builtin/parser/severity_test.go index 09a58f7fc..f21176128 100644 --- a/plugin/builtin/parser/severity_test.go +++ b/plugin/builtin/parser/severity_test.go @@ -5,10 +5,10 @@ import ( "testing" "time" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) diff --git a/plugin/builtin/parser/syslog.go b/plugin/builtin/parser/syslog.go index 6daa62e68..cac59c8ea 100644 --- a/plugin/builtin/parser/syslog.go +++ b/plugin/builtin/parser/syslog.go @@ -8,9 +8,9 @@ import ( syslog "github.com/influxdata/go-syslog/v3" "github.com/influxdata/go-syslog/v3/rfc3164" "github.com/influxdata/go-syslog/v3/rfc5424" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" ) func init() { diff --git a/plugin/builtin/parser/syslog_test.go b/plugin/builtin/parser/syslog_test.go index a329a08b0..9c358c411 100644 --- a/plugin/builtin/parser/syslog_test.go +++ b/plugin/builtin/parser/syslog_test.go @@ -5,10 +5,10 @@ import ( "testing" "time" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) diff --git a/plugin/builtin/parser/time.go b/plugin/builtin/parser/time.go index fc0edef59..8b6d37112 100644 --- a/plugin/builtin/parser/time.go +++ b/plugin/builtin/parser/time.go @@ -3,10 +3,10 @@ package parser import ( "context" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/errors" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/errors" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" ) func init() { diff --git a/plugin/builtin/parser/time_test.go b/plugin/builtin/parser/time_test.go index 14e602549..7a190bc42 100644 --- a/plugin/builtin/parser/time_test.go +++ b/plugin/builtin/parser/time_test.go @@ -6,10 +6,10 @@ import ( "testing" "time" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) diff --git a/plugin/builtin/transformer/k8s_metadata_decorator.go b/plugin/builtin/transformer/k8s_metadata_decorator.go index 2e08f5f96..35eb73d05 100644 --- a/plugin/builtin/transformer/k8s_metadata_decorator.go +++ b/plugin/builtin/transformer/k8s_metadata_decorator.go @@ -5,10 +5,10 @@ import ( "sync" "time" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/errors" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/errors" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/rest" diff --git a/plugin/builtin/transformer/k8s_metadata_decorator_test.go b/plugin/builtin/transformer/k8s_metadata_decorator_test.go index 0dc7a9026..6f2afb355 100644 --- a/plugin/builtin/transformer/k8s_metadata_decorator_test.go +++ b/plugin/builtin/transformer/k8s_metadata_decorator_test.go @@ -5,10 +5,10 @@ import ( "testing" "time" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) diff --git a/plugin/builtin/transformer/metadata.go b/plugin/builtin/transformer/metadata.go index 9789bfc6e..52e6d7793 100644 --- a/plugin/builtin/transformer/metadata.go +++ b/plugin/builtin/transformer/metadata.go @@ -3,10 +3,10 @@ package transformer import ( "context" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/errors" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/errors" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" ) func init() { diff --git a/plugin/builtin/transformer/metadata_test.go b/plugin/builtin/transformer/metadata_test.go index c06fc9626..deced3da1 100644 --- a/plugin/builtin/transformer/metadata_test.go +++ b/plugin/builtin/transformer/metadata_test.go @@ -5,10 +5,10 @@ import ( "testing" "time" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) diff --git a/plugin/builtin/transformer/noop.go b/plugin/builtin/transformer/noop.go index 186ffbf7e..de397d11a 100644 --- a/plugin/builtin/transformer/noop.go +++ b/plugin/builtin/transformer/noop.go @@ -3,9 +3,9 @@ package transformer import ( "context" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" ) func init() { diff --git a/plugin/builtin/transformer/noop_test.go b/plugin/builtin/transformer/noop_test.go index 295a46ea3..8dc092a1a 100644 --- a/plugin/builtin/transformer/noop_test.go +++ b/plugin/builtin/transformer/noop_test.go @@ -3,8 +3,8 @@ package transformer import ( "testing" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin/helper" "github.com/stretchr/testify/require" ) diff --git a/plugin/builtin/transformer/rate_limit.go b/plugin/builtin/transformer/rate_limit.go index 1c0846f7b..76dfbf4a5 100644 --- a/plugin/builtin/transformer/rate_limit.go +++ b/plugin/builtin/transformer/rate_limit.go @@ -5,9 +5,9 @@ import ( "fmt" "time" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" ) func init() { diff --git a/plugin/builtin/transformer/rate_limit_test.go b/plugin/builtin/transformer/rate_limit_test.go index ce6953bfa..7d5bba15e 100644 --- a/plugin/builtin/transformer/rate_limit_test.go +++ b/plugin/builtin/transformer/rate_limit_test.go @@ -6,10 +6,10 @@ import ( "testing" "time" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) diff --git a/plugin/builtin/transformer/restructure.go b/plugin/builtin/transformer/restructure.go index be67af483..47c94fe69 100644 --- a/plugin/builtin/transformer/restructure.go +++ b/plugin/builtin/transformer/restructure.go @@ -7,9 +7,9 @@ import ( "github.com/antonmedv/expr" "github.com/antonmedv/expr/vm" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" ) func init() { diff --git a/plugin/builtin/transformer/restructure_test.go b/plugin/builtin/transformer/restructure_test.go index 4fe22c39f..1781c1e3c 100644 --- a/plugin/builtin/transformer/restructure_test.go +++ b/plugin/builtin/transformer/restructure_test.go @@ -8,10 +8,10 @@ import ( "github.com/antonmedv/expr" "github.com/antonmedv/expr/vm" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "go.uber.org/zap" diff --git a/plugin/builtin/transformer/router.go b/plugin/builtin/transformer/router.go index 9888f53ae..ac0e6fd15 100644 --- a/plugin/builtin/transformer/router.go +++ b/plugin/builtin/transformer/router.go @@ -6,9 +6,9 @@ import ( "github.com/antonmedv/expr" "github.com/antonmedv/expr/vm" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" "go.uber.org/zap" ) diff --git a/plugin/builtin/transformer/router_test.go b/plugin/builtin/transformer/router_test.go index 3d2f51f68..35c171e5f 100644 --- a/plugin/builtin/transformer/router_test.go +++ b/plugin/builtin/transformer/router_test.go @@ -4,10 +4,10 @@ import ( "context" "testing" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin" - "github.com/observiq/bplogagent/plugin/helper" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin" + "github.com/observiq/carbon/plugin/helper" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) diff --git a/plugin/custom.go b/plugin/custom.go index 2d756d7d2..bd336dec1 100644 --- a/plugin/custom.go +++ b/plugin/custom.go @@ -8,7 +8,7 @@ import ( "strings" "text/template" - "github.com/observiq/bplogagent/errors" + "github.com/observiq/carbon/errors" yaml "gopkg.in/yaml.v2" ) diff --git a/plugin/helper/expr_string.go b/plugin/helper/expr_string.go index ecfa8f138..7edd9e02e 100644 --- a/plugin/helper/expr_string.go +++ b/plugin/helper/expr_string.go @@ -6,7 +6,7 @@ import ( "github.com/antonmedv/expr" "github.com/antonmedv/expr/vm" - "github.com/observiq/bplogagent/errors" + "github.com/observiq/carbon/errors" ) type ExprStringConfig string diff --git a/plugin/helper/expr_string_test.go b/plugin/helper/expr_string_test.go index 1df99d732..3f2ddafc3 100644 --- a/plugin/helper/expr_string_test.go +++ b/plugin/helper/expr_string_test.go @@ -4,7 +4,7 @@ import ( "strconv" "testing" - "github.com/observiq/bplogagent/entry" + "github.com/observiq/carbon/entry" "github.com/stretchr/testify/require" ) diff --git a/plugin/helper/input.go b/plugin/helper/input.go index 98d923531..41f594f1d 100644 --- a/plugin/helper/input.go +++ b/plugin/helper/input.go @@ -3,9 +3,9 @@ package helper import ( "context" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/errors" - "github.com/observiq/bplogagent/plugin" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/errors" + "github.com/observiq/carbon/plugin" "go.uber.org/zap" ) diff --git a/plugin/helper/input_test.go b/plugin/helper/input_test.go index b42239c19..9c7e3d863 100644 --- a/plugin/helper/input_test.go +++ b/plugin/helper/input_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/internal/testutil" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/internal/testutil" "github.com/stretchr/testify/require" ) diff --git a/plugin/helper/output.go b/plugin/helper/output.go index d81cd2719..290a60b4b 100644 --- a/plugin/helper/output.go +++ b/plugin/helper/output.go @@ -1,8 +1,8 @@ package helper import ( - "github.com/observiq/bplogagent/errors" - "github.com/observiq/bplogagent/plugin" + "github.com/observiq/carbon/errors" + "github.com/observiq/carbon/plugin" ) // OutputConfig provides a basic implementation of an output plugin config. diff --git a/plugin/helper/output_test.go b/plugin/helper/output_test.go index f0a950f54..8a7ad9b50 100644 --- a/plugin/helper/output_test.go +++ b/plugin/helper/output_test.go @@ -3,8 +3,8 @@ package helper import ( "testing" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin" "github.com/stretchr/testify/require" ) diff --git a/plugin/helper/parser.go b/plugin/helper/parser.go index 5b6ad7ba6..c6bf6ed33 100644 --- a/plugin/helper/parser.go +++ b/plugin/helper/parser.go @@ -3,9 +3,9 @@ package helper import ( "context" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/errors" - "github.com/observiq/bplogagent/plugin" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/errors" + "github.com/observiq/carbon/plugin" ) // ParserConfig provides the basic implementation of a parser config. diff --git a/plugin/helper/parser_test.go b/plugin/helper/parser_test.go index 1364977a4..0787d932d 100644 --- a/plugin/helper/parser_test.go +++ b/plugin/helper/parser_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) diff --git a/plugin/helper/persister.go b/plugin/helper/persister.go index d31ee686d..721ac91bc 100644 --- a/plugin/helper/persister.go +++ b/plugin/helper/persister.go @@ -3,7 +3,7 @@ package helper import ( "sync" - "github.com/observiq/bplogagent/plugin" + "github.com/observiq/carbon/plugin" "go.etcd.io/bbolt" ) diff --git a/plugin/helper/plugin.go b/plugin/helper/plugin.go index 027f78988..1db7d88d3 100644 --- a/plugin/helper/plugin.go +++ b/plugin/helper/plugin.go @@ -1,8 +1,8 @@ package helper import ( - "github.com/observiq/bplogagent/errors" - "github.com/observiq/bplogagent/plugin" + "github.com/observiq/carbon/errors" + "github.com/observiq/carbon/plugin" "go.uber.org/zap" ) diff --git a/plugin/helper/plugin_test.go b/plugin/helper/plugin_test.go index f9b9e2c1d..56c8390fc 100644 --- a/plugin/helper/plugin_test.go +++ b/plugin/helper/plugin_test.go @@ -3,8 +3,8 @@ package helper import ( "testing" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin" "github.com/stretchr/testify/require" "go.uber.org/zap" ) diff --git a/plugin/helper/severity.go b/plugin/helper/severity.go index 5ab5605d9..72b9ee909 100644 --- a/plugin/helper/severity.go +++ b/plugin/helper/severity.go @@ -6,8 +6,8 @@ import ( "strconv" "strings" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/errors" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/errors" ) // SeverityParser is a helper that parses severity onto an entry. diff --git a/plugin/helper/severity_builder.go b/plugin/helper/severity_builder.go index 89601f9ba..60424a8fa 100644 --- a/plugin/helper/severity_builder.go +++ b/plugin/helper/severity_builder.go @@ -5,8 +5,8 @@ import ( "strconv" "strings" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/plugin" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/plugin" ) const minSeverity = 0 diff --git a/plugin/helper/time.go b/plugin/helper/time.go index 473909664..69a051bf6 100644 --- a/plugin/helper/time.go +++ b/plugin/helper/time.go @@ -9,9 +9,9 @@ import ( strptime "github.com/observiq/ctimefmt" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/errors" - "github.com/observiq/bplogagent/plugin" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/errors" + "github.com/observiq/carbon/plugin" ) // StrptimeKey is literally "strptime", and is the default layout type diff --git a/plugin/helper/transformer.go b/plugin/helper/transformer.go index 92ac46cb8..d3e97854d 100644 --- a/plugin/helper/transformer.go +++ b/plugin/helper/transformer.go @@ -3,9 +3,9 @@ package helper import ( "context" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/errors" - "github.com/observiq/bplogagent/plugin" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/errors" + "github.com/observiq/carbon/plugin" "go.uber.org/zap" ) diff --git a/plugin/helper/transformer_test.go b/plugin/helper/transformer_test.go index 8202d9f77..33fe2ae65 100644 --- a/plugin/helper/transformer_test.go +++ b/plugin/helper/transformer_test.go @@ -5,9 +5,9 @@ import ( "fmt" "testing" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) diff --git a/plugin/helper/writer.go b/plugin/helper/writer.go index f37ba77cb..271564e64 100644 --- a/plugin/helper/writer.go +++ b/plugin/helper/writer.go @@ -5,9 +5,9 @@ import ( "encoding/json" "fmt" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/errors" - "github.com/observiq/bplogagent/plugin" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/errors" + "github.com/observiq/carbon/plugin" ) // WriterConfig is the configuration of a writer plugin. diff --git a/plugin/helper/writer_test.go b/plugin/helper/writer_test.go index cab6c10c4..f30335343 100644 --- a/plugin/helper/writer_test.go +++ b/plugin/helper/writer_test.go @@ -5,9 +5,9 @@ import ( "encoding/json" "testing" - "github.com/observiq/bplogagent/entry" - "github.com/observiq/bplogagent/internal/testutil" - "github.com/observiq/bplogagent/plugin" + "github.com/observiq/carbon/entry" + "github.com/observiq/carbon/internal/testutil" + "github.com/observiq/carbon/plugin" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" yaml "gopkg.in/yaml.v2" diff --git a/plugin/plugin.go b/plugin/plugin.go index f5cb5c093..ead61d44a 100644 --- a/plugin/plugin.go +++ b/plugin/plugin.go @@ -5,7 +5,7 @@ package plugin import ( "context" - "github.com/observiq/bplogagent/entry" + "github.com/observiq/carbon/entry" "go.uber.org/zap" ) diff --git a/scripts/unix-install.sh b/scripts/unix-install.sh index 41b9cd4da..62a5b87ae 100755 --- a/scripts/unix-install.sh +++ b/scripts/unix-install.sh @@ -5,9 +5,9 @@ set -e # Agent Constants -SERVICE_NAME="observiq_logagent" -BINARY_NAME="observiq_logagent" -DOWNLOAD_BASE="https://github.com/observiq/observiq-logagent/releases/latest/download" +SERVICE_NAME="carbon-log-agent" +BINARY_NAME="carbon" +DOWNLOAD_BASE="https://github.com/observiq/carbon/releases/latest/download" # Script Constants PREREQS="curl hostname printf ps sed uname cut tar" @@ -258,7 +258,7 @@ set_download_url() fi if [ -z "$download_url" ] ; then - download_url="$DOWNLOAD_BASE/observiq_logagent_${os}_amd64" + download_url="$DOWNLOAD_BASE/${BINARY_NAME}_${os}_amd64" fi } @@ -720,7 +720,7 @@ pid_status() { fi } -bp_status() { +agent_status() { if [ $PROC ]; then status_of_proc -p $PIDFILE "$PROGRAM" "$PROGRAM" RETVAL=$? @@ -740,7 +740,7 @@ case "$1" in stop ;; status) - bp_status + agent_status ;; restart) stop diff --git a/scripts/windows-install.ps1 b/scripts/windows-install.ps1 index eb9b2d333..4d2ea7156 100644 --- a/scripts/windows-install.ps1 +++ b/scripts/windows-install.ps1 @@ -3,8 +3,8 @@ new-module -name LogAgentInstall -scriptblock { # Constants $DEFAULT_WINDOW_TITLE = $host.ui.rawui.WindowTitle $DEFAULT_INSTALL_PATH = 'C:\' - $DOWNLOAD_BASE = "https://github.com/observiq/observiq-logagent/releases/latest/download" - $SERVICE_NAME = 'observiq-logagent' + $DOWNLOAD_BASE = "https://github.com/observiq/carbon/releases/latest/download" + $SERVICE_NAME = 'carbon_log_agent' $INDENT_WIDTH = ' ' $MIN_DOT_NET_VERSION = '4.5' @@ -286,7 +286,7 @@ new-module -name LogAgentInstall -scriptblock { Show-ColorText 'Configuring download url...' Add-Indent if ( !$script:download_url ) { - $script:download_url = "$DOWNLOAD_BASE/observiq_logagent_windows_amd64" + $script:download_url = "$DOWNLOAD_BASE/carbon_windows_amd64" } Show-ColorText "Using download url: " '' "$script:download_url" DarkCyan Remove-Indent @@ -312,7 +312,7 @@ new-module -name LogAgentInstall -scriptblock { Show-ColorText 'Setting binary location...' Add-Indent - $script:binary_location = Get-AbsolutePath("$script:agent_home\observiq_logagent.exe") + $script:binary_location = Get-AbsolutePath("$script:agent_home\carbon.exe") Show-ColorText "Using binary location: " '' "$script:binary_location" DarkCyan Remove-Indent } From 543268832e7ce00b91dfd86b70c14215dbf18b27 Mon Sep 17 00:00:00 2001 From: Joshua Williams Date: Wed, 8 Jul 2020 16:14:58 -0400 Subject: [PATCH 2/2] Updated agent terminology --- .circleci/config.yml | 2 +- agent/agent.go | 2 +- agent/config.go | 2 +- commands/root.go | 2 +- commands/service.go | 6 +++--- docs/plugins.md | 4 ++-- docs/plugins/google_cloud_output.md | 2 +- docs/plugins/journald_input.md | 2 +- docs/plugins/rate_limit.md | 2 +- docs/types/field.md | 2 +- errors/error.go | 2 +- scripts/unix-install.sh | 4 ++-- scripts/windows-install.ps1 | 2 +- 13 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2be4cbecf..ce6a986e4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -136,7 +136,7 @@ jobs: name: Setup Workspace command: mkdir {bin,out,tmp} - run: - name: Build Log Agent + name: Build Carbon Agent command: go get -v -t -d ./... && go build -v -o ./bin/carbon ./ - run: name: Build Log Bench diff --git a/agent/agent.go b/agent/agent.go index d33edab25..077086e1e 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -103,7 +103,7 @@ func OpenDatabase(file string) (pg.Database, error) { return bbolt.Open(file, 0666, options) } -// NewLogAgent creates a new log agent. +// NewLogAgent creates a new carbon log agent. func NewLogAgent(cfg *Config, logger *zap.SugaredLogger, pluginDir, databaseFile string) *LogAgent { return &LogAgent{ Config: cfg, diff --git a/agent/config.go b/agent/config.go index ca1cf6667..06a5bd21a 100644 --- a/agent/config.go +++ b/agent/config.go @@ -9,7 +9,7 @@ import ( yaml "gopkg.in/yaml.v2" ) -// Config is the configuration of a log agent. +// Config is the configuration of the carbon log agent. type Config struct { Pipeline pipeline.Config `json:"pipeline" yaml:"pipeline"` } diff --git a/commands/root.go b/commands/root.go index 1423d6020..d87f8cade 100644 --- a/commands/root.go +++ b/commands/root.go @@ -47,7 +47,7 @@ func NewRootCmd() *cobra.Command { rootFlagSet.StringVar(&rootFlags.LogFile, "log_file", "", "write logs to configured path rather than stderr") rootFlagSet.StringSliceVarP(&rootFlags.ConfigFiles, "config", "c", []string{defaultConfig()}, "path to a config file") rootFlagSet.StringVar(&rootFlags.PluginDir, "plugin_dir", defaultPluginDir(), "path to the plugin directory") - rootFlagSet.StringVar(&rootFlags.DatabaseFile, "database", "", "path to the log agent offset database") + rootFlagSet.StringVar(&rootFlags.DatabaseFile, "database", "", "path to the carbon offset database") rootFlagSet.BoolVar(&rootFlags.Debug, "debug", false, "debug logging") // Profiling flags diff --git a/commands/service.go b/commands/service.go index 80950096e..ea27f72f1 100644 --- a/commands/service.go +++ b/commands/service.go @@ -19,9 +19,9 @@ type AgentService struct { // Start will start the log agent. func (a *AgentService) Start(s service.Service) error { - a.agent.Info("Starting log agent") + a.agent.Info("Starting carbon log agent") if err := a.agent.Start(); err != nil { - a.agent.Errorw("Failed to start log agent", zap.Any("error", err)) + a.agent.Errorw("Failed to start carbon log agent", zap.Any("error", err)) a.cancel() } return nil @@ -29,7 +29,7 @@ func (a *AgentService) Start(s service.Service) error { // Stop will stop the log agent. func (a *AgentService) Stop(s service.Service) error { - a.agent.Info("Stopping log agent") + a.agent.Info("Stopping carbon log agent") a.agent.Stop() a.cancel() return nil diff --git a/docs/plugins.md b/docs/plugins.md index d065a85cb..352e64786 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -19,7 +19,7 @@ pipeline: regex: '(?P[^\s]+) - (?P[^\s]+) \[(?P[^\]]+)\] "(?P[A-Z]+) (?P[^\s]+)[^"]+" (?P\d+) (?P[^\s]+)' ``` -Once a plugin config has been defined, it can be used in the log agent's config file with a `type` matching the filename of the plugin. +Once a plugin config has been defined, it can be used in the carbon config file with a `type` matching the filename of the plugin. `config.yaml`: ```yaml @@ -45,5 +45,5 @@ adding variables for `path` and `output`. Plugins use Go's [`text/template`](https://golang.org/pkg/text/template/) package for template rendering. All fields from the plugin configuration are available as variables in the templates except the `type` field. -For the log agent to discover a plugin, it needs to be in the log agent's `plugin` directory. This can be set with the +For carbon to discover a plugin, it needs to be in the `plugins` directory. This can be set with the `--plugin_dir` argument. For a default installation, the plugin directory is located at `$CARBON_HOME/plugins`. diff --git a/docs/plugins/google_cloud_output.md b/docs/plugins/google_cloud_output.md index 8bc89bfcd..dfd3826d7 100644 --- a/docs/plugins/google_cloud_output.md +++ b/docs/plugins/google_cloud_output.md @@ -16,7 +16,7 @@ The `google_cloud_output` plugin will send entries to Google Cloud Logging. | `trace_field` | | A [field](/docs/types/field.md) for the trace on the log entry | | `span_id_field` | | A [field](/docs/types/field.md) for the span_id on the log entry | -If both `credentials` and `credentials_file` are left empty, the log agent will attempt to find +If both `credentials` and `credentials_file` are left empty, the agent will attempt to find [Application Default Credentials](https://cloud.google.com/docs/authentication/production) from the environment. ### Example Configurations diff --git a/docs/plugins/journald_input.md b/docs/plugins/journald_input.md index f8958aa73..1256327ed 100644 --- a/docs/plugins/journald_input.md +++ b/docs/plugins/journald_input.md @@ -1,6 +1,6 @@ ## `journald_input` plugin -The `journald_input` plugin reads logs from the systemd journal using the `journalctl` binary, which must be in the `$PATH` of the log agent. +The `journald_input` plugin reads logs from the systemd journal using the `journalctl` binary, which must be in the `$PATH` of the agentt. By default, `journalctl` will read from `/run/journal` or `/var/log/journal`. If either `directory` or `files` are set, `journalctl` will instead read from those. diff --git a/docs/plugins/rate_limit.md b/docs/plugins/rate_limit.md index 823351b1c..70ad8a260 100644 --- a/docs/plugins/rate_limit.md +++ b/docs/plugins/rate_limit.md @@ -1,7 +1,7 @@ ## `rate_limit` plugin The `rate_limit` limits the rate of entries that can pass through it. This is useful if you want to limit -throughput of the log agent, or in conjunction with plugins like `generate_input`, which will otherwise +throughput of the agent, or in conjunction with plugins like `generate_input`, which will otherwise send as fast as possible. ### Configuration Fields diff --git a/docs/types/field.md b/docs/types/field.md index 78e6af880..7e792c234 100644 --- a/docs/types/field.md +++ b/docs/types/field.md @@ -1,6 +1,6 @@ ## Fields -_Fields_ are the primary way to tell the log agent which fields of a log's record to use for the operations of its plugins. +_Fields_ are the primary way to tell carbon which fields of a log's record to use for the operations of its plugins. Most often, these will be things like fields to parse for a parser plugin, or the field to write a new value to. Fields are `.`-delimited strings which allow you to selected into nested records in the field. The root level is specified by `$` such as in `$.key1`, but since all fields are expected to be relative to root, the `$` is implied and be omitted. For example, in the record below, `nested_key` can be equivalently selected with `$.key2.nested_key` or `key2.nested_key`. diff --git a/errors/error.go b/errors/error.go index ee7b91c4a..f5c306324 100644 --- a/errors/error.go +++ b/errors/error.go @@ -7,7 +7,7 @@ import ( "go.uber.org/zap/zapcore" ) -// AgentError is an error that occurs in the a log agent. +// AgentError is an error that occurs in the agent. type AgentError struct { Description string Suggestion string diff --git a/scripts/unix-install.sh b/scripts/unix-install.sh index 62a5b87ae..6e7677d2a 100755 --- a/scripts/unix-install.sh +++ b/scripts/unix-install.sh @@ -654,7 +654,7 @@ create_sysv_file() #!/bin/sh # log-agent daemon # chkconfig: 2345 99 05 -# description: Log agent daemon +# description: Carbon log agent daemon # processname: REPLACE_AGENT_BINARY # pidfile: /var/run/log-agent.pid @@ -837,7 +837,7 @@ create_systemd_file() { cat << EOF > "$1" [Unit] -Description=Log Agent +Description=Carbon Log Agent After=network.target [Service] diff --git a/scripts/windows-install.ps1 b/scripts/windows-install.ps1 index 4d2ea7156..b70e760da 100644 --- a/scripts/windows-install.ps1 +++ b/scripts/windows-install.ps1 @@ -61,7 +61,7 @@ new-module -name LogAgentInstall -scriptblock { } function Set-Window-Title { - $host.ui.rawui.windowtitle = "Log Agent Install" + $host.ui.rawui.windowtitle = "Carbon Install" } function Restore-Window-Title {