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

feat: add mac support #129

Merged
merged 4 commits into from
Nov 18, 2024
Merged

feat: add mac support #129

merged 4 commits into from
Nov 18, 2024

Conversation

obs-gh-mattcotter
Copy link
Collaborator

Description

OB-32891 add Mac support

This creates a script to install the observe agent and register it as a launch daemon on Mac OS. Useful resource: https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html

Local testing:

$ goreleaser release --snapshot --clean --verbose --single-target

$ bash scripts/install_mac.sh

$ which observe-agent 
/usr/local/bin/observe-agent

Checklist

  • Created tests which fail without the change (if possible)
  • Extended the README / documentation, if necessary


service_name="com.observeinc.agent"
observeagent_install_dir="/usr/local/observe-agent"
# TODO download the file instead of using the local built zip
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to leave this as a follow up since the release process change is included in this PR.

@@ -0,0 +1,12 @@
receivers:
filestats/agent:
include: '/etc/observe-agent/otel-collector.yaml'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this path would be /usr/local/observe-agent right?

@@ -0,0 +1,18 @@
receivers:
filelog/host_monitoring:
include: [/var/log/**/*.log, /var/log/syslog]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does syslog exist on macs? or is it something else?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point; it's /var/log/system.log. That's covered by the glob, so I just removed syslog.

receivers:
filelog/agent-config: # TODO: Add observe-agent.yaml once we can obfuscate sensitive config fields
include: [/etc/observe-agent/otel-collector.yaml]
start_at: beginning
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same is this filepath correct?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct to both, it's /usr/local/observe-agent/config/otel-collector.yaml. Updated in both places, thanks!

@obs-gh-mattcotter obs-gh-mattcotter merged commit 42ca91a into main Nov 18, 2024
8 checks passed
@obs-gh-mattcotter obs-gh-mattcotter deleted the OB-32891-mac-os-support branch November 18, 2024 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants