Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unix - Do Not Merge! #1651

Draft
wants to merge 14 commits into
base: release/v1.51.0
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ builds:
- windows
- linux
- darwin
- freebsd
- openbsd
- netbsd
- aix
- solaris
- illumos
goarch:
- amd64
- arm64
Expand All @@ -35,6 +41,42 @@ builds:
goarch: ppc64
- goos: darwin
goarch: ppc64le
- goos: netbsd
goarch: arm
- goos: netbsd
goarch: arm64
- goos: openbsd
goarch: arm
- goos: openbsd
goarch: arm64
- goos: openbsd
goarch: ppc64
- goos: openbsd
goarch: ppc64le
- goos: aix
goarch: arm64
- goos: aix
goarch: arm
- goos: aix
goarch: amd64
- goos: aix
goarch: ppc64le
- goos: solaris
goarch: arm
- goos: solaris
goarch: arm64
- goos: solaris
goarch: ppc64
- goos: solaris
goarch: ppc64le
- goos: illumos
goarch: arm
- goos: illumos
goarch: arm64
- goos: illumos
goarch: ppc64
- goos: illumos
goarch: ppc64le
ldflags:
- -s -w
- -X github.com/observiq/bindplane-agent/internal/version.version=v{{ .Version }}
Expand All @@ -52,6 +94,12 @@ builds:
- windows
- linux
- darwin
- freebsd
- openbsd
- netbsd
- aix
- solaris
- illumos
goarch:
- amd64
- arm64
Expand All @@ -71,6 +119,46 @@ builds:
goarch: ppc64
- goos: darwin
goarch: ppc64le
- goos: netbsd
goarch: arm
- goos: netbsd
goarch: arm64
- goos: netbsd
goarch: ppc64
- goos: netbsd
goarch: ppc64le
- goos: openbsd
goarch: arm
- goos: openbsd
goarch: arm64
- goos: openbsd
goarch: ppc64
- goos: openbsd
goarch: ppc64le
- goos: aix
goarch: arm64
- goos: aix
goarch: arm
- goos: aix
goarch: amd64
- goos: aix
goarch: ppc64le
- goos: solaris
goarch: arm
- goos: solaris
goarch: arm64
- goos: solaris
goarch: ppc64
- goos: solaris
goarch: ppc64le
- goos: illumos
goarch: arm
- goos: illumos
goarch: arm64
- goos: illumos
goarch: ppc64
- goos: illumos
goarch: ppc64le
ldflags:
- -s -w
- -X github.com/observiq/bindplane-agent/updater/internal/version.version=v{{ .Version }}
Expand Down Expand Up @@ -114,6 +202,9 @@ archives:
- src: release_deps/sysconfig/observiq-otel-collector
dst: "install/sysconfig"
strip_parent: true
- src: release_deps/observiq-otel-collector.aix.env
dst: "install/observiq-otel-collector.aix.env"
strip_parent: true
format_overrides:
- goos: windows
format: zip
Expand Down Expand Up @@ -202,20 +293,33 @@ nfpms:
mode: 0644
owner: root
group: root
# This file will be unused on modern systemd Linux or on AIX
# The postinstall.sh file removes this if it isn't needed
- src: service/observiq-otel-collector
dst: /etc/init.d/observiq-otel-collector
type: config|noreplace
file_info:
mode: 0755
owner: root
group: root
# This file will be unused on older Linux using sysv/init.d/rc.d or on AIX
# The postinstall.sh file removes this if it isn't needed
- src: service/sysconfig/observiq-otel-collector
dst: /etc/sysconfig/observiq-otel-collector
type: config
file_info:
mode: 0644
owner: root
group: root
# This file will be unused if/until nfpm & goreleaser get updated to support AIX rpm files
# The postinstall.sh file removes this on Linux
- src: service/observiq-otel-collector.aix.env
dst: /etc/observiq-otel-collector.aix.env
type: config
file_info:
mode: 0644
owner: root
group: root
scripts:
preinstall: ./scripts/package/preinstall.sh
postinstall: ./scripts/package/postinstall.sh
Expand Down
69 changes: 69 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,48 @@ build-all: build-linux build-darwin build-windows
.PHONY: build-linux
build-linux: build-linux-amd64 build-linux-arm64 build-linux-arm build-linux-ppc64 build-linux-ppc64le

.PHONY: build-unix
build-unix: build-darwin build-bsd build-aix build-solaris build-illumos

.PHONY: build-bsd
build-bsd: build-freebsd build-openbsd build-netbsd

.PHONY: build-aix
build-aix: build-aix-ppc64

.PHONY: build-solaris
build-solaris: build-solaris-amd64

.PHONY: build-illumos
build-illumos: build-illumos-amd64

.PHONY: build-darwin
build-darwin: build-darwin-amd64 build-darwin-arm64

.PHONY: build-freebsd
build-freebsd: build-freebsd-amd64 build-freebsd-arm build-freebsd-arm64

.PHONY: build-openbsd
build-openbsd: build-openbsd-amd64 build-openbsd-arm build-openbsd-arm64

.PHONY: build-netbsd
build-netbsd: build-netbsd-amd64 build-netbsd-arm

.PHONY: build-windows
build-windows: build-windows-amd64

.PHONY: build-aix-ppc64
build-aix-ppc64:
GOOS=aix GOARCH=ppc64 $(MAKE) build-binaries -j2

.PHONY: build-solaris-amd64
build-solaris-amd64:
GOOS=solaris GOARCH=amd64 $(MAKE) build-binaries -j2

.PHONY: build-illumos-amd64
build-illumos-amd64:
GOOS=illumos GOARCH=amd64 $(MAKE) build-binaries -j2

.PHONY: build-linux-ppc64
build-linux-ppc64:
GOOS=linux GOARCH=ppc64 $(MAKE) build-binaries -j2
Expand Down Expand Up @@ -81,6 +117,38 @@ build-darwin-amd64:
build-darwin-arm64:
GOOS=darwin GOARCH=arm64 $(MAKE) build-binaries -j2

.PHONY: build-freebsd-amd64
build-freebsd-amd64:
GOOS=freebsd GOARCH=amd64 $(MAKE) build-binaries -j2

.PHONY: build-freebsd-arm
build-freebsd-arm:
GOOS=freebsd GOARCH=arm $(MAKE) build-binaries -j2

.PHONY: build-freebsd-arm64
build-freebsd-arm64:
GOOS=freebsd GOARCH=arm64 $(MAKE) build-binaries -j2

.PHONY: build-openbsd-amd64
build-openbsd-amd64:
GOOS=openbsd GOARCH=amd64 $(MAKE) build-binaries -j2

.PHONY: build-openbsd-arm
build-openbsd-arm:
GOOS=openbsd GOARCH=arm $(MAKE) build-binaries -j2

.PHONY: build-openbsd-arm64
build-openbsd-arm64:
GOOS=openbsd GOARCH=arm64 $(MAKE) build-binaries -j2

.PHONY: build-netbsd-amd64
build-netbsd-amd64:
GOOS=netbsd GOARCH=amd64 $(MAKE) build-binaries -j2

.PHONY: build-netbsd-arm
build-netbsd-arm:
GOOS=netbsd GOARCH=arm $(MAKE) build-binaries -j2

.PHONY: build-windows-amd64
build-windows-amd64:
GOOS=windows GOARCH=amd64 $(MAKE) build-binaries -j2
Expand Down Expand Up @@ -212,6 +280,7 @@ release-prep:
@jq ".files[] | select(.service != null)" windows/wix.json >> release_deps/windows_service.json
@cp service/observiq-otel-collector.service release_deps/observiq-otel-collector.service
@cp service/observiq-otel-collector release_deps/observiq-otel-collector
@cp service/observiq-otel-collector.aix.env release_deps/observiq-otel-collector.aix.env
@cp -r ./service/sysconfig release_deps/

# Build and sign, skip release and ignore dirty git tree
Expand Down
48 changes: 31 additions & 17 deletions config/example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@ receivers:
# the agent is running on every minute.
# For more information on configuring the hostmetrics receiver, refer to the documentation here:
# https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver
hostmetrics:
collection_interval: 1m
scrapers:
# Theses scrapers work on all operating systems
load:
filesystem:
memory:
network:
# Remove these scrapers for macOS agents as they are not supported and will generate errors in the logs
cpu:
disk:
# hostmetrics:
# collection_interval: 1m
# scrapers:
# # Theses scrapers work on all operating systems
# load:
# filesystem:
# memory:
# network:
# # Remove these scrapers for macOS agents as they are not supported and will generate errors in the logs
# cpu:
# disk:
nop:

# The syslog receiver; this configuration will listen on every network interface on port 514
# for UDP syslog messages using the rfc3164 protocol.
Expand All @@ -33,27 +34,36 @@ processors:
# a certain time has passed or if a certain number of entries have been aggregated.
# For more information on configuring the batch processor, refer to the documentation here:
# https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor
batch:
# batch:
nop:

# 'exporters' specify configurations for certain exporters.
# See the README for more information on the exporters available for configuration.
exporters:
# The logging exporter; This exporter logs to stdout.
# For more information on configuring the logging exporter, refer to the documentation here:
# https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/loggingexporter
logging:
verbosity: detailed
# logging:
# verbosity: detailed
nop:

# 'service' specifies how to construct the data pipelines using the configurations above.
service:
telemetry:
metrics:
level: none
pipelines:
# 'metrics' specifies a metrics pipeline; metrics are scraped using the 'hostmetrics' receiver,
# which are aggregated into batches by the 'batch' processor,
# and are exported using the 'logging' exporter, printing the metrics to stdout.
#metrics:
# receivers: [hostmetrics]
# processors: [batch]
# exporters: [logging]
metrics:
receivers: [hostmetrics]
processors: [batch]
exporters: [logging]
receivers: [nop]
processors: [nop]
exporters: [nop]

# `logs` specifies the logging pipeline; logs are received using the 'syslog' receiver,
# which are then aggregated into batches by the 'batch' processor,
Expand All @@ -64,3 +74,7 @@ service:
# receivers: [syslog]
# processors: [batch]
# exporters: [logging]
logs:
receivers: [nop]
processors: [nop]
exporters: [nop]
2 changes: 2 additions & 0 deletions factories/exporters.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build linux || darwin || windows

package factories

import (
Expand Down
Loading
Loading