From 6f12e17fb0c11ffb5f750711b9fc739bed1a4bb2 Mon Sep 17 00:00:00 2001 From: Corbin Phelps Date: Fri, 18 Mar 2022 08:13:38 -0400 Subject: [PATCH] feat: Rebrand Repo (#288) * Rebranded code portion of collector Signed-off-by: Corbin Phelps * Rebranded human readable strings Signed-off-by: Corbin Phelps * Update scripts/install/install_unix.sh Co-authored-by: Brandon Johnson * Update scripts/install/install_unix.sh Co-authored-by: Brandon Johnson * Update scripts/install/install_unix.sh Co-authored-by: Brandon Johnson * Update scripts/install/install_unix.sh Co-authored-by: Brandon Johnson Co-authored-by: Brandon Johnson --- .github/workflows/release.yml | 20 +-- .goreleaser.yml | 82 +++++------ Dockerfile | 4 +- Makefile | 2 +- README.md | 4 +- cmd/collector/main.go | 4 +- collector/settings.go | 2 +- docs/installation-linux.md | 38 ++--- docs/installation-windows.md | 22 +-- factories/factories.go | 2 +- factories/processors.go | 2 +- factories/receivers.go | 2 +- go.mod | 2 +- receiver/logsreceiver/record_transform.go | 4 +- receiver/logsreceiver/register.go | 14 +- .../input/azure/eventhub/event_hub.go | 2 +- .../input/azure/eventhub/event_hub_test.go | 2 +- .../operators/input/azure/eventhub/parse.go | 2 +- .../input/azure/loganalytics/log_analytics.go | 2 +- .../azure/loganalytics/log_analytics_test.go | 2 +- .../input/azure/loganalytics/parse.go | 2 +- scripts/install/install_unix.sh | 34 ++--- scripts/package/postinstall.sh | 32 ++--- scripts/package/preinstall.sh | 2 +- windows/Makefile | 2 +- windows/README.md | 2 +- windows/scripts/build-msi.sh | 4 +- windows/scripts/test-install-msi.sh | 2 +- windows/scripts/test-uninstall-msi.sh | 2 +- windows/templates/CustomExitDialog.wxs | 8 +- windows/templates/product.wxs | 2 +- windows/test/install.rb | 6 +- windows/test/uninstall.rb | 2 +- windows/wix.json | 130 +++++++++--------- 34 files changed, 222 insertions(+), 222 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 10363b042..d815ba31c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,7 +34,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Copy Windows Binary - run: cp dist/collector_windows_amd64/observiq-collector.exe windows/observiq-collector.exe + run: cp dist/collector_windows_amd64/observiq-otel-collector.exe windows/observiq-otel-collector.exe - name: Copy Plugins to MSI Build Directory run: cp -r release_deps/plugins windows/ - name: Copy Example Config @@ -58,10 +58,10 @@ jobs: id: get-tag run: printf '::set-output name=tag::%s' "$(printf '%s' "${{ github.ref }}" | sed 's/refs\/tags\///')" - name: "Build MSI from Tagged Release" - run: go-msi.exe make -m observiq-collector.msi --version ${{ steps.get-tag.outputs.tag }} --arch amd64 + run: go-msi.exe make -m observiq-otel-collector.msi --version ${{ steps.get-tag.outputs.tag }} --arch amd64 working-directory: C:/build - name: Install MSI - run: msiexec.exe /qn /i observiq-collector.msi + run: msiexec.exe /qn /i observiq-otel-collector.msi working-directory: C:/build - name: Install CINC (Inspec) run: . { iwr -useb https://omnitruck.cinc.sh/install.ps1 } | iex; install -project cinc-auditor -version 4 @@ -70,20 +70,20 @@ jobs: working-directory: C:/build/test - name: Uninstall MSI run: | - msiexec.exe /qn /x observiq-collector.msi + msiexec.exe /qn /x observiq-otel-collector.msi sleep 5 working-directory: C:/build - name: Run CINC (Inspec) Uninstall Tests run: C:/cinc-project/cinc-auditor/bin/cinc-auditor.bat exec uninstall.rb working-directory: C:/build/test - name: "Rename MSI to include version tag" - run: mv observiq-collector.msi observiq-collector-${{ steps.get-tag.outputs.tag }}.msi + run: mv observiq-otel-collector.msi observiq-otel-collector-${{ steps.get-tag.outputs.tag }}.msi working-directory: C:/build - name: "Upload MSI" uses: actions/upload-artifact@v2 with: - name: observiq-collector-${{ steps.get-tag.outputs.tag }}.msi - path: C:/build/observiq-collector-${{ steps.get-tag.outputs.tag }}.msi + name: observiq-otel-collector-${{ steps.get-tag.outputs.tag }}.msi + path: C:/build/observiq-otel-collector-${{ steps.get-tag.outputs.tag }}.msi # Short lived because Go Releaser will upload the msi to a release (github release, gcs, etc) retention-days: 1 build-container-image: @@ -153,7 +153,7 @@ jobs: # uncomment to override jar version: https://github.com/open-telemetry/opentelemetry-java-contrib/releases # JMX_JAR_VERSION=v1.7.0 tags: | - observiq/observiq-collector:${{ steps.get-tag.outputs.tag }} + observiq/observiq-otel-collector:${{ steps.get-tag.outputs.tag }} release: needs: [build-msi] @@ -175,8 +175,8 @@ jobs: - name: Retrieve Windows MSI Installer uses: actions/download-artifact@v2 with: - name: observiq-collector-${{ steps.get-tag.outputs.tag }}.msi - path: observiq-collector-${{ steps.get-tag.outputs.tag }}.msi + name: observiq-otel-collector-${{ steps.get-tag.outputs.tag }}.msi + path: observiq-otel-collector-${{ steps.get-tag.outputs.tag }}.msi # install tools for cosign - name: Install Dependencies run: | diff --git a/.goreleaser.yml b/.goreleaser.yml index edf7c8a30..38edfd08d 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -5,7 +5,7 @@ before: # https://goreleaser.com/customization/build/ builds: - id: collector - binary: observiq-collector + binary: observiq-otel-collector main: ./cmd/collector env: - CGO_ENABLED=0 @@ -25,9 +25,9 @@ builds: goarch: arm64 ldflags: - -s -w - - -X github.com/observiq/observiq-collector/internal/version.version=v{{ .Version }} - - -X github.com/observiq/observiq-collector/internal/version.gitHash={{ .FullCommit }} - - -X github.com/observiq/observiq-collector/internal/version.date={{ .Date }} + - -X github.com/observiq/observiq-otel-collector/internal/version.version=v{{ .Version }} + - -X github.com/observiq/observiq-otel-collector/internal/version.gitHash={{ .FullCommit }} + - -X github.com/observiq/observiq-otel-collector/internal/version.date={{ .Date }} no_unique_dist_dir: false # https://goreleaser.com/customization/archive/ @@ -52,48 +52,48 @@ archives: nfpms: - id: collector - file_name_template: '{{ .PackageName }}_{{ .Os }}_{{ .Arch }}' - package_name: observiq-collector + file_name_template: "{{ .PackageName }}_{{ .Os }}_{{ .Arch }}" + package_name: observiq-otel-collector vendor: observIQ, Inc maintainer: observIQ description: observIQ's distribution of the OpenTelemetry collector - homepage: https://github.com/observIQ/observiq-collector + homepage: https://github.com/observIQ/observiq-otel-collector license: Apache 2.0 formats: - - rpm - - deb - bindir: /opt/observiq-collector + - rpm + - deb + bindir: /opt/observiq-otel-collector contents: - - dst: /opt/observiq-collector - type: dir - file_info: - mode: 0755 - owner: observiq-collector - group: observiq-collector - - src: release_deps/config.yaml - dst: /opt/observiq-collector/config.yaml - file_info: - mode: 0640 - owner: observiq-collector - group: observiq-collector - type: config|noreplace - - src: release_deps/opentelemetry-java-contrib-jmx-metrics.jar - dst: /opt/opentelemetry-java-contrib-jmx-metrics.jar - file_info: - mode: 0755 - owner: observiq-collector - group: observiq-collector - - dst: /opt/observiq-collector/plugins - type: dir - file_info: - mode: 0750 # restrict plugins to owner / group only - owner: observiq-collector - group: observiq-collector - # Note: plugins owner/group/mode is set in the post-install script - # Attempting to set the permissions here results in the following error: - # nfpm failed: cannot write header of release_deps/plugins/amazon_eks.yaml to data.tar.gz: archive/tar: missed writing 1736 bytes - - src: release_deps/plugins/* - dst: /opt/observiq-collector/plugins + - dst: /opt/observiq-otel-collector + type: dir + file_info: + mode: 0755 + owner: observiq-otel-collector + group: observiq-otel-collector + - src: release_deps/config.yaml + dst: /opt/observiq-otel-collector/config.yaml + file_info: + mode: 0640 + owner: observiq-otel-collector + group: observiq-otel-collector + type: config|noreplace + - src: release_deps/opentelemetry-java-contrib-jmx-metrics.jar + dst: /opt/opentelemetry-java-contrib-jmx-metrics.jar + file_info: + mode: 0755 + owner: observiq-otel-collector + group: observiq-otel-collector + - dst: /opt/observiq-otel-collector/plugins + type: dir + file_info: + mode: 0750 # restrict plugins to owner / group only + owner: observiq-otel-collector + group: observiq-otel-collector + # Note: plugins owner/group/mode is set in the post-install script + # Attempting to set the permissions here results in the following error: + # nfpm failed: cannot write header of release_deps/plugins/amazon_eks.yaml to data.tar.gz: archive/tar: missed writing 1736 bytes + - src: release_deps/plugins/* + dst: /opt/observiq-otel-collector/plugins scripts: preinstall: "./scripts/package/preinstall.sh" postinstall: ./scripts/package/postinstall.sh @@ -114,7 +114,7 @@ signs: release: draft: false extra_files: - - glob: "./observiq-collector-*.msi" + - glob: "./observiq-otel-collector-*.msi" - glob: "./scripts/install/install_unix.sh" # https://goreleaser.com/customization/changelog/ diff --git a/Dockerfile b/Dockerfile index 01413c9ad..834d0c187 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ RUN \ goreleaser build --single-target --skip-validate --rm-dist # Find built executable, there is only one, and copy it to working dir -RUN find /collector/dist -name observiq-collector -exec cp {} . \; +RUN find /collector/dist -name observiq-otel-collector -exec cp {} . \; RUN curl -L \ --output /opt/opentelemetry-java-contrib-jmx-metrics.jar \ @@ -48,7 +48,7 @@ ENV PATH=$PATH:/usr/local/openjdk-8/bin RUN mkdir -p /etc/otel # copy binary -COPY --from=build /collector/observiq-collector /collector/ +COPY --from=build /collector/observiq-otel-collector /collector/ # copy jmx receiver dependency COPY --from=build /opt/opentelemetry-java-contrib-jmx-metrics.jar /opt/opentelemetry-java-contrib-jmx-metrics.jar diff --git a/Makefile b/Makefile index 6dc82a957..daa363aaa 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ VERSION ?= $(if $(CURRENT_TAG),$(CURRENT_TAG),$(PREVIOUS_TAG)) # Default build target; making this should build for the current os/arch .PHONY: collector collector: - go build -ldflags "-s -w -X github.com/observiq/observiq-collector/internal/version.version=$(VERSION)" -o $(OUTDIR)/collector_$(GOOS)_$(GOARCH)$(EXT) ./cmd/collector + go build -ldflags "-s -w -X github.com/observiq/observiq-otel-collector/internal/version.version=$(VERSION)" -o $(OUTDIR)/collector_$(GOOS)_$(GOARCH)$(EXT) ./cmd/collector .PHONY: build-all build-all: build-linux build-darwin build-windows diff --git a/README.md b/README.md index ef405a630..6932c9ffc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# observIQ Collector +# observIQ OpenTelemetry Collector -The observIQ Collector is observIQ's distribution of the OpenTelemetry Collector. It provides everything you need to get setup and sending logs to +The observIQ OpenTelemetry Collector is observIQ's distribution of the OpenTelemetry Collector. It provides everything you need to get setup and sending logs to [observIQ](https://observiq.com/). ## Installation diff --git a/cmd/collector/main.go b/cmd/collector/main.go index c95adb266..0c856cb13 100644 --- a/cmd/collector/main.go +++ b/cmd/collector/main.go @@ -19,8 +19,8 @@ import ( "fmt" "log" - "github.com/observiq/observiq-collector/collector" - "github.com/observiq/observiq-collector/internal/version" + "github.com/observiq/observiq-otel-collector/collector" + "github.com/observiq/observiq-otel-collector/internal/version" "github.com/spf13/pflag" "go.opentelemetry.io/collector/service" ) diff --git a/collector/settings.go b/collector/settings.go index e5161f0b5..a6ff142fa 100644 --- a/collector/settings.go +++ b/collector/settings.go @@ -17,7 +17,7 @@ package collector import ( "os" - "github.com/observiq/observiq-collector/factories" + "github.com/observiq/observiq-otel-collector/factories" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/service" "go.uber.org/zap" diff --git a/docs/installation-linux.md b/docs/installation-linux.md index afab01041..fffec6417 100644 --- a/docs/installation-linux.md +++ b/docs/installation-linux.md @@ -2,22 +2,22 @@ ## Installing -Installation is done through deb and rpm packages. Installing the collector will also install the `observiq-collector` service on systemd systems. +Installation is done through deb and rpm packages. Installing the collector will also install the `observiq-otel-collector` service on systemd systems. ### RPM Installation -First download the RPM package for your architecture from the [releases page](https://github.com/observIQ/observiq-collector/releases/latest). +First download the RPM package for your architecture from the [releases page](https://github.com/observIQ/observiq-otel-collector/releases/latest). Then you may install the package using `rpm`, see this example for installing the amd64 package: ```sh -sudo rpm -U ./observiq-collector_linux_amd64.rpm -sudo systemctl enable --now observiq-collector +sudo rpm -U ./observiq-otel-collector_linux_amd64.rpm +sudo systemctl enable --now observiq-otel-collector ``` ### DEB Installation -First download the DEB package for your architecture from the [releases page](https://github.com/observIQ/observiq-collector/releases/latest). +First download the DEB package for your architecture from the [releases page](https://github.com/observIQ/observiq-otel-collector/releases/latest). Then you may install the package using `dpkg`, see this example for installing the amd64 package: ```sh -sudo dpkg -i ./observiq-collector_linux_amd64.deb -sudo systemctl enable --now observiq-collector +sudo dpkg -i ./observiq-otel-collector_linux_amd64.deb +sudo systemctl enable --now observiq-otel-collector ``` ### Install/Update script @@ -27,22 +27,22 @@ This script may also be used to update an existing installation. To install using the installation script, you may run: ```sh -sudo sh -c "$(curl -fsSlL https://github.com/observiq/observiq-collector/releases/latest/download/install_unix.sh)" install_unix.sh +sudo sh -c "$(curl -fsSlL https://github.com/observiq/observiq-otel-collector/releases/latest/download/install_unix.sh)" install_unix.sh ``` ## Configuring the Collector -After installing, systems with systemd installed will have the `observiq-collector` service up and running! +After installing, systems with systemd installed will have the `observiq-otel-collector` service up and running! -Logs from the collector will appear in journald. You may run `journalctl -u observiq-collector.service` to view them. +Logs from the collector will appear in journald. You may run `journalctl -u observiq-otel-collector.service` to view them. -The config file for the collector can be found at `/opt/observiq-collector/config.yaml`. When changing the configuration,the collector service must be restarted in order for config changes to take effect. +The config file for the collector can be found at `/opt/observiq-otel-collector/config.yaml`. When changing the configuration,the collector service must be restarted in order for config changes to take effect. For more information on configuring the collector, see the [OpenTelemetry docs](https://opentelemetry.io/docs/collector/configuration/). -By default, the `observiq-collector` service runs as the "observiq-collector" user. Some OpenTelemetry components may require root permissions. +By default, the `observiq-otel-collector` service runs as the "observiq-otel-collector" user. Some OpenTelemetry components may require root permissions. To run the collector as root, you may create a systemd override. -Run `sudo systemctl edit observiq-collector` and paste the following config: +Run `sudo systemctl edit observiq-otel-collector` and paste the following config: ``` [Service] User=root @@ -54,19 +54,19 @@ Restart the collector for these changes to take effect. ## Restarting the Collector On systemd systems, the collector may be restarted with the following command: ```sh -systemctl restart observiq-collector +systemctl restart observiq-otel-collector ``` ## Stopping the Collector On systemd systems, the collector may be stopped with the following command: ```sh -systemctl stop observiq-collector +systemctl stop observiq-otel-collector ``` ## Starting the Collector On systemd systems, the collector may be started with the following command: ```sh -systemctl start observiq-collector +systemctl start observiq-otel-collector ``` ## Uninstalling @@ -75,19 +75,19 @@ systemctl start observiq-collector To uninstall the rpm package, run: ```sh -sudo rpm -e observiq-collector +sudo rpm -e observiq-otel-collector ``` ### DEB Uninstall To uninstall the deb package, run: ```sh -sudo dpkg -r observiq-collector +sudo dpkg -r observiq-otel-collector ``` ### Uninstall script To uninstall an installation made with the install script, run: ```sh -sudo sh -c "$(curl -fsSlL https://github.com/observiq/observiq-collector/releases/latest/download/install_unix.sh)" install_unix.sh uninstall +sudo sh -c "$(curl -fsSlL https://github.com/observiq/observiq-otel-collector/releases/latest/download/install_unix.sh)" install_unix.sh uninstall ``` diff --git a/docs/installation-windows.md b/docs/installation-windows.md index faf8a3f1e..649fd67cd 100644 --- a/docs/installation-windows.md +++ b/docs/installation-windows.md @@ -2,7 +2,7 @@ ## Installing -To install the collector on Windows, first [download the latest MSI](https://github.com/observIQ/observiq-collector/releases/latest). +To install the collector on Windows, first [download the latest MSI](https://github.com/observIQ/observiq-otel-collector/releases/latest). After downloading the MSI, simply double click it to open the installation wizard. Follow the instructions to configure and install the collector. @@ -13,11 +13,11 @@ msiexec /i "" /quiet ## Configuring the Collector -After installing, the `observiq-collector` service will be running and ready for configuration! +After installing, the `observiq-otel-collector` service will be running and ready for configuration! Logs from the collector will appear in the Application event log. -By default, the config file for the collector can be found at `C:\Program Files\observiq-collector\config.yaml`. When changing the configuration,the collector service must be restarted in order for config changes to take effect. +By default, the config file for the collector can be found at `C:\Program Files\observiq-otel-collector\config.yaml`. When changing the configuration,the collector service must be restarted in order for config changes to take effect. For more information on configuring the collector, see the [OpenTelemetry docs](https://opentelemetry.io/docs/collector/configuration/). @@ -27,13 +27,13 @@ To access the services dialog, press Win + R, enter `services.msc` into the Run ![The run dialog](./screenshots/windows/launch-services.png) -Locate the `observiq-collector` service, right click the entry, and click "Restart" to restart the collector. +Locate the `observiq-otel-collector` service, right click the entry, and click "Restart" to restart the collector. ![The services dialog](./screenshots/windows/stop-restart-service.png) Alternatively, the Powershell command below may be run to restart the collector service. ```pwsh -Restart-Service -Name "observiq-collector" +Restart-Service -Name "observiq-otel-collector" ``` ## Stopping the Collector @@ -43,13 +43,13 @@ To access the services dialog, press Win + R, enter `services.msc` into the Run ![The run dialog](./screenshots/windows/launch-services.png) -Locate the `observiq-collector` service, right click the entry, and click "Stop" to stop the collector. +Locate the `observiq-otel-collector` service, right click the entry, and click "Stop" to stop the collector. ![The services dialog](./screenshots/windows/stop-restart-service.png) Alternatively, the Powershell command below may be run to stop the collector service. ```pwsh -Stop-Service -Name "observiq-collector" +Stop-Service -Name "observiq-otel-collector" ``` ## Starting the Collector @@ -59,13 +59,13 @@ To access the services dialog, press Win + R, enter `services.msc` into the Run ![The run dialog](./screenshots/windows/launch-services.png) -Locate the `observiq-collector` service, right click the entry, and click "Start" to start the collector. +Locate the `observiq-otel-collector` service, right click the entry, and click "Start" to start the collector. ![The services dialog](./screenshots/windows/start-service.png) Alternatively, the Powershell command below may be run to start the collector service. ```pwsh -Start-Service -Name "observiq-collector" +Start-Service -Name "observiq-otel-collector" ``` ## Uninstalling @@ -74,7 +74,7 @@ To uninstall the collector on Windows, navigate to the control panel, then to th ![The control panel](./screenshots/windows/control-panel-uninstall.png) -Locate the `observiq-collector` entry, and select uninstall. +Locate the `observiq-otel-collector` entry, and select uninstall. ![The uninstall or change a program dialog](./screenshots/windows/uninstall-collector.png) @@ -82,5 +82,5 @@ Follow the wizard to complete removal of the collector. Alternatively, Powershell command below may be run to uninstall the collector. ```pwsh -(Get-WmiObject -Class Win32_Product -Filter "Name = 'observiq-collector'").Uninstall() +(Get-WmiObject -Class Win32_Product -Filter "Name = 'observiq-otel-collector'").Uninstall() ``` diff --git a/factories/factories.go b/factories/factories.go index 3110bccaf..f4a096414 100644 --- a/factories/factories.go +++ b/factories/factories.go @@ -19,7 +19,7 @@ import ( "go.uber.org/multierr" ) -// DefaultFactories returns the default factories used by the observIQ collector +// DefaultFactories returns the default factories used by the observIQ OpenTelemetry collector func DefaultFactories() (component.Factories, error) { return combineFactories(defaultReceivers, defaultProcessors, defaultExporters, defaultExtensions) } diff --git a/factories/processors.go b/factories/processors.go index 52c227549..da5926a58 100644 --- a/factories/processors.go +++ b/factories/processors.go @@ -16,7 +16,7 @@ package factories import ( "github.com/GoogleCloudPlatform/opentelemetry-operations-collector/processor/normalizesumsprocessor" - "github.com/observiq/observiq-collector/processor/resourceattributetransposerprocessor" + "github.com/observiq/observiq-otel-collector/processor/resourceattributetransposerprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor" diff --git a/factories/receivers.go b/factories/receivers.go index e9743c2be..9a84ea98f 100644 --- a/factories/receivers.go +++ b/factories/receivers.go @@ -15,7 +15,7 @@ package factories import ( - "github.com/observiq/observiq-collector/receiver/logsreceiver" + "github.com/observiq/observiq-otel-collector/receiver/logsreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver" diff --git a/go.mod b/go.mod index 2770c159a..880d2df11 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/observiq/observiq-collector +module github.com/observiq/observiq-otel-collector go 1.17 diff --git a/receiver/logsreceiver/record_transform.go b/receiver/logsreceiver/record_transform.go index f1dbb3020..9eec06d06 100644 --- a/receiver/logsreceiver/record_transform.go +++ b/receiver/logsreceiver/record_transform.go @@ -19,8 +19,8 @@ import ( "strconv" "strings" - "github.com/observiq/observiq-collector/receiver/logsreceiver/severity" - "github.com/observiq/observiq-collector/receiver/logsreceiver/timestamp" + "github.com/observiq/observiq-otel-collector/receiver/logsreceiver/severity" + "github.com/observiq/observiq-otel-collector/receiver/logsreceiver/timestamp" "go.opentelemetry.io/collector/model/pdata" ) diff --git a/receiver/logsreceiver/register.go b/receiver/logsreceiver/register.go index 5e6acd392..f7e9940ed 100644 --- a/receiver/logsreceiver/register.go +++ b/receiver/logsreceiver/register.go @@ -50,13 +50,13 @@ import ( _ "github.com/open-telemetry/opentelemetry-log-collection/operator/builtin/output/stdout" // register non-opentelemetry operators - _ "github.com/observiq/observiq-collector/receiver/operators/input/aws/cloudwatch" - _ "github.com/observiq/observiq-collector/receiver/operators/input/azure/eventhub" - _ "github.com/observiq/observiq-collector/receiver/operators/input/azure/loganalytics" - _ "github.com/observiq/observiq-collector/receiver/operators/input/goflow" - _ "github.com/observiq/observiq-collector/receiver/operators/input/http" + _ "github.com/observiq/observiq-otel-collector/receiver/operators/input/aws/cloudwatch" + _ "github.com/observiq/observiq-otel-collector/receiver/operators/input/azure/eventhub" + _ "github.com/observiq/observiq-otel-collector/receiver/operators/input/azure/loganalytics" + _ "github.com/observiq/observiq-otel-collector/receiver/operators/input/goflow" + _ "github.com/observiq/observiq-otel-collector/receiver/operators/input/http" - _ "github.com/observiq/observiq-collector/receiver/operators/parser/keyvalue" + _ "github.com/observiq/observiq-otel-collector/receiver/operators/parser/keyvalue" - _ "github.com/observiq/observiq-collector/receiver/operators/transformer/k8smetadata" + _ "github.com/observiq/observiq-otel-collector/receiver/operators/transformer/k8smetadata" ) diff --git a/receiver/operators/input/azure/eventhub/event_hub.go b/receiver/operators/input/azure/eventhub/event_hub.go index 0839ec373..677fdb896 100644 --- a/receiver/operators/input/azure/eventhub/event_hub.go +++ b/receiver/operators/input/azure/eventhub/event_hub.go @@ -17,7 +17,7 @@ package eventhub import ( "context" - "github.com/observiq/observiq-collector/receiver/operators/input/azure" + "github.com/observiq/observiq-otel-collector/receiver/operators/input/azure" "github.com/open-telemetry/opentelemetry-log-collection/operator" "github.com/open-telemetry/opentelemetry-log-collection/operator/helper" ) diff --git a/receiver/operators/input/azure/eventhub/event_hub_test.go b/receiver/operators/input/azure/eventhub/event_hub_test.go index 4edeb5b37..dbd458914 100644 --- a/receiver/operators/input/azure/eventhub/event_hub_test.go +++ b/receiver/operators/input/azure/eventhub/event_hub_test.go @@ -17,7 +17,7 @@ package eventhub import ( "testing" - "github.com/observiq/observiq-collector/receiver/operators/input/azure" + "github.com/observiq/observiq-otel-collector/receiver/operators/input/azure" "github.com/open-telemetry/opentelemetry-log-collection/testutil" "github.com/stretchr/testify/require" ) diff --git a/receiver/operators/input/azure/eventhub/parse.go b/receiver/operators/input/azure/eventhub/parse.go index 1741f34f5..caa02247e 100644 --- a/receiver/operators/input/azure/eventhub/parse.go +++ b/receiver/operators/input/azure/eventhub/parse.go @@ -18,7 +18,7 @@ import ( "context" azhub "github.com/Azure/azure-event-hubs-go/v3" - "github.com/observiq/observiq-collector/receiver/operators/input/azure" + "github.com/observiq/observiq-otel-collector/receiver/operators/input/azure" "go.uber.org/zap" ) diff --git a/receiver/operators/input/azure/loganalytics/log_analytics.go b/receiver/operators/input/azure/loganalytics/log_analytics.go index 024d79bc3..cd511e757 100644 --- a/receiver/operators/input/azure/loganalytics/log_analytics.go +++ b/receiver/operators/input/azure/loganalytics/log_analytics.go @@ -18,7 +18,7 @@ import ( "context" jsoniter "github.com/json-iterator/go" - "github.com/observiq/observiq-collector/receiver/operators/input/azure" + "github.com/observiq/observiq-otel-collector/receiver/operators/input/azure" "github.com/open-telemetry/opentelemetry-log-collection/operator" "github.com/open-telemetry/opentelemetry-log-collection/operator/helper" ) diff --git a/receiver/operators/input/azure/loganalytics/log_analytics_test.go b/receiver/operators/input/azure/loganalytics/log_analytics_test.go index b4bd7999c..d42a3f42f 100644 --- a/receiver/operators/input/azure/loganalytics/log_analytics_test.go +++ b/receiver/operators/input/azure/loganalytics/log_analytics_test.go @@ -17,7 +17,7 @@ package loganalytics import ( "testing" - "github.com/observiq/observiq-collector/receiver/operators/input/azure" + "github.com/observiq/observiq-otel-collector/receiver/operators/input/azure" "github.com/open-telemetry/opentelemetry-log-collection/testutil" "github.com/stretchr/testify/require" ) diff --git a/receiver/operators/input/azure/loganalytics/parse.go b/receiver/operators/input/azure/loganalytics/parse.go index 2900d23e1..99173614e 100644 --- a/receiver/operators/input/azure/loganalytics/parse.go +++ b/receiver/operators/input/azure/loganalytics/parse.go @@ -23,7 +23,7 @@ import ( "time" azhub "github.com/Azure/azure-event-hubs-go/v3" - "github.com/observiq/observiq-collector/receiver/operators/input/azure" + "github.com/observiq/observiq-otel-collector/receiver/operators/input/azure" "github.com/open-telemetry/opentelemetry-log-collection/entry" "github.com/open-telemetry/opentelemetry-log-collection/errors" "go.uber.org/zap" diff --git a/scripts/install/install_unix.sh b/scripts/install/install_unix.sh index 45e2d1ab1..d4908a8b3 100644 --- a/scripts/install/install_unix.sh +++ b/scripts/install/install_unix.sh @@ -16,7 +16,7 @@ set -e # Constants -DOWNLOAD_URL_BASE="https://github.com/observiq/observiq-collector/releases" +DOWNLOAD_URL_BASE="https://github.com/observiq/observiq-otel-collector/releases" TMP_DIR=${TMPDIR:-"/tmp"} # Allow this to be overriden by cannonical TMPDIR env var # Global variables @@ -29,10 +29,10 @@ arch="unknown" # may be "deb" or "rpm" package_type="unknown" -# package_file_name is the name of the package file (e.g. "observiq-collector_linux_amd64.deb") +# package_file_name is the name of the package file (e.g. "observiq-otel-collector_linux_amd64.deb") package_file_name="unknown" -# out_file_path is the full path to the downloaded package (e.g. "/tmp/observiq-collector_linux_amd64.deb") +# out_file_path is the full path to the downloaded package (e.g. "/tmp/observiq-otel-collector_linux_amd64.deb") out_file_path="unknown" set_arch() { @@ -68,7 +68,7 @@ set_package_type() { } set_file_name() { - package_file_name="observiq-collector_linux_${arch}.${package_type}" + package_file_name="observiq-otel-collector_linux_${arch}.${package_type}" out_file_path="$TMP_DIR/$package_file_name" } @@ -97,34 +97,34 @@ install_package() { esac if command -v systemctl > /dev/null 2>&1; then - systemctl enable --now observiq-collector + systemctl enable --now observiq-otel-collector fi } uninstall_package() { if command -v dpkg > /dev/null 2>&1; then - if dpkg -l "observiq-collector" > /dev/null 2>&1; then - desired_state="$(dpkg -l observiq-collector | tail -n1 | cut -b 1)" + if dpkg -l "observiq-otel-collector" > /dev/null 2>&1; then + desired_state="$(dpkg -l observiq-otel-collector | tail -n1 | cut -b 1)" if [ "$desired_state" = "i" ]; then echo "Existing DEB installation detected, uninstalling..." - dpkg -r "observiq-collector" + dpkg -r "observiq-otel-collector" else # The package is already uninstalled; # This case can be hit when the package was uninstalled, but config files are left behind, # which dpkg still keeps track of. - echo "dpkg was detected, but no observiq-collector package is currently installed, skipping..." + echo "dpkg was detected, but no observiq-otel-collector package is currently installed, skipping..." fi else - echo "dpkg was detected, but no observiq-collector package is currently installed, skipping..." + echo "dpkg was detected, but no observiq-otel-collector package is currently installed, skipping..." fi fi if command -v rpm > /dev/null 2>&1; then - if rpm -q observiq-collector > /dev/null 2>&1; then + if rpm -q observiq-otel-collector > /dev/null 2>&1; then echo "Existing RPM installation detected, uninstalling..." - rpm -e "observiq-collector" + rpm -e "observiq-otel-collector" else - echo "rpm was detected, but no observiq-collector package is currently installed, skipping..." + echo "rpm was detected, but no observiq-otel-collector package is currently installed, skipping..." fi fi } @@ -139,16 +139,16 @@ main() { case "$COMMAND" in install) - echo "Installing the observIQ collector..." + echo "Installing the observIQ OpenTelemetry collector..." # Download and install the package download_package install_package - echo "Successfully installed the observIQ collector." + echo "Successfully installed the observIQ OpenTelemetry collector." ;; uninstall) - echo "Uninstalling the observIQ collector..." + echo "Uninstalling the observIQ OpenTelemetry collector..." uninstall_package - echo "Successfully uninstalled the observIQ collector." + echo "Successfully uninstalled the observIQ OpenTelemetry collector." ;; *) echo "Unrecognized command: $COMMAND" diff --git a/scripts/package/postinstall.sh b/scripts/package/postinstall.sh index 98ca28370..18254b790 100644 --- a/scripts/package/postinstall.sh +++ b/scripts/package/postinstall.sh @@ -30,7 +30,7 @@ create_systemd_service() { echo "detected service file directory: ${systemd_service_dir}" - systemd_service_file="${systemd_service_dir}/observiq-collector.service" + systemd_service_file="${systemd_service_dir}/observiq-otel-collector.service" cat < ${systemd_service_file} [Unit] @@ -40,11 +40,11 @@ StartLimitIntervalSec=120 StartLimitBurst=5 [Service] Type=simple -User=observiq-collector -Group=observiq-collector +User=observiq-otel-collector +Group=observiq-otel-collector Environment=PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin -WorkingDirectory=/opt/observiq-collector -ExecStart=/opt/observiq-collector/observiq-collector --config config.yaml +WorkingDirectory=/opt/observiq-otel-collector +ExecStart=/opt/observiq-otel-collector/observiq-otel-collector --config config.yaml SuccessExitStatus=0 TimeoutSec=120 StandardOutput=journal @@ -63,22 +63,22 @@ EOF cat << EOF -The "observiq-collector" service has been configured! +The "observiq-otel-collector" service has been configured! The collector's config file can be found here: - /opt/observiq-collector/config.yaml + /opt/observiq-otel-collector/config.yaml For more information on configuring the collector, see the OpenTelemetry docs: https://opentelemetry.io/docs/collector/configuration/ -To stop the observiq-collector service, run: - sudo systemctl stop observiq-collector +To stop the observiq-otel-collector service, run: + sudo systemctl stop observiq-otel-collector -To start the observiq-collector service, run: - sudo systemctl start observiq-collector +To start the observiq-otel-collector service, run: + sudo systemctl start observiq-otel-collector -To restart the observiq-collector service, run: - sudo systemctl restart observiq-collector +To restart the observiq-otel-collector service, run: + sudo systemctl restart observiq-otel-collector EOF } @@ -106,9 +106,9 @@ install_service() { finish_permissions() { # Goreleaser does not set plugin file permissions, so do them here - # We also change the owner of the binary to observiq-collector - chown -R observiq-collector:observiq-collector /opt/observiq-collector/observiq-collector /opt/observiq-collector/plugins/* - chmod 0640 /opt/observiq-collector/plugins/* + # We also change the owner of the binary to observiq-otel-collector + chown -R observiq-otel-collector:observiq-otel-collector /opt/observiq-otel-collector/observiq-otel-collector /opt/observiq-otel-collector/plugins/* + chmod 0640 /opt/observiq-otel-collector/plugins/* } diff --git a/scripts/package/preinstall.sh b/scripts/package/preinstall.sh index db260f837..14b41e473 100644 --- a/scripts/package/preinstall.sh +++ b/scripts/package/preinstall.sh @@ -16,7 +16,7 @@ set -e -username="observiq-collector" +username="observiq-otel-collector" if getent group "$username" > /dev/null 2>&1; then echo "Group ${username} already exists." diff --git a/windows/Makefile b/windows/Makefile index fe03fb23d..6f214d245 100644 --- a/windows/Makefile +++ b/windows/Makefile @@ -21,6 +21,6 @@ test-uninstall-msi: .PHONY: clean clean: - rm -rf go-msi.exe config.yaml cinc-auditor.msi observiq-collector.exe observiq-collector.msi \ + rm -rf go-msi.exe config.yaml cinc-auditor.msi observiq-otel-collector.exe observiq-otel-collector.msi \ opentelemetry-java-contrib-jmx-metrics.jar wix-binaries.zip wix.dynamic.json \ wix stanza-plugins plugins diff --git a/windows/README.md b/windows/README.md index 2bfee4739..f2b423d27 100644 --- a/windows/README.md +++ b/windows/README.md @@ -10,6 +10,6 @@ The following make targets are available for local development: * `vagrant-prep`: Starts up the vagrant box and prepares it for building and testing. The vagrant box must be up in order for building or testing to work. **PLEASE NOTE** that valid Windows licensing is your responsibility. * `fetch-dependencies`: Fetches dependencies for building the MSI. * `build-msi`: Builds the MSI. Depends on the `fetch-dependencies` target (`fetch-dependencies` will be run every time this is run). -* `test-install-msi`: Test installing the MSI. `build-msi` should be run before this is run. **NOTE** This target is flaky, it seems like the installers just don't run sometimes, so you may need to run this a couple of times, or manually install the msi's (cinc + observiq-collector). +* `test-install-msi`: Test installing the MSI. `build-msi` should be run before this is run. **NOTE** This target is flaky, it seems like the installers just don't run sometimes, so you may need to run this a couple of times, or manually install the msi's (cinc + observiq-otel-collector). * `test-uninstall-msi`: Test uninstalling the MSI. `build-msi` should be run before this is run, and the MSI should be installed (e.g. by running `test-install-msi`) * `clean`: Cleans this directory of dependencies from `fetch-dependencies`, as well as of build artifacts. diff --git a/windows/scripts/build-msi.sh b/windows/scripts/build-msi.sh index e5100f87a..4bf4f3d3f 100755 --- a/windows/scripts/build-msi.sh +++ b/windows/scripts/build-msi.sh @@ -17,7 +17,7 @@ set -e BASEDIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" PROJECT_BASE="$BASEDIR/../.." -cp "$PROJECT_BASE/dist/collector_windows_amd64.exe" "observiq-collector.exe" +cp "$PROJECT_BASE/dist/collector_windows_amd64.exe" "observiq-otel-collector.exe" vagrant winrm -c \ - "cd C:/vagrant; go-msi.exe make -m observiq-collector.msi --version v0.0.1 --arch amd64" + "cd C:/vagrant; go-msi.exe make -m observiq-otel-collector.msi --version v0.0.1 --arch amd64" diff --git a/windows/scripts/test-install-msi.sh b/windows/scripts/test-install-msi.sh index 253f59df5..7d18c119f 100755 --- a/windows/scripts/test-install-msi.sh +++ b/windows/scripts/test-install-msi.sh @@ -16,6 +16,6 @@ set -e vagrant winrm -c "cd C:/vagrant; msiexec.exe /i cinc-auditor.msi /passive" -vagrant winrm -c "cd C:/vagrant; msiexec.exe /i observiq-collector.msi /passive" +vagrant winrm -c "cd C:/vagrant; msiexec.exe /i observiq-otel-collector.msi /passive" sleep 10 vagrant winrm -c "cinc-auditor exec C:\vagrant\test\install.rb" diff --git a/windows/scripts/test-uninstall-msi.sh b/windows/scripts/test-uninstall-msi.sh index c10d8b495..271f85bca 100755 --- a/windows/scripts/test-uninstall-msi.sh +++ b/windows/scripts/test-uninstall-msi.sh @@ -16,6 +16,6 @@ set -e vagrant winrm -c "cd C:\vagrant; msiexec.exe /i cinc-auditor.msi /passive" -vagrant winrm -c "cd C:\vagrant; msiexec.exe /x observiq-collector.msi /passive" +vagrant winrm -c "cd C:\vagrant; msiexec.exe /x observiq-otel-collector.msi /passive" sleep 10 vagrant winrm -c "cinc-auditor exec C:\vagrant\test\uninstall.rb" diff --git a/windows/templates/CustomExitDialog.wxs b/windows/templates/CustomExitDialog.wxs index 3fa8162e7..f1c3e798b 100644 --- a/windows/templates/CustomExitDialog.wxs +++ b/windows/templates/CustomExitDialog.wxs @@ -11,18 +11,18 @@ diff --git a/windows/templates/product.wxs b/windows/templates/product.wxs index b1d96fdf7..ba4e44c26 100644 --- a/windows/templates/product.wxs +++ b/windows/templates/product.wxs @@ -9,7 +9,7 @@ -