[macOS] Install_mackerel-agent

published_at: 2019-01-21 08:42
이것은 자신의 로그입니다. 서비스가 끝나면Qrunch에서 이동합니다.

Background

  • macOS Mojave 10.14.2
  • Homebrew 1.9.2
  • Process


    see : https://mackerel.io/ja/docs/entry/howto/install-agent/mac
    mackerel-agent 설치
    ❯ brew install mackerelio/mackerel-agent/mackerel-agent
    Updating Homebrew...
    ==> Auto-updated Homebrew!
    Updated 1 tap (homebrew/core).
    ==> New Formulae
    entityx                                               gerbil-scheme                                         tmx
    ==> Updated Formulae
    bettercap              cp2k                   hub                    libxc                  rdfind                 scrcpy                 sile
    
    ==> Tapping mackerelio/mackerel-agent
    Cloning into '/usr/local/Homebrew/Library/Taps/mackerelio/homebrew-mackerel-agent'...
    remote: Enumerating objects: 8, done.
    remote: Counting objects: 100% (8/8), done.
    remote: Compressing objects: 100% (7/7), done.
    remote: Total 8 (delta 1), reused 2 (delta 0), pack-reused 0
    Unpacking objects: 100% (8/8), done.
    Tapped 2 formulae (36 files, 36.6KB).
    ==> Installing mackerel-agent from mackerelio/mackerel-agent
    ==> Downloading https://github.com/mackerelio/mackerel-agent/releases/download/v0.59.0/mackerel-agent_darwin_amd64.zip
    ==> Downloading from https://github-production-release-asset-2e65be.s3.amazonaws.com/19845168/ccab5d80-14f0-11e9-96d8-ebe6451732d2?X-Amz-Algorithm=AWS4-HMAC-SHA
    ######################################################################## 100.0%
    ==> Caveats
    You must append `apikey = {apikey}` configuration variable to /usr/local/etc/mackerel-agent.conf
    in order for mackerel-agent to work.
    
    To have launchd start mackerelio/mackerel-agent/mackerel-agent now and restart at login:
      brew services start mackerelio/mackerel-agent/mackerel-agent
    Or, if you don't want/need a background service you can just run:
      mackerel-agent -conf /usr/local/etc/mackerel-agent.conf
    ==> Summary
    🍺  /usr/local/Cellar/mackerel-agent/0.59.0: 8 files, 7.5MB, built in 13 seconds
    
    ~ 37s
    
    API 키 등록
    ❯ sudo mackerel-agent init -apikey="{api_key}" -conf /usr/local/etc/mackerel-agent.conf
    Password: (-> your_password)
    
    mackerel-agent 시작
    ~
    ❯ ps -ef | grep mackerel-agent
      501 14093 12825   0  8:12AM ttys004    0:00.01 grep --color=auto mackerel-agent
    
    ~
    ❯ brew services start mackerel-agent
    ==> Tapping homebrew/services
    Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services'...
    remote: Enumerating objects: 17, done.
    remote: Counting objects: 100% (17/17), done.
    remote: Compressing objects: 100% (14/14), done.
    remote: Total 17 (delta 0), reused 12 (delta 0), pack-reused 0
    Unpacking objects: 100% (17/17), done.
    Tapped 1 command (50 files, 62.2KB).
    ==> Successfully started `mackerel-agent` (label: homebrew.mxcl.mackerel-agent)
    
    ~ 9s
    ❯ ps -ef | grep mackerel-agent
      501 14618     1   0  8:12AM ??         0:00.03 /usr/local/opt/mackerel-agent/bin/mackerel-agent supervise -conf /usr/local/etc/mackerel-agent.conf
      501 14633 14618   0  8:12AM ??         0:00.02 /usr/local/opt/mackerel-agent/bin/mackerel-agent -conf /usr/local/etc/mackerel-agent.conf -child
      501 14637 12825   0  8:12AM ttys004    0:00.00 grep --color=auto mackerel-agent
    
    자동 시작 설정 확인
    ~
    ❯ launchctl list | grep homebrew
    14618	0	homebrew.mxcl.mackerel-agent
    

    refs

  • Mackerel이 자신의 Mac를 모니터링하도록 설정
  • Homebrew로 Mac에 넣은 소프트웨어의 자동 시작 설정 - Qita
  • Note

  • 솔직히 맥OS의 자동 부팅 설정을 처음 알았다
  • 좋은 웹페이지 즐겨찾기