Skip to content
openobservePublic

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

2 watching

Forks

Latest commit

 

History

93 Commits

Folders and files

Repository files navigation

Agents

Scripts that configure and install the Open Observe agent on various platforms.

The Linux and Windows scripts work on plain hosts and auto-detect AWS EC2, GCP Compute Engine and Azure VMs, adding cloud resource attributes. On EC2, host.name is set from the instance Name tag when the instance has an IAM role with ec2:DescribeTags and can reach the EC2 API; otherwise host.name is the OS hostname.

Linux

Install

wget https://raw.githubusercontent.com/openobserve/agents/main/linux/install.sh && chmod +x install.sh && sudo ./install.sh {URL} {authorization_token}

e.g.

wget https://raw.githubusercontent.com/openobserve/agents/main/linux/install.sh && chmod +x install.sh && sudo ./install.sh https://api.openobserve.com/api/your_org/ cm9vdEBleGFtcGxlLmNvbTpDb21wbGV4cGFzcyMxMjM=

Tracing (optional)

Add --trace-* flags to also trace selected processes with eBPF, without code changes. This runs the collector as root and needs Linux 5.8+ (or RHEL-family 4.18 with the eBPF backports) with BTF. If the host can't run it, the install fails without touching the running collector. If tracing fails right after the collector restarts, the install stops and disables the collector (logs and metrics too) and exits with an error; re-run without the flags to recover.

sudo ./install.sh {URL} {authorization_token} --trace-ports 8080
sudo ./install.sh {URL} {authorization_token} --trace-exe '/opt/checkout/*' --service-name checkout
# Interpreted apps (python3, node, java) are matched by command line
sudo ./install.sh {URL} {authorization_token} --trace-cmd '*reports.py*'

--trace-ports takes ports and ranges; --trace-exe (executable path) and --trace-cmd (command line) take globs. All three can be repeated. --service-name reports every traced process under one name. Traced processes add a W3C traceparent header to their outgoing plain-text HTTP requests, so traces continue across hosts. Re-run without the flags to turn tracing off. See obi.md for details.

Network flows (optional)

Add --network-flows to also report the bytes each host sends to and receives from other hosts and networks, over any TCP or UDP protocol, as the obi_network_flow_bytes metric. It takes the networks to report on, as CIDR or CIDR=NAME entries; flows are labelled src_cidr and dst_cidr with the names, so give every host the same list. Like tracing, it needs Linux 5.8+ (or RHEL-family 4.18) with BTF and runs the collector as root. It works with or without the --trace-* flags, and doesn't trace anything on its own.

sudo ./install.sh {URL} {authorization_token} --network-flows '10.0.1.5/32=web1,10.0.1.6/32=db1,0.0.0.0/0=other'

See obi.md for the labels and caveats.

Uninstall

wget https://raw.githubusercontent.com/openobserve/agents/main/linux/uninstall.sh && chmod +x uninstall.sh && sudo ./uninstall.sh

Mac OS X

Collects host metrics, log files from the standard macOS locations, and the macOS unified log. See mac/README.md for details and tuning.

Install

macOS does not ship wget, so these use curl.

curl -O https://raw.githubusercontent.com/openobserve/agents/main/mac/install.sh && chmod +x install.sh && sudo ./install.sh {URL} {authorization_token}

e.g.

curl -O https://raw.githubusercontent.com/openobserve/agents/main/mac/install.sh && chmod +x install.sh && sudo ./install.sh https://api.openobserve.com/api/your_org/ cm9vdEBleGFtcGxlLmNvbTpDb21wbGV4cGFzcyMxMjM=

Uninstall

curl -O https://raw.githubusercontent.com/openobserve/agents/main/mac/uninstall.sh && chmod +x uninstall.sh && sudo ./uninstall.sh

Windows

Install

Requires Windows 10 1803+ or Windows Server 2019+ (for the built-in tar). From powershell terminal:

Invoke-WebRequest -Uri https://raw.githubusercontent.com/openobserve/agents/main/windows/install.ps1 -OutFile install.ps1 ; .\install.ps1 -URL <URL> -AUTH_KEY <Authorization_Key>

e.g.

Invoke-WebRequest -Uri https://raw.githubusercontent.com/openobserve/agents/main/windows/install.ps1 -OutFile install.ps1 ; .\install.ps1 -URL http://localhost:5080/api/default -AUTH_KEY cm9vdEBowWjJSanhscWtSbVB5S0VE

The script installs and starts the otel-collector Windows service.

Windows logs

Uninstall

Invoke-WebRequest -Uri https://raw.githubusercontent.com/openobserve/agents/main/windows/uninstall.ps1 -OutFile uninstall.ps1 ; .\uninstall.ps1

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages