From 8159f89e8e63b09e87ebc2f91bc8ba0cf5fdf1f8 Mon Sep 17 00:00:00 2001 From: Dakota Paasman <122491662+dpaasman00@users.noreply.github.com> Date: Wed, 14 Aug 2024 15:16:55 -0400 Subject: [PATCH] feat: Update Unix install script (#1757) * update unix install scripts * dedup messages * docker updates * docker working * rename to supervisor.yaml, add pre & post remove scripts, remove uninstall section, update entrypoint for docker images * update permission for supervisor cfg * new supervisor storage changes * use INSTALL_DIR const * messing around with pre-post scripts * use shell formatter & finalize scripts * remove returns, update msg, remove log dir creation in goreleaser * move supervisors files creation into goreleaser * only pull most recent contrib commit, change replace to internal pkg for gcp exporters * chown opampsupervisor * remove user var --- .goreleaser.yml | 15 +- Makefile | 2 +- buildscripts/download-dependencies.sh | 2 +- docker/Dockerfile.scratch | 3 +- docker/Dockerfile.ubi8 | 6 +- docker/Dockerfile.ubuntu | 6 +- exporter/googlecloudexporter/go.mod | 2 +- exporter/googlecloudexporter/go.sum | 2 - .../googlemanagedprometheusexporter/go.mod | 2 +- .../googlemanagedprometheusexporter/go.sum | 2 - manifests/minimal/manifest.yaml | 12 +- manifests/observIQ/manifest.yaml | 436 ++++++------ scripts/install/install_macos.sh | 4 +- scripts/install/install_unix.sh | 630 +++++++++--------- scripts/package/postinstall.sh | 63 +- scripts/package/postremove.sh | 54 ++ scripts/package/preinstall.sh | 45 +- scripts/package/preremove.sh | 61 ++ service/com.observiq.collector.plist | 2 +- service/observiq-otel-collector | 2 +- service/observiq-otel-collector.service | 2 +- service/sysconfig/observiq-otel-collector | 2 +- 22 files changed, 758 insertions(+), 597 deletions(-) create mode 100644 scripts/package/postremove.sh create mode 100644 scripts/package/preremove.sh diff --git a/.goreleaser.yml b/.goreleaser.yml index 7f03da27e..e89c932b0 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -160,6 +160,7 @@ nfpms: mode: 0755 owner: observiq-otel-collector group: observiq-otel-collector + # TODO: (dakota) evaluate this file once supervisor has support for configuring agent logging - src: release_deps/logging.yaml dst: /opt/observiq-otel-collector/logging.yaml file_info: @@ -204,12 +205,16 @@ nfpms: mode: 0750 owner: observiq-otel-collector group: observiq-otel-collector - - dst: /opt/observiq-otel-collector/log + - dst: /opt/observiq-otel-collector/supervisor_storage type: dir file_info: mode: 0750 owner: observiq-otel-collector group: observiq-otel-collector + - dst: /opt/observiq-otel-collector/supervisor_storage/effective.yaml + type: ghost + - dst: /opt/observiq-otel-collector/supervisor_storage/agent.log + type: ghost - src: service/observiq-otel-collector.service dst: /usr/lib/systemd/system/observiq-otel-collector.service type: config|noreplace @@ -234,6 +239,8 @@ nfpms: scripts: preinstall: ./scripts/package/preinstall.sh postinstall: ./scripts/package/postinstall.sh + preremove: ./scripts/package/preremove.sh + postremove: ./scripts/package/postremove.sh # Build container images with docker buildx (mutli arch builds). dockers: @@ -242,6 +249,7 @@ dockers: goarch: amd64 ids: - collector + - supervisor image_templates: - "observiq/bindplane-agent-amd64:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-minimal" - "ghcr.io/observiq/bindplane-agent-amd64:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-minimal" @@ -264,6 +272,7 @@ dockers: goarch: arm64 ids: - collector + - supervisor image_templates: - "observiq/bindplane-agent-arm64:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-minimal" - "ghcr.io/observiq/bindplane-agent-arm64:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-minimal" @@ -286,6 +295,7 @@ dockers: goarch: amd64 ids: - collector + - supervisor image_templates: - "observiq/observiq-otel-collector-amd64:latest" - "observiq/observiq-otel-collector-amd64:{{ .Major }}.{{ .Minor }}.{{ .Patch }}" @@ -331,6 +341,7 @@ dockers: goarch: arm64 ids: - collector + - supervisor image_templates: - "observiq/observiq-otel-collector-arm64:latest" - "observiq/observiq-otel-collector-arm64:{{ .Major }}.{{ .Minor }}.{{ .Patch }}" @@ -377,6 +388,7 @@ dockers: goarch: amd64 ids: - collector + - supervisor image_templates: - "observiq/observiq-otel-collector-amd64:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-ubi8" - "ghcr.io/observiq/observiq-otel-collector-amd64:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-ubi8" @@ -404,6 +416,7 @@ dockers: goarch: arm64 ids: - collector + - supervisor image_templates: - "observiq/observiq-otel-collector-arm64:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-ubi8" - "ghcr.io/observiq/observiq-otel-collector-arm64:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-ubi8" diff --git a/Makefile b/Makefile index e8954a46d..5d516eb13 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,7 @@ updater: # Runs the supervisor invoking the agent build in /dist .PHONY: run-supervisor run-supervisor: - opampsupervisor --config ./local/supervisor-config.yaml + opampsupervisor --config ./local/supervisor.yaml # Ensures the supervisor and agent are stopped .PHONY: kill diff --git a/buildscripts/download-dependencies.sh b/buildscripts/download-dependencies.sh index 05142edf2..36c586473 100755 --- a/buildscripts/download-dependencies.sh +++ b/buildscripts/download-dependencies.sh @@ -35,7 +35,7 @@ SUPERVISOR_REPO="https://github.com/open-telemetry/opentelemetry-collector-contr PLATFORMS=("linux/amd64" "linux/arm64" "linux/arm" "linux/ppc64" "linux/ppc64le" "darwin/amd64" "darwin/arm64" "windows/amd64") mkdir "$DOWNLOAD_DIR/supervisor_bin" -$(cd $DOWNLOAD_DIR && git clone "$SUPERVISOR_REPO") +$(cd $DOWNLOAD_DIR && git clone --depth 1 "$SUPERVISOR_REPO") cd "$DOWNLOAD_DIR/opentelemetry-collector-contrib/cmd/opampsupervisor" go get github.com/open-telemetry/opentelemetry-collector-contrib/cmd/opampsupervisor/supervisor for PLATFORM in "${PLATFORMS[@]}"; do diff --git a/docker/Dockerfile.scratch b/docker/Dockerfile.scratch index 5c5ad3d69..5a6df36e1 100644 --- a/docker/Dockerfile.scratch +++ b/docker/Dockerfile.scratch @@ -37,10 +37,11 @@ COPY --from=stage --chown=otel:otel /etc/otel /etc/otel COPY --from=stage --chown=otel:otel /etc/otel/storage /etc/otel/storage COPY observiq-otel-collector /collector/observiq-otel-collector +COPY opampsupervisor /collector/opampsupervisor ENV OIQ_OTEL_COLLECTOR_HOME=/etc/otel ENV OIQ_OTEL_COLLECTOR_STORAGE=/etc/otel/storage USER otel WORKDIR /etc/otel -ENTRYPOINT ["/collector/observiq-otel-collector"] +ENTRYPOINT [ "/collector/opampsupervisor", "--config", "/etc/otel/supervisor.yaml" ] diff --git a/docker/Dockerfile.ubi8 b/docker/Dockerfile.ubi8 index d9ba24f84..101cfe711 100644 --- a/docker/Dockerfile.ubi8 +++ b/docker/Dockerfile.ubi8 @@ -57,6 +57,8 @@ COPY LICENSE /licenses/observiq-otel-collector.license COPY release_deps/VERSION.txt /etc/otel/VERSION.txt COPY observiq-otel-collector /collector/observiq-otel-collector +COPY opampsupervisor /collector/opampsupervisor + COPY release_deps/opentelemetry-java-contrib-jmx-metrics.jar /opt/opentelemetry-java-contrib-jmx-metrics.jar COPY release_deps/plugins /etc/otel/plugins @@ -71,6 +73,4 @@ RUN chmod 0600 \ USER otel WORKDIR /etc/otel -# User should mount /etc/otel/config.yaml at runtime using docker volumes / k8s configmap unless -# connecting to an OpAMP platform. -ENTRYPOINT [ "/collector/observiq-otel-collector" ] +ENTRYPOINT [ "/collector/opampsupervisor", "--config", "/etc/otel/supervisor.yaml" ] diff --git a/docker/Dockerfile.ubuntu b/docker/Dockerfile.ubuntu index 9acfb8a12..41d5ea8cf 100644 --- a/docker/Dockerfile.ubuntu +++ b/docker/Dockerfile.ubuntu @@ -58,6 +58,8 @@ COPY LICENSE /licenses/observiq-otel-collector.license COPY release_deps/VERSION.txt /etc/otel/VERSION.txt COPY observiq-otel-collector /collector/observiq-otel-collector +COPY opampsupervisor /collector/opampsupervisor + COPY release_deps/opentelemetry-java-contrib-jmx-metrics.jar /opt/opentelemetry-java-contrib-jmx-metrics.jar COPY release_deps/plugins /etc/otel/plugins @@ -72,6 +74,4 @@ RUN chmod 0600 \ USER otel WORKDIR /etc/otel -# User should mount /etc/otel/config.yaml at runtime using docker volumes / k8s configmap unless -# connecting to an OpAMP platform. -ENTRYPOINT [ "/collector/observiq-otel-collector" ] +ENTRYPOINT [ "/collector/opampsupervisor", "--config", "/etc/otel/supervisor.yaml" ] diff --git a/exporter/googlecloudexporter/go.mod b/exporter/googlecloudexporter/go.mod index e57b656d4..56caa3a72 100644 --- a/exporter/googlecloudexporter/go.mod +++ b/exporter/googlecloudexporter/go.mod @@ -99,4 +99,4 @@ require ( ) // Needed until 'version' package changes are included in a release -replace github.com/observiq/bindplane-agent/internal/version v1.56.0 => github.com/observiq/bindplane-agent/internal/version v0.0.0-20240717172323-a1d3e6ed4aab +replace github.com/observiq/bindplane-agent/internal/version => ../../internal/version diff --git a/exporter/googlecloudexporter/go.sum b/exporter/googlecloudexporter/go.sum index 2e6de6dd8..0c7e91e02 100644 --- a/exporter/googlecloudexporter/go.sum +++ b/exporter/googlecloudexporter/go.sum @@ -256,8 +256,6 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= -github.com/observiq/bindplane-agent/internal/version v0.0.0-20240717172323-a1d3e6ed4aab h1:sj9huSMQ9MqOWRGJ1OJtIhpXZZpg1OoB8YvJ3kBCYlg= -github.com/observiq/bindplane-agent/internal/version v0.0.0-20240717172323-a1d3e6ed4aab/go.mod h1:TfycUeyrZvoFI6crSlts5HxdHgxYtoYaXwSZ2ZQIj5I= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.113.0 h1:aomBl+rFWqedr0EePjovG0VQnqrEzsOJTtKgPSVa70w= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.113.0/go.mod h1:RmVx108AyAbiRDe43i3yvJpwDpIZxNNrn0aN4Vxy//8= diff --git a/exporter/googlemanagedprometheusexporter/go.mod b/exporter/googlemanagedprometheusexporter/go.mod index 5539b1230..9f34cd69b 100644 --- a/exporter/googlemanagedprometheusexporter/go.mod +++ b/exporter/googlemanagedprometheusexporter/go.mod @@ -98,4 +98,4 @@ require ( ) // Needed until 'version' package changes are included in a release -replace github.com/observiq/bindplane-agent/internal/version v1.56.0 => github.com/observiq/bindplane-agent/internal/version v0.0.0-20240717172323-a1d3e6ed4aab +replace github.com/observiq/bindplane-agent/internal/version => ../../internal/version diff --git a/exporter/googlemanagedprometheusexporter/go.sum b/exporter/googlemanagedprometheusexporter/go.sum index edd3c7b88..48a81a04c 100644 --- a/exporter/googlemanagedprometheusexporter/go.sum +++ b/exporter/googlemanagedprometheusexporter/go.sum @@ -274,8 +274,6 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= -github.com/observiq/bindplane-agent/internal/version v0.0.0-20240717172323-a1d3e6ed4aab h1:sj9huSMQ9MqOWRGJ1OJtIhpXZZpg1OoB8YvJ3kBCYlg= -github.com/observiq/bindplane-agent/internal/version v0.0.0-20240717172323-a1d3e6ed4aab/go.mod h1:TfycUeyrZvoFI6crSlts5HxdHgxYtoYaXwSZ2ZQIj5I= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.113.0 h1:yLkgJN2Jf9WwGiCO3zwaRLBE1hHkBrPx+xZ0wQfrHT4= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.113.0/go.mod h1:KpC56fV+8M22+JEum4pnTCVfPgTLIr6YV0Tsdbad+Mw= diff --git a/manifests/minimal/manifest.yaml b/manifests/minimal/manifest.yaml index 3a792acdb..fae850605 100644 --- a/manifests/minimal/manifest.yaml +++ b/manifests/minimal/manifest.yaml @@ -4,26 +4,26 @@ dist: description: ObservIQ's minimal distro for OpenTelemetry Collector version: "v0.0.1" output_path: ./dist - otelcol_version: 0.105.0 + otelcol_version: 0.106.1 conf_resolver: default_uri_scheme: "env" extensions: - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/opampextension v0.105.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/opampextension v0.106.1 - gomod: github.com/observiq/bindplane-agent/extension/bindplaneextension v1.56.0 path: "./extension/bindplaneextension" exporters: - - gomod: go.opentelemetry.io/collector/exporter/nopexporter v0.105.0 + - gomod: go.opentelemetry.io/collector/exporter/nopexporter v0.106.1 processors: - - gomod: github.com/observiq/bindplane-agent/processor/snapshotprocessor v1.56.0 + - gomod: github.com/observiq/bindplane-agent/processor/snapshotprocessor v1.58.0 path: "./processor/snapshotprocessor" receivers: - - gomod: go.opentelemetry.io/collector/receiver/nopreceiver v0.105.0 + - gomod: go.opentelemetry.io/collector/receiver/nopreceiver v0.106.1 connectors: [] diff --git a/manifests/observIQ/manifest.yaml b/manifests/observIQ/manifest.yaml index f8a005cd2..2c9b30d57 100644 --- a/manifests/observIQ/manifest.yaml +++ b/manifests/observIQ/manifest.yaml @@ -6,265 +6,265 @@ dist: description: ObservIQ's custom distro for OpenTelemetry Collector version: "v2.0.0" output_path: ./builder - otelcol_version: 0.105.0 + otelcol_version: 0.106.1 conf_resolver: default_uri_scheme: "env" extensions: - - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.105.0 - - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/asapauthextension v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/jaegerencodingextension v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/zipkinencodingextension v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetterextension v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarderextension v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/dockerobserver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecstaskobserver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/hostobserver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/oidcauthextension v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/opampextension v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage v0.105.0 - - gomod: github.com/observiq/bindplane-agent/extension/bindplaneextension v1.57.0 + - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.106.1 + - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/asapauthextension v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/jaegerencodingextension v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/zipkinencodingextension v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetterextension v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarderextension v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/dockerobserver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecstaskobserver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/hostobserver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/oidcauthextension v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/opampextension v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage v0.106.1 + - gomod: github.com/observiq/bindplane-agent/extension/bindplaneextension v1.58.0 path: "./extension/bindplaneextension" exporters: - - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.105.0 - - gomod: go.opentelemetry.io/collector/exporter/loggingexporter v0.105.0 - - gomod: go.opentelemetry.io/collector/exporter/nopexporter v0.105.0 - - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.105.0 - - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuredataexplorerexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/cassandraexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/clickhouseexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/coralogixexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudpubsubexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombmarkerexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/lokiexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmoexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/pulsarexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tencentcloudlogserviceexporter v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.105.0 - - gomod: github.com/observiq/bindplane-agent/exporter/azureblobexporter v1.57.0 + - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.106.1 + - gomod: go.opentelemetry.io/collector/exporter/loggingexporter v0.106.1 + - gomod: go.opentelemetry.io/collector/exporter/nopexporter v0.106.1 + - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.106.1 + - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuredataexplorerexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/cassandraexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/clickhouseexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/coralogixexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudpubsubexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombmarkerexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/lokiexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmoexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/pulsarexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tencentcloudlogserviceexporter v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.106.1 + - gomod: github.com/observiq/bindplane-agent/exporter/azureblobexporter v1.58.0 path: "./exporter/azureblobexporter" - - gomod: github.com/observiq/bindplane-agent/exporter/chronicleexporter v1.57.0 + - gomod: github.com/observiq/bindplane-agent/exporter/chronicleexporter v1.58.0 path: "./exporter/chronicleexporter" - - gomod: github.com/observiq/bindplane-agent/exporter/chronicleforwarderexporter v1.57.0 + - gomod: github.com/observiq/bindplane-agent/exporter/chronicleforwarderexporter v1.58.0 path: "./exporter/chronicleforwarderexporter" - - gomod: github.com/observiq/bindplane-agent/exporter/googlecloudexporter v1.57.0 + - gomod: github.com/observiq/bindplane-agent/exporter/googlecloudexporter v1.58.0 path: "./exporter/googlecloudexporter" - - gomod: github.com/observiq/bindplane-agent/exporter/googlemanagedprometheusexporter v1.57.0 + - gomod: github.com/observiq/bindplane-agent/exporter/googlemanagedprometheusexporter v1.58.0 path: "./exporter/googlemanagedprometheusexporter" - - gomod: github.com/observiq/bindplane-agent/exporter/snowflakeexporter v1.57.0 + - gomod: github.com/observiq/bindplane-agent/exporter/snowflakeexporter v1.58.0 path: "./exporter/snowflakeexporter" processors: - - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.105.0 - - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/redactionprocessor v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/remotetapprocessor v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/sumologicprocessor v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.105.0 - - gomod: github.com/observiq/bindplane-agent/processor/datapointcountprocessor v1.57.0 + - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.106.1 + - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/redactionprocessor v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/remotetapprocessor v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/sumologicprocessor v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.106.1 + - gomod: github.com/observiq/bindplane-agent/processor/datapointcountprocessor v1.58.0 path: "./processor/datapointcountprocessor" - - gomod: github.com/observiq/bindplane-agent/processor/logcountprocessor v1.57.0 + - gomod: github.com/observiq/bindplane-agent/processor/logcountprocessor v1.58.0 path: "./processor/logcountprocessor" - - gomod: github.com/observiq/bindplane-agent/processor/logdeduplicationprocessor v1.57.0 + - gomod: github.com/observiq/bindplane-agent/processor/logdeduplicationprocessor v1.58.0 path: "./processor/logdeduplicationprocessor" - - gomod: github.com/observiq/bindplane-agent/processor/lookupprocessor v1.57.0 + - gomod: github.com/observiq/bindplane-agent/processor/lookupprocessor v1.58.0 path: "./processor/lookupprocessor" - - gomod: github.com/observiq/bindplane-agent/processor/maskprocessor v1.57.0 + - gomod: github.com/observiq/bindplane-agent/processor/maskprocessor v1.58.0 path: "./processor/maskprocessor" - - gomod: github.com/observiq/bindplane-agent/processor/metricextractprocessor v1.57.0 + - gomod: github.com/observiq/bindplane-agent/processor/metricextractprocessor v1.58.0 path: "./processor/metricextractprocessor" - - gomod: github.com/observiq/bindplane-agent/processor/metricstatsprocessor v1.57.0 + - gomod: github.com/observiq/bindplane-agent/processor/metricstatsprocessor v1.58.0 path: "./processor/metricstatsprocessor" - - gomod: github.com/observiq/bindplane-agent/processor/removeemptyvaluesprocessor v1.57.0 + - gomod: github.com/observiq/bindplane-agent/processor/removeemptyvaluesprocessor v1.58.0 path: "./processor/removeemptyvaluesprocessor" - - gomod: github.com/observiq/bindplane-agent/processor/resourceattributetransposerprocessor v1.57.0 + - gomod: github.com/observiq/bindplane-agent/processor/resourceattributetransposerprocessor v1.58.0 path: "./processor/resourceattributetransposerprocessor" - - gomod: github.com/observiq/bindplane-agent/processor/samplingprocessor v1.57.0 + - gomod: github.com/observiq/bindplane-agent/processor/samplingprocessor v1.58.0 path: "./processor/samplingprocessor" - - gomod: github.com/observiq/bindplane-agent/processor/snapshotprocessor v1.57.0 + - gomod: github.com/observiq/bindplane-agent/processor/snapshotprocessor v1.58.0 path: "./processor/snapshotprocessor" - - gomod: github.com/observiq/bindplane-agent/processor/spancountprocessor v1.57.0 + - gomod: github.com/observiq/bindplane-agent/processor/spancountprocessor v1.58.0 path: "./processor/spancountprocessor" - - gomod: github.com/observiq/bindplane-agent/processor/throughputmeasurementprocessor v1.57.0 + - gomod: github.com/observiq/bindplane-agent/processor/throughputmeasurementprocessor v1.58.0 path: "./processor/throughputmeasurementprocessor" receivers: - - gomod: go.opentelemetry.io/collector/receiver/nopreceiver v0.105.0 - - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachesparkreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscloudwatchreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsfirehosereceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureblobreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureeventhubreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azuremonitorreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/chronyreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudflarereceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudfoundryreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchdbreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/expvarreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filestatsreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudpubsubreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudspannerreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/haproxyreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/httpcheckreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/influxdbreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8seventsreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sobjectsreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkametricsreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kubeletstatsreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/lokireceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/memcachedreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/namedpipereceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nginxreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nsxtreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/oracledbreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otlpjsonfilereceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/podmanreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/postgresqlreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefareceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefbreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/pulsarreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/rabbitmqreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/saphanareceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/skywalkingreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snmpreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solacereceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sshcheckreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcplogreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/udplogreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/wavefrontreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/webhookeventreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowsperfcountersreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zookeeperreceiver v0.105.0 - - gomod: github.com/observiq/bindplane-agent/receiver/awss3rehydrationreceiver v1.57.0 + - gomod: go.opentelemetry.io/collector/receiver/nopreceiver v0.106.1 + - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachesparkreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscloudwatchreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsfirehosereceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureblobreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureeventhubreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azuremonitorreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/chronyreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudflarereceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudfoundryreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchdbreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/expvarreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filestatsreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudpubsubreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudspannerreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/haproxyreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/httpcheckreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/influxdbreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8seventsreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sobjectsreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkametricsreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kubeletstatsreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/lokireceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/memcachedreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/namedpipereceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nginxreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nsxtreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/oracledbreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otlpjsonfilereceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/podmanreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/postgresqlreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefareceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefbreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/pulsarreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/rabbitmqreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/saphanareceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/skywalkingreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snmpreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solacereceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sshcheckreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcplogreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/udplogreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/wavefrontreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/webhookeventreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowsperfcountersreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zookeeperreceiver v0.106.1 + - gomod: github.com/observiq/bindplane-agent/receiver/awss3rehydrationreceiver v1.58.0 path: "./receiver/awss3rehydrationreceiver" - - gomod: github.com/observiq/bindplane-agent/receiver/azureblobrehydrationreceiver v1.57.0 + - gomod: github.com/observiq/bindplane-agent/receiver/azureblobrehydrationreceiver v1.58.0 path: "./receiver/azureblobrehydrationreceiver" - - gomod: github.com/observiq/bindplane-agent/receiver/httpreceiver v1.57.0 + - gomod: github.com/observiq/bindplane-agent/receiver/httpreceiver v1.58.0 path: "./receiver/httpreceiver" - - gomod: github.com/observiq/bindplane-agent/receiver/m365receiver v1.57.0 + - gomod: github.com/observiq/bindplane-agent/receiver/m365receiver v1.58.0 path: "./receiver/m365receiver" - - gomod: github.com/observiq/bindplane-agent/receiver/pluginreceiver v1.57.0 + - gomod: github.com/observiq/bindplane-agent/receiver/pluginreceiver v1.58.0 path: "./receiver/pluginreceiver" - - gomod: github.com/observiq/bindplane-agent/receiver/routereceiver v1.57.0 + - gomod: github.com/observiq/bindplane-agent/receiver/routereceiver v1.58.0 path: "./receiver/routereceiver" - - gomod: github.com/observiq/bindplane-agent/receiver/sapnetweaverreceiver v1.57.0 + - gomod: github.com/observiq/bindplane-agent/receiver/sapnetweaverreceiver v1.58.0 path: "./receiver/sapnetweaverreceiver" - - gomod: github.com/observiq/bindplane-agent/receiver/telemetrygeneratorreceiver v1.57.0 + - gomod: github.com/observiq/bindplane-agent/receiver/telemetrygeneratorreceiver v1.58.0 path: "./receiver/telemetrygeneratorreceiver" connectors: - - gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/roundrobinconnector v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector v0.105.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.105.0 + - gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/roundrobinconnector v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector v0.106.1 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.106.1 # When adding a replace, add a comment before it to document why it's needed and when it can be removed replaces: diff --git a/scripts/install/install_macos.sh b/scripts/install/install_macos.sh index 200ae63f1..50ed3baf1 100755 --- a/scripts/install/install_macos.sh +++ b/scripts/install/install_macos.sh @@ -23,7 +23,7 @@ DOWNLOAD_BASE="https://github.com/observIQ/bindplane-agent/releases/download" PREREQS="printf sed uname tr find grep" TMP_DIR="${TMPDIR:-"/tmp/"}observiq-otel-collector" # Allow this to be overriden by cannonical TMPDIR env var INSTALL_DIR="/opt/observiq-otel-collector" -SUPERVISOR_YML_PATH="$INSTALL_DIR/supervisor-config.yaml" +SUPERVISOR_YML_PATH="$INSTALL_DIR/supervisor.yaml" SCRIPT_NAME="$0" INDENT_WIDTH=' ' indent="" @@ -537,7 +537,7 @@ install_package() { succeeded fi - # If an endpoint was specified, we need to write the supervisor-config.yaml + # If an endpoint was specified, we need to write the supervisor.yaml if [ -n "$OPAMP_ENDPOINT" ]; then create_supervisor_config "$SUPERVISOR_YML_PATH" fi diff --git a/scripts/install/install_unix.sh b/scripts/install/install_unix.sh index c43e8dd67..4ba924463 100755 --- a/scripts/install/install_unix.sh +++ b/scripts/install/install_unix.sh @@ -20,16 +20,16 @@ PACKAGE_NAME="observiq-otel-collector" DOWNLOAD_BASE="https://github.com/observIQ/bindplane-agent/releases/download" # Determine if we need service or systemctl for prereqs -if command -v systemctl > /dev/null 2>&1; then +if command -v systemctl >/dev/null 2>&1; then SVC_PRE=systemctl -elif command -v service > /dev/null 2>&1; then +elif command -v service >/dev/null 2>&1; then SVC_PRE=service fi # Script Constants -COLLECTOR_USER="observiq-otel-collector" TMP_DIR=${TMPDIR:-"/tmp"} # Allow this to be overriden by cannonical TMPDIR env var -MANAGEMENT_YML_PATH="/opt/observiq-otel-collector/manager.yaml" +INSTALL_DIR="/opt/observiq-otel-collector" +SUPERVISOR_YML_PATH="$INSTALL_DIR/supervisor.yaml" PREREQS="curl printf $SVC_PRE sed uname cut" SCRIPT_NAME="$0" INDENT_WIDTH=' ' @@ -78,7 +78,7 @@ fi printf() { if [ "$non_interactive" = "false" ] || [ "$error_mode" = "true" ]; then if command -v sed >/dev/null; then - command printf -- "$@" | sed -r "$sed_ignore s/^/$indent/g" # Ignore sole reset characters if defined + command printf -- "$@" | sed -r "$sed_ignore s/^/$indent/g" # Ignore sole reset characters if defined else # Ignore $* suggestion as this breaks the output # shellcheck disable=SC2145 @@ -87,36 +87,36 @@ printf() { fi } -increase_indent() { indent="$INDENT_WIDTH$indent" ; } -decrease_indent() { indent="${indent#*"$INDENT_WIDTH"}" ; } +increase_indent() { indent="$INDENT_WIDTH$indent"; } +decrease_indent() { indent="${indent#*"$INDENT_WIDTH"}"; } # Color functions reset only when given an argument -bold() { command printf "$bold$*$(if [ -n "$1" ]; then command printf "$reset"; fi)" ; } -underline() { command printf "$underline$*$(if [ -n "$1" ]; then command printf "$reset"; fi)" ; } -standout() { command printf "$standout$*$(if [ -n "$1" ]; then command printf "$reset"; fi)" ; } +bold() { command printf "$bold$*$(if [ -n "$1" ]; then command printf "$reset"; fi)"; } +underline() { command printf "$underline$*$(if [ -n "$1" ]; then command printf "$reset"; fi)"; } +standout() { command printf "$standout$*$(if [ -n "$1" ]; then command printf "$reset"; fi)"; } # Ignore "parameters are never passed" # shellcheck disable=SC2120 -reset() { command printf "$reset$*$(if [ -n "$1" ]; then command printf "$reset"; fi)" ; } -bg_black() { command printf "$bg_black$*$(if [ -n "$1" ]; then command printf "$reset"; fi)" ; } -bg_blue() { command printf "$bg_blue$*$(if [ -n "$1" ]; then command printf "$reset"; fi)" ; } -bg_cyan() { command printf "$bg_cyan$*$(if [ -n "$1" ]; then command printf "$reset"; fi)" ; } -bg_green() { command printf "$bg_green$*$(if [ -n "$1" ]; then command printf "$reset"; fi)" ; } -bg_magenta() { command printf "$bg_magenta$*$(if [ -n "$1" ]; then command printf "$reset"; fi)" ; } -bg_red() { command printf "$bg_red$*$(if [ -n "$1" ]; then command printf "$reset"; fi)" ; } -bg_white() { command printf "$bg_white$*$(if [ -n "$1" ]; then command printf "$reset"; fi)" ; } -bg_yellow() { command printf "$bg_yellow$*$(if [ -n "$1" ]; then command printf "$reset"; fi)" ; } -fg_black() { command printf "$fg_black$*$(if [ -n "$1" ]; then command printf "$reset"; fi)" ; } -fg_blue() { command printf "$fg_blue$*$(if [ -n "$1" ]; then command printf "$reset"; fi)" ; } -fg_cyan() { command printf "$fg_cyan$*$(if [ -n "$1" ]; then command printf "$reset"; fi)" ; } -fg_green() { command printf "$fg_green$*$(if [ -n "$1" ]; then command printf "$reset"; fi)" ; } -fg_magenta() { command printf "$fg_magenta$*$(if [ -n "$1" ]; then command printf "$reset"; fi)" ; } -fg_red() { command printf "$fg_red$*$(if [ -n "$1" ]; then command printf "$reset"; fi)" ; } -fg_white() { command printf "$fg_white$*$(if [ -n "$1" ]; then command printf "$reset"; fi)" ; } -fg_yellow() { command printf "$fg_yellow$*$(if [ -n "$1" ]; then command printf "$reset"; fi)" ; } +reset() { command printf "$reset$*$(if [ -n "$1" ]; then command printf "$reset"; fi)"; } +bg_black() { command printf "$bg_black$*$(if [ -n "$1" ]; then command printf "$reset"; fi)"; } +bg_blue() { command printf "$bg_blue$*$(if [ -n "$1" ]; then command printf "$reset"; fi)"; } +bg_cyan() { command printf "$bg_cyan$*$(if [ -n "$1" ]; then command printf "$reset"; fi)"; } +bg_green() { command printf "$bg_green$*$(if [ -n "$1" ]; then command printf "$reset"; fi)"; } +bg_magenta() { command printf "$bg_magenta$*$(if [ -n "$1" ]; then command printf "$reset"; fi)"; } +bg_red() { command printf "$bg_red$*$(if [ -n "$1" ]; then command printf "$reset"; fi)"; } +bg_white() { command printf "$bg_white$*$(if [ -n "$1" ]; then command printf "$reset"; fi)"; } +bg_yellow() { command printf "$bg_yellow$*$(if [ -n "$1" ]; then command printf "$reset"; fi)"; } +fg_black() { command printf "$fg_black$*$(if [ -n "$1" ]; then command printf "$reset"; fi)"; } +fg_blue() { command printf "$fg_blue$*$(if [ -n "$1" ]; then command printf "$reset"; fi)"; } +fg_cyan() { command printf "$fg_cyan$*$(if [ -n "$1" ]; then command printf "$reset"; fi)"; } +fg_green() { command printf "$fg_green$*$(if [ -n "$1" ]; then command printf "$reset"; fi)"; } +fg_magenta() { command printf "$fg_magenta$*$(if [ -n "$1" ]; then command printf "$reset"; fi)"; } +fg_red() { command printf "$fg_red$*$(if [ -n "$1" ]; then command printf "$reset"; fi)"; } +fg_white() { command printf "$fg_white$*$(if [ -n "$1" ]; then command printf "$reset"; fi)"; } +fg_yellow() { command printf "$fg_yellow$*$(if [ -n "$1" ]; then command printf "$reset"; fi)"; } # Intentionally using variables in format string # shellcheck disable=SC2059 -info() { printf "$*\\n" ; } +info() { printf "$*\\n"; } # Intentionally using variables in format string # shellcheck disable=SC2059 warn() { @@ -135,7 +135,7 @@ error() { } # Intentionally using variables in format string # shellcheck disable=SC2059 -success() { printf "$fg_green$*$reset\\n" ; } +success() { printf "$fg_green$*$reset\\n"; } # Ignore 'arguments are never passed' # shellcheck disable=SC2120 prompt() { @@ -146,13 +146,12 @@ prompt() { fi } -bindplane_banner() -{ +bindplane_banner() { if [ "$non_interactive" = "false" ]; then fg_cyan " oooooooooo. o8o .o8 ooooooooo. oooo\\n" - fg_cyan " '888' '88b '\"' \"888 '888 'Y88. '888\\n" + fg_cyan " '888' '88b '\"' \"888 '888 'Y88. '888\\n" fg_cyan " 888 888 oooo ooo. .oo. .oooo888 888 .d88' 888 .oooo. ooo. .oo. .ooooo.\\n" - fg_cyan " 888oooo888' '888 '888P\"Y88b d88' '888 888ooo88P' 888 'P )88b '888P\"Y88b d88' '88b\\n" + fg_cyan " 888oooo888' '888 '888P\"Y88b d88' '888 888ooo88P' 888 'P )88b '888P\"Y88b d88' '88b\\n" fg_cyan " 888 '88b 888 888 888 888 888 888 888 .oP\"888 888 888 888ooo888\\n" fg_cyan " 888 .88P 888 888 888 888 888 888 888 d8( 888 888 888 888 .o\\n" fg_cyan " o888bood8P' o888o o888o o888o 'Y8bod88P\" o888o o888o 'Y888\"\"8o o888o o888o '88bod8P'\\n" @@ -161,20 +160,19 @@ bindplane_banner() fi } -separator() { printf "===================================================\\n" ; } +separator() { printf "===================================================\\n"; } -banner() -{ +banner() { printf "\\n" separator - printf "| %s\\n" "$*" ; + printf "| %s\\n" "$*" separator } -usage() -{ +usage() { increase_indent - USAGE=$(cat <&2 if [ -n "$0" ]; then @@ -261,16 +257,14 @@ error_exit() force_exit } -print_prereq_line() -{ +print_prereq_line() { if [ -n "$2" ]; then command printf "\\n${indent} - " command printf "[$1]: $2" fi } -check_failure() -{ +check_failure() { if [ "$indent" != '' ]; then increase_indent; fi command printf "${indent}${fg_red}ERROR: %s check failed!${reset}" "$1" @@ -284,61 +278,57 @@ check_failure() force_exit } -succeeded() -{ +succeeded() { increase_indent success "Succeeded!" decrease_indent } -failed() -{ +failed() { error "Failed!" } # This will set all installation variables # at the beginning of the script. -setup_installation() -{ - banner "Configuring Installation Variables" - increase_indent +setup_installation() { + banner "Configuring Installation Variables" + increase_indent - # Installation variables - set_os_arch - set_package_type + # Installation variables + set_os_arch + set_package_type - # if package_path is not set then download the package - if [ -z "$package_path" ]; then - set_download_urls - set_proxy - set_file_name - else - out_file_path="$package_path" - fi + # if package_path is not set then download the package + if [ -z "$package_path" ]; then + set_download_urls + set_proxy + set_file_name + else + out_file_path="$package_path" + fi - set_opamp_endpoint - set_opamp_labels - set_opamp_secret_key + set_opamp_endpoint + set_opamp_labels + set_opamp_secret_key - success "Configuration complete!" - decrease_indent + success "Configuration complete!" + decrease_indent } set_file_name() { - if [ -z "$version" ] ; then + if [ -z "$version" ]; then package_file_name="${PACKAGE_NAME}_linux_${arch}.${package_type}" else package_file_name="${PACKAGE_NAME}_v${version}_linux_${arch}.${package_type}" fi - out_file_path="$TMP_DIR/$package_file_name" + out_file_path="$TMP_DIR/$package_file_name" } -set_proxy() -{ +set_proxy() { if [ -n "$proxy" ]; then info "Using proxy from arguments: $proxy" if [ -n "$proxy_user" ]; then - while [ -z "$proxy_password" ] ; do + while [ -z "$proxy_password" ]; do increase_indent command printf "${indent}$(fg_blue "$proxy_user@$proxy")'s password: " stty -echo @@ -361,58 +351,55 @@ set_proxy() fi } - -set_os_arch() -{ +set_os_arch() { os_arch=$(uname -m) - case "$os_arch" in - # arm64 strings. These are from https://stackoverflow.com/questions/45125516/possible-values-for-uname-m - aarch64|arm64|aarch64_be|armv8b|armv8l) - os_arch="arm64" - ;; - x86_64) - os_arch="amd64" - ;; - # experimental PowerPC arch support for collector - ppc64) - os_arch="ppc64" - ;; - ppc64le) - os_arch="ppc64le" - ;; - # armv6/32bit. These are what raspberry pi can return, which is the main reason we support 32-bit arm - arm|armv6l|armv7l) - os_arch="arm" - ;; - *) - error_exit "$LINENO" "Unsupported os arch: $os_arch" - ;; + case "$os_arch" in + # arm64 strings. These are from https://stackoverflow.com/questions/45125516/possible-values-for-uname-m + aarch64 | arm64 | aarch64_be | armv8b | armv8l) + os_arch="arm64" + ;; + x86_64) + os_arch="amd64" + ;; + # experimental PowerPC arch support for collector + ppc64) + os_arch="ppc64" + ;; + ppc64le) + os_arch="ppc64le" + ;; + # armv6/32bit. These are what raspberry pi can return, which is the main reason we support 32-bit arm + arm | armv6l | armv7l) + os_arch="arm" + ;; + *) + error_exit "$LINENO" "Unsupported os arch: $os_arch" + ;; esac } # Set the package type before install -set_package_type() -{ +set_package_type() { # if package_path is set get the file extension otherwise look at what's available on the system if [ -n "$package_path" ]; then case "$package_path" in - *.deb) - package_type="deb" - ;; - *.rpm) - package_type="rpm" - ;; - *) - error_exit "$LINENO" "Unsupported package type: $package_path" - ;; + *.deb) + package_type="deb" + ;; + *.rpm) + package_type="rpm" + ;; + *) + error_exit "$LINENO" "Unsupported package type: $package_path" + ;; esac else - if command -v dpkg > /dev/null 2>&1; then - package_type="deb" - elif command -v rpm > /dev/null 2>&1; then - package_type="rpm" + if command -v dpkg >/dev/null 2>&1; then + package_type="deb" + elif command -v rpm >/dev/null 2>&1; then + package_type="rpm" else - error_exit "$LINENO" "Could not find dpkg or rpm on the system" + error_exit "$LINENO" "Could not find dpkg or rpm on the system" fi fi @@ -421,23 +408,22 @@ set_package_type() # This will set the urls to use when downloading the agent and its plugins. # These urls are constructed based on the --version flag or COLLECTOR_VERSION env variable. # If not specified, the version defaults to whatever the latest release on github is. -set_download_urls() -{ - if [ -z "$url" ] ; then - if [ -z "$version" ] ; then +set_download_urls() { + if [ -z "$url" ]; then + if [ -z "$version" ]; then # shellcheck disable=SC2153 version=$COLLECTOR_VERSION fi - if [ -z "$version" ] ; then + if [ -z "$version" ]; then version=$(latest_version) fi - if [ -z "$version" ] ; then + if [ -z "$version" ]; then error_exit "$LINENO" "Could not determine version to install" fi - if [ -z "$base_url" ] ; then + if [ -z "$base_url" ]; then base_url=$DOWNLOAD_BASE fi @@ -447,18 +433,16 @@ set_download_urls() fi } -set_opamp_endpoint() -{ - if [ -z "$opamp_endpoint" ] ; then +set_opamp_endpoint() { + if [ -z "$opamp_endpoint" ]; then opamp_endpoint="$ENDPOINT" fi OPAMP_ENDPOINT="$opamp_endpoint" } -set_opamp_labels() -{ - if [ -z "$opamp_labels" ] ; then +set_opamp_labels() { + if [ -z "$opamp_labels" ]; then opamp_labels=$LABELS fi @@ -469,9 +453,8 @@ set_opamp_labels() fi } -set_opamp_secret_key() -{ - if [ -z "$opamp_secret_key" ] ; then +set_opamp_secret_key() { + if [ -z "$opamp_secret_key" ]; then opamp_secret_key=$SECRET_KEY fi @@ -483,14 +466,13 @@ set_opamp_secret_key() } # Test connection to BindPlane if it was specified -connection_check() -{ - if [ -n "$check_bp_url" ] ; then +connection_check() { + if [ -n "$check_bp_url" ]; then if [ -n "$opamp_endpoint" ]; then HTTP_ENDPOINT="$(echo "${opamp_endpoint}" | sed -z 's#^ws#http#' | sed -z 's#/v1/opamp$##')" info "Testing connection to BindPlane: $fg_magenta$HTTP_ENDPOINT$reset..." - if curl --max-time 20 -s "${HTTP_ENDPOINT}" > /dev/null; then + if curl --max-time 20 -s "${HTTP_ENDPOINT}" >/dev/null; then succeeded else failed @@ -512,8 +494,7 @@ connection_check() } # This will check all prerequisites before running an installation. -check_prereqs() -{ +check_prereqs() { banner "Checking Prerequisites" increase_indent root_check @@ -526,70 +507,62 @@ check_prereqs() } # This checks to see if the user who is running the script has root permissions. -root_check() -{ +root_check() { system_user_name=$(id -un) - if [ "${system_user_name}" != 'root' ] - then + if [ "${system_user_name}" != 'root' ]; then failed error_exit "$LINENO" "Script needs to be run as root or with sudo" fi } # Test non-interactive mode compatibility -interactive_check() -{ +interactive_check() { # Incompatible with proxies unless both username and password are passed - if [ "$non_interactive" = "true" ] && [ -n "$proxy_password" ] - then + if [ "$non_interactive" = "true" ] && [ -n "$proxy_password" ]; then failed error_exit "$LINENO" "The proxy password must be set via the command line argument -P, if called non-interactively." fi # Incompatible with checking the BP url since it can be interactive on failed connection - if [ "$non_interactive" = "true" ] && [ "$check_bp_url" = "true" ] - then + if [ "$non_interactive" = "true" ] && [ "$check_bp_url" = "true" ]; then failed error_exit "$LINENO" "Checking the BindPlane server URL is not compatible with quiet (non-interactive) mode." fi } # This will check if the operating system is supported. -os_check() -{ +os_check() { info "Checking that the operating system is supported..." os_type=$(uname -s) case "$os_type" in - Linux) - succeeded - ;; - *) - failed - error_exit "$LINENO" "The operating system $(fg_yellow "$os_type") is not supported by this script." - ;; + Linux) + succeeded + ;; + *) + failed + error_exit "$LINENO" "The operating system $(fg_yellow "$os_type") is not supported by this script." + ;; esac } # This will check if the system architecture is supported. -os_arch_check() -{ +os_arch_check() { info "Checking for valid operating system architecture..." arch=$(uname -m) - case "$arch" in - x86_64|aarch64|ppc64|ppc64le|arm64|aarch64_be|armv8b|armv8l|arm|armv6l|armv7l) - succeeded - ;; - *) - failed - error_exit "$LINENO" "The operating system architecture $(fg_yellow "$arch") is not supported by this script." - ;; + case "$arch" in + x86_64 | aarch64 | ppc64 | ppc64le | arm64 | aarch64_be | armv8b | armv8l | arm | armv6l | armv7l) + succeeded + ;; + *) + failed + error_exit "$LINENO" "The operating system architecture $(fg_yellow "$arch") is not supported by this script." + ;; esac } # This will check if the current environment has # all required shell dependencies to run the installation. -dependencies_check() -{ +dependencies_check() { info "Checking for script dependencies..." FAILED_PREREQS='' for prerequisite in $PREREQS; do @@ -612,31 +585,28 @@ dependencies_check() } # This will check to ensure either dpkg or rpm is installedon the system -package_type_check() -{ +package_type_check() { info "Checking for package manager..." - if command -v dpkg > /dev/null 2>&1; then - succeeded - elif command -v rpm > /dev/null 2>&1; then - succeeded + if command -v dpkg >/dev/null 2>&1; then + succeeded + elif command -v rpm >/dev/null 2>&1; then + succeeded else - failed - error_exit "$LINENO" "Could not find dpkg or rpm on the system" + failed + error_exit "$LINENO" "Could not find dpkg or rpm on the system" fi } # latest_version gets the tag of the latest release, without the v prefix. -latest_version() -{ - curl -sSL -H"Accept: application/vnd.github.v3+json" https://api.github.com/repos/observIQ/observiq-otel-collector/releases/latest | \ - grep "\"tag_name\"" | \ +latest_version() { + curl -sSL -H"Accept: application/vnd.github.v3+json" https://api.github.com/repos/observIQ/observiq-otel-collector/releases/latest | + grep "\"tag_name\"" | sed -r 's/ *"tag_name": "v([0-9]+\.[0-9]+\.[0-9+])",/\1/' } # This will install the package by downloading the archived agent, # extracting the binaries, and then removing the archive. -install_package() -{ +install_package() { banner "Installing BindPlane Agent" increase_indent @@ -652,7 +622,7 @@ install_package() if [ -n "$proxy" ]; then info "Downloading package using proxy..." - fi + fi info "Downloading package..." eval curl -L "$proxy_args" "$collector_download_url" -o "$out_file_path" --progress-bar --fail || error_exit "$LINENO" "Failed to download package" @@ -660,10 +630,10 @@ install_package() fi info "Installing package..." - # if target install directory doesn't exist and we're using dpkg ensure a clean state + # if target install directory doesn't exist and we're using dpkg ensure a clean state # by checking for the package and running purge if it exists. - if [ ! -d "/opt/observiq-otel-collector" ] && [ "$package_type" = "deb" ]; then - dpkg -s "observiq-otel-collector" > /dev/null 2>&1 && dpkg --purge "observiq-otel-collector" > /dev/null 2>&1 + if [ ! -d "$INSTALL_DIR" ] && [ "$package_type" = "deb" ]; then + dpkg -s "observiq-otel-collector" >/dev/null 2>&1 && dpkg --purge "observiq-otel-collector" >/dev/null 2>&1 fi unpack_package || error_exit "$LINENO" "Failed to extract package" @@ -671,8 +641,8 @@ install_package() # If an endpoint was specified, we need to write the manager.yaml if [ -n "$OPAMP_ENDPOINT" ]; then - info "Creating manager yaml..." - create_manager_yml "$MANAGEMENT_YML_PATH" + info "Creating supervisor config..." + create_supervisor_config "$SUPERVISOR_YML_PATH" succeeded fi @@ -682,28 +652,28 @@ install_package() # We'll want to restart, which will start it if it wasn't running already, # and restart in the case that this was an upgrade on a running agent. info "Restarting service..." - systemctl restart observiq-otel-collector > /dev/null 2>&1 || error_exit "$LINENO" "Failed to restart service" + systemctl restart observiq-otel-collector >/dev/null 2>&1 || error_exit "$LINENO" "Failed to restart service" succeeded else info "Enabling service..." - systemctl enable --now observiq-otel-collector > /dev/null 2>&1 || error_exit "$LINENO" "Failed to enable service" + systemctl enable --now observiq-otel-collector >/dev/null 2>&1 || error_exit "$LINENO" "Failed to enable service" succeeded fi else case "$(service observiq-otel-collector status)" in - *running*) - # The service is running. - # We'll want to restart. - info "Restarting service..." - service observiq-otel-collector restart > /dev/null 2>&1 || error_exit "$LINENO" "Failed to restart service" - succeeded - ;; - *) - info "Enabling and starting service..." - chkconfig observiq-otel-collector on > /dev/null 2>&1 || error_exit "$LINENO" "Failed to enable service" - service observiq-otel-collector start > /dev/null 2>&1 || error_exit "$LINENO" "Failed to start service" - succeeded - ;; + *running*) + # The service is running. + # We'll want to restart. + info "Restarting service..." + service observiq-otel-collector restart >/dev/null 2>&1 || error_exit "$LINENO" "Failed to restart service" + succeeded + ;; + *) + info "Enabling and starting service..." + chkconfig observiq-otel-collector on >/dev/null 2>&1 || error_exit "$LINENO" "Failed to enable service" + service observiq-otel-collector start >/dev/null 2>&1 || error_exit "$LINENO" "Failed to start service" + succeeded + ;; esac fi @@ -711,96 +681,105 @@ install_package() decrease_indent } -unpack_package() -{ +unpack_package() { case "$package_type" in - deb) - dpkg --force-confold -i "$out_file_path" > /dev/null || error_exit "$LINENO" "Failed to unpack package" - ;; - rpm) - rpm -U "$out_file_path" > /dev/null || error_exit "$LINENO" "Failed to unpack package" - ;; - *) - error "Unrecognized package type" - return 1 - ;; + deb) + dpkg --force-confold -i "$out_file_path" >/dev/null || error_exit "$LINENO" "Failed to unpack package" + ;; + rpm) + rpm -U "$out_file_path" >/dev/null || error_exit "$LINENO" "Failed to unpack package" + ;; + *) + error "Unrecognized package type" + return 1 + ;; esac return 0 } -# create_manager_yml creates the manager.yml at the specified path, containing opamp information. -create_manager_yml() -{ - manager_yml_path="$1" - if [ ! -f "$manager_yml_path" ]; then - # Note here: We create the file and change permissions of the file here BEFORE writing info to it - # We do this because the file may contain a secret key, so we want 0 window when the - # file is readable by anyone other than the agent & root - command printf '' >> "$manager_yml_path" - - chgrp "$COLLECTOR_USER" "$manager_yml_path" - chown "$COLLECTOR_USER" "$manager_yml_path" - chmod 0640 "$manager_yml_path" - - command printf 'endpoint: "%s"\n' "$OPAMP_ENDPOINT" > "$manager_yml_path" - [ -n "$OPAMP_LABELS" ] && command printf 'labels: "%s"\n' "$OPAMP_LABELS" >> "$manager_yml_path" - [ -n "$OPAMP_SECRET_KEY" ] && command printf 'secret_key: "%s"\n' "$OPAMP_SECRET_KEY" >> "$manager_yml_path" +# create_supervisor_config creates the supervisor.yml at the specified path, containing opamp information. +create_supervisor_config() { + supervisor_yml_path="$1" + if [ ! -f "$supervisor_yml_path" ]; then + + # Note here: We create the file and change permissions of the file here BEFORE writing info to it. + # We do this because the file contains the secret key. + # We do not want the file readable by anyone other than root/obseriq-otel-collector. + command printf '' >>"$supervisor_yml_path" + chown observiq-otel-collector:observiq-otel-collector "$supervisor_yml_path" + chmod 0600 "$supervisor_yml_path" + + command printf 'server:\n' >"$supervisor_yml_path" + command printf ' endpoint: "%s"\n' "$OPAMP_ENDPOINT" >>"$supervisor_yml_path" + command printf ' headers:\n' >>"$supervisor_yml_path" + [ -n "$OPAMP_SECRET_KEY" ] && command printf ' Authorization: "Secret-Key %s"\n' "$OPAMP_SECRET_KEY" >>"$supervisor_yml_path" + command printf ' tls:\n' >>"$supervisor_yml_path" + command printf ' insecure: true\n' >>"$supervisor_yml_path" + command printf ' insecure_skip_verify: true\n' >>"$supervisor_yml_path" + command printf 'capabilities:\n' >>"$supervisor_yml_path" + command printf ' accepts_remote_config: true\n' >>"$supervisor_yml_path" + command printf ' reports_remote_config: true\n' >>"$supervisor_yml_path" + command printf 'agent:\n' >>"$supervisor_yml_path" + # TODO(dakota): Add logging config option when supervisor suppports it + command printf ' executable: "%s"\n' "$INSTALL_DIR/observiq-otel-collector" >>"$supervisor_yml_path" + command printf ' description:\n' >>"$supervisor_yml_path" + command printf ' non_identifying_attributes:\n' >>"$supervisor_yml_path" + [ -n "$OPAMP_LABELS" ] && command printf ' service.labels: "%s"\n' "$OPAMP_LABELS" >>"$supervisor_yml_path" + command printf 'storage:\n' >>"$supervisor_yml_path" + command printf ' directory: "%s"\n' "$INSTALL_DIR/supervisor_storage" >>"$supervisor_yml_path" fi } # This will display the results of an installation -display_results() -{ - banner 'Information' - increase_indent - info "Agent Home: $(fg_cyan "/opt/observiq-otel-collector")$(reset)" - info "Agent Config: $(fg_cyan "/opt/observiq-otel-collector/config.yaml")$(reset)" - if [ "$SVC_PRE" = "systemctl" ]; then - info "Start Command: $(fg_cyan "sudo systemctl start observiq-otel-collector")$(reset)" - info "Stop Command: $(fg_cyan "sudo systemctl stop observiq-otel-collector")$(reset)" - info "Status Command: $(fg_cyan "sudo systemctl status observiq-otel-collector")$(reset)" - else - info "Start Command: $(fg_cyan "sudo service observiq-otel-collector start")$(reset)" - info "Stop Command: $(fg_cyan "sudo service observiq-otel-collector stop")$(reset)" - info "Status Command: $(fg_cyan "sudo service observiq-otel-collector status")$(reset)" - fi - info "Logs Command: $(fg_cyan "sudo tail -F /opt/observiq-otel-collector/log/collector.log")$(reset)" - decrease_indent +display_results() { + banner 'Information' + increase_indent + info "Agent Home: $(fg_cyan "$INSTALL_DIR")$(reset)" + info "Agent Config: $(fg_cyan "$INSTALL_DIR/supervisor_storage/effective.yaml")$(reset)" + info "Agent Logs Command: $(fg_cyan "sudo tail -F $INSTALL_DIR/supervisor_storage/agent.log")$(reset)" + if [ "$SVC_PRE" = "systemctl" ]; then + info "Supervisor Start Command: $(fg_cyan "sudo systemctl start observiq-otel-collector")$(reset)" + info "Supervisor Stop Command: $(fg_cyan "sudo systemctl stop observiq-otel-collector")$(reset)" + info "Status Command: $(fg_cyan "sudo systemctl status observiq-otel-collector")$(reset)" + else + info "Supervisor Start Command: $(fg_cyan "sudo service observiq-otel-collector start")$(reset)" + info "Supervisor Stop Command: $(fg_cyan "sudo service observiq-otel-collector stop")$(reset)" + info "Status Command: $(fg_cyan "sudo service observiq-otel-collector status")$(reset)" + fi + decrease_indent - banner 'Support' - increase_indent - info "For more information on configuring the agent, see the docs:" - increase_indent - info "$(fg_cyan "https://github.com/observIQ/bindplane-agent/tree/main#bindplane-agent")$(reset)" - decrease_indent - info "If you have any other questions please contact us at $(fg_cyan support@observiq.com)$(reset)" - increase_indent - decrease_indent - decrease_indent + banner 'Support' + increase_indent + info "For more information on configuring the agent, see the docs:" + increase_indent + info "$(fg_cyan "https://github.com/observIQ/bindplane-agent/tree/main#bindplane-agent")$(reset)" + decrease_indent + info "If you have any other questions please contact us at $(fg_cyan support@observiq.com)$(reset)" + increase_indent + decrease_indent + decrease_indent - banner "$(fg_green Installation Complete!)" - return 0 + banner "$(fg_green Installation Complete!)" + return 0 } -uninstall_package() -{ +uninstall_package() { case "$package_type" in - deb) - dpkg -r "observiq-otel-collector" > /dev/null 2>&1 - ;; - rpm) - rpm -e "observiq-otel-collector" > /dev/null 2>&1 - ;; - *) - error "Unrecognized package type" - return 1 - ;; + deb) + dpkg -r "observiq-otel-collector" >/dev/null 2>&1 + ;; + rpm) + rpm -e "observiq-otel-collector" >/dev/null 2>&1 + ;; + *) + error "Unrecognized package type" + return 1 + ;; esac return 0 } -uninstall() -{ +uninstall() { set_package_type banner "Uninstalling BindPlane Agent" increase_indent @@ -811,11 +790,11 @@ uninstall() if [ "$SVC_PRE" = "systemctl" ]; then info "Stopping service..." - systemctl stop observiq-otel-collector > /dev/null || error_exit "$LINENO" "Failed to stop service" + systemctl stop observiq-otel-collector >/dev/null || error_exit "$LINENO" "Failed to stop service" succeeded info "Disabling service..." - systemctl disable observiq-otel-collector > /dev/null 2>&1 || error_exit "$LINENO" "Failed to disable service" + systemctl disable observiq-otel-collector >/dev/null 2>&1 || error_exit "$LINENO" "Failed to disable service" succeeded else info "Stopping service..." @@ -840,8 +819,7 @@ uninstall() banner "$(fg_green Uninstallation Complete!)" } -main() -{ +main() { # We do these checks before we process arguments, because # some of these options bail early, and we'd like to be sure that those commands # (e.g. uninstall) can run @@ -852,40 +830,62 @@ main() if [ $# -ge 1 ]; then while [ -n "$1" ]; do case "$1" in - -q|--quiet) - non_interactive="true" ; shift 1 ;; - -v|--version) - version=$2 ; shift 2 ;; - -l|--url) - url=$2 ; shift 2 ;; - -f|--file) - package_path=$2 ; shift 2 ;; - -x|--proxy) - proxy=$2 ; shift 2 ;; - -U|--proxy-user) - proxy_user=$2 ; shift 2 ;; - -P|--proxy-password) - proxy_password=$2 ; shift 2 ;; - -e|--endpoint) - opamp_endpoint=$2 ; shift 2 ;; - -k|--labels) - opamp_labels=$2 ; shift 2 ;; - -s|--secret-key) - opamp_secret_key=$2 ; shift 2 ;; - -c|--check-bp-url) - check_bp_url="true" ; shift 1 ;; - -b|--base-url) - base_url=$2 ; shift 2 ;; - -r|--uninstall) - uninstall - exit 0 - ;; - -h|--help) - usage - exit 0 - ;; + -q | --quiet) + non_interactive="true" + shift 1 + ;; + -v | --version) + version=$2 + shift 2 + ;; + -l | --url) + url=$2 + shift 2 + ;; + -f | --file) + package_path=$2 + shift 2 + ;; + -x | --proxy) + proxy=$2 + shift 2 + ;; + -U | --proxy-user) + proxy_user=$2 + shift 2 + ;; + -P | --proxy-password) + proxy_password=$2 + shift 2 + ;; + -e | --endpoint) + opamp_endpoint=$2 + shift 2 + ;; + -k | --labels) + opamp_labels=$2 + shift 2 + ;; + -s | --secret-key) + opamp_secret_key=$2 + shift 2 + ;; + -c | --check-bp-url) + check_bp_url="true" + shift 1 + ;; + -b | --base-url) + base_url=$2 + shift 2 + ;; + -h | --help) + usage + exit 0 + ;; --) - shift; break ;; + shift + break + ;; *) error "Invalid argument: $1" usage diff --git a/scripts/package/postinstall.sh b/scripts/package/postinstall.sh index 54cbceb86..777f35a83 100644 --- a/scripts/package/postinstall.sh +++ b/scripts/package/postinstall.sh @@ -13,7 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. - set -e manage_systemd_service() { @@ -26,15 +25,15 @@ manage_systemd_service() { echo "configured systemd service" - cat << EOF + cat < /dev/null 2>&1; then + if command -v systemctl >/dev/null 2>&1; then command printf "systemd" return - elif command -v service > /dev/null 2>&1; then + elif command -v service >/dev/null 2>&1; then command printf "service" return fi @@ -78,31 +77,49 @@ init_type() { manage_service() { service_type="$(init_type)" case "$service_type" in - systemd) - manage_systemd_service - ;; - service) - manage_sysv_service - ;; - *) - echo "could not detect init system, skipping service configuration" + systemd) + manage_systemd_service + ;; + service) + manage_sysv_service + ;; + *) + echo "could not detect init system, skipping service configuration" + ;; esac } finish_permissions() { # Goreleaser does not set plugin file permissions, so do them here # 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/* + chown -R observiq-otel-collector:observiq-otel-collector \ + /opt/observiq-otel-collector/observiq-otel-collector \ + /opt/observiq-otel-collector/opampsupervisor \ + /opt/observiq-otel-collector/plugins/* + chmod 0640 /opt/observiq-otel-collector/plugins/* +} - # Initialize the log file to ensure it is owned by observiq-otel-collector. - # This prevents the service (running as root) from assigning ownership to - # the root user. By doing so, we allow the user to switch to observiq-otel-collector - # user for 'non root' installs. - touch /opt/observiq-otel-collector/log/collector.log - chown observiq-otel-collector:observiq-otel-collector /opt/observiq-otel-collector/log/collector.log +install() { + finish_permissions + manage_service } +# upgrade should perform the same actions as install +upgrade() { + install +} -finish_permissions -manage_service +action="$1" + +case "$action" in +"0" | "install") + install + ;; +"1" | "upgrade") + upgrade + ;; +*) + install + ;; +esac diff --git a/scripts/package/postremove.sh b/scripts/package/postremove.sh new file mode 100644 index 000000000..09ff2b4d2 --- /dev/null +++ b/scripts/package/postremove.sh @@ -0,0 +1,54 @@ +#!/bin/sh +# Copyright observIQ, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -e + +remove() { + rm -f /usr/lib/systemd/system/observiq-otel-collector.service || { + printf 'failed to remove /usr/lib/systemd/system/observiq-otel-collector.service' + } + + rm -f /etc/sysconfig/observiq-otel-collector || { + printf 'failed to remove /etc/sysconfig/observiq-otel-collector' + } + + rm -f /etc/init.d/observiq-otel-collector || { + printf 'failed to remove /etc/init.d/observiq-otel-collector' + } + + # remove the entire folder + # pkg manager will remove most files but this will delete the remaining + rm -rf /opt/observiq-otel-collector || { + printf 'failed to remove /opt/observiq-otel-collector' + } +} + +upgrade() { + return +} + +action="$1" + +case "$action" in +"0" | "remove") + remove + ;; +"1" | "upgrade") + upgrade + ;; +*) + remove + ;; +esac diff --git a/scripts/package/preinstall.sh b/scripts/package/preinstall.sh index 14b41e473..0c660776e 100644 --- a/scripts/package/preinstall.sh +++ b/scripts/package/preinstall.sh @@ -13,21 +13,40 @@ # See the License for the specific language governing permissions and # limitations under the License. - set -e -username="observiq-otel-collector" +install() { + username="observiq-otel-collector" + + if getent group "$username" >/dev/null 2>&1; then + echo "Group ${username} already exists." + else + groupadd "$username" + fi + + if id "$username" >/dev/null 2>&1; then + echo "User ${username} already exists" + exit 0 + else + useradd --shell /sbin/nologin --system "$username" -g "$username" + fi +} -if getent group "$username" > /dev/null 2>&1; then - echo "Group ${username} already exists." -else - groupadd "$username" -fi +# Upgrade should perform the same steps as install +upgrade() { + install +} -if id "$username" > /dev/null 2>&1; then - echo "User ${username} already exists" - exit 0 -else - useradd --shell /sbin/nologin --system "$username" -g "$username" -fi +action="$1" +case "$action" in +"0" | "install") + install + ;; +"1" | "upgrade") + upgrade + ;; +*) + install + ;; +esac diff --git a/scripts/package/preremove.sh b/scripts/package/preremove.sh new file mode 100644 index 000000000..5f4a40a50 --- /dev/null +++ b/scripts/package/preremove.sh @@ -0,0 +1,61 @@ +#!/bin/sh +# Copyright observIQ, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -e + +handle_systemctl() { + systemctl stop observiq-otel-collector >/dev/null || { + printf 'failed to stop service' + } + systemctl disable observiq-otel-collector >/dev/null 2>&1 || { + printf 'failed to disable service' + } +} + +handle_service() { + service observiq-otel-collector stop || { + printf 'failed to stop service' + } + chkconfig observiq-otel-collector on >/dev/null 2>&1 || { + printf 'failed to disable service' + } +} + +remove() { + # Determine if we need service or systemctl + if command -v systemctl >/dev/null 2>&1; then + handle_systemctl + elif command -v service >/dev/null 2>&1; then + handle_service + fi +} + +upgrade() { + return +} + +action="$1" + +case "$action" in +"0" | "remove") + remove + ;; +"1" | "upgrade") + upgrade + ;; +*) + remove + ;; +esac diff --git a/service/com.observiq.collector.plist b/service/com.observiq.collector.plist index edf19c793..a09389e44 100644 --- a/service/com.observiq.collector.plist +++ b/service/com.observiq.collector.plist @@ -15,7 +15,7 @@ [INSTALLDIR]opampsupervisor --config - [INSTALLDIR]supervisor-config.yaml + [INSTALLDIR]supervisor.yaml RunAtLoad diff --git a/service/observiq-otel-collector b/service/observiq-otel-collector index fa56ff8c4..62e5cdccd 100644 --- a/service/observiq-otel-collector +++ b/service/observiq-otel-collector @@ -91,7 +91,7 @@ start() { # NOTE: startproc return 0, even if service is # already running to match LSB spec. - nohup "$PROGRAM" --config config.yaml > /dev/null 2>&1 & + nohup "$PROGRAM" --config supervisor.yaml > /dev/null 2>&1 & # Remember status and be verbose rc_status -v diff --git a/service/observiq-otel-collector.service b/service/observiq-otel-collector.service index 66e0c4fa7..61fb1a2e3 100644 --- a/service/observiq-otel-collector.service +++ b/service/observiq-otel-collector.service @@ -11,7 +11,7 @@ Environment=PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin Environment=OIQ_OTEL_COLLECTOR_HOME=/opt/observiq-otel-collector Environment=OIQ_OTEL_COLLECTOR_STORAGE=/opt/observiq-otel-collector/storage WorkingDirectory=/opt/observiq-otel-collector -ExecStart=/opt/observiq-otel-collector/observiq-otel-collector --config config.yaml +ExecStart=/opt/observiq-otel-collector/opampsupervisor --config supervisor.yaml SuccessExitStatus=0 TimeoutSec=20 StandardOutput=journal diff --git a/service/sysconfig/observiq-otel-collector b/service/sysconfig/observiq-otel-collector index 7a6af92a1..6ff327e34 100644 --- a/service/sysconfig/observiq-otel-collector +++ b/service/sysconfig/observiq-otel-collector @@ -5,7 +5,7 @@ # shellcheck disable=SC2148,SC2034 # Environment variables -BINARY=observiq-otel-collector +BINARY=opampsupervisor PROGRAM=/opt/observiq-otel-collector/"$BINARY" START_CMD="nohup /opt/observiq-otel-collector/$BINARY > /dev/null 2>&1 &" LOCKFILE=/var/lock/"$BINARY"