Skip to content

Instantly share code, notes, and snippets.

@cwjohnston
Last active March 25, 2016 18:56
Show Gist options
  • Select an option

  • Save cwjohnston/25a19fd21e2458333240 to your computer and use it in GitHub Desktop.

Select an option

Save cwjohnston/25a19fd21e2458333240 to your computer and use it in GitHub Desktop.
Installing sensu-client as a service on Mac OS X

Download package from sensuapp.com

$ curl -LO https://core.sensuapp.com/osx-unstable/sensu-0.22.0-1.pkg

You can find a link to the latest package here: https://sensuapp.org/download

$ shasum -a 1 sensu-0.22.0-1.pkg  | grep 3af3e6a3ad1596371786e3015706d8d1c68cfbad
3af3e6a3ad1596371786e3015706d8d1c68cfbad  sensu-0.22.0-1.pkg

Install package via CLI.

Alternately you can double click the pkg file and click through.

$ sudo installer -pkg sensu-0.22.0-1.pkg -target /
installer: Package name is sensu-0.22.0-1
installer: Installing at base path /
installer: The install was successful.

What's installed?

$ ls -la /opt/sensu/bin/
total 32
drwxr-xr-x  6 root  wheel  204 Mar 15 11:01 .
drwxr-xr-x  4 root  wheel  136 Mar 15 11:01 ..
lrwxr-xr-x  1 root  wheel   25 Mar 15 11:01 sensu-api -> ../embedded/bin/sensu-api
lrwxr-xr-x  1 root  wheel   28 Mar 15 11:01 sensu-client -> ../embedded/bin/sensu-client
-rwxr-xr-x  1 root  wheel   83 Feb 25 22:16 sensu-install
lrwxr-xr-x  1 root  wheel   28 Mar 15 11:01 sensu-server -> ../embedded/bin/sensu-server

$ ls -la /etc/sensu/
total 0
drwxr-xr-x   5 _sensu  _sensu   170 Mar 15 11:01 .
drwxr-xr-x  89 root    wheel   3026 Mar 15 11:01 ..
drwxr-xr-x   2 _sensu  _sensu    68 Mar 15 11:01 conf.d
drwxr-xr-x   2 _sensu  _sensu    68 Mar 15 11:01 extensions
drwxr-xr-x   2 _sensu  _sensu    68 Mar 15 11:01 plugins

Dropping off required /etc/sensu/config.json, and any other required configuration, certificates, etc. is left as an exercise for the reader.

Start sensu-client as a service via launchctl using plist file provided by package

sudo launchctl load -w /opt/sensu/embedded/Cellar/sensu/0.22.0/Library/LaunchDaemons/org.sensuapp.sensu-client.plist
@calebhailey

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment