go-api

command module
v0.1.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

README

와탭 Golang 모니터링 서비스 <whatap.io>

Golang 애플리케이션에 대한 모니터링 서비스를 제공합니다.

scrrenshot

에이전트 설치 방식 개요

Golang 라이브러리

Golang 애플리케이션 소스코드에 whatap/go-api 를 추가하고 배포합니다.

go get -u github.com/whatap/go-api
import  (
	"github.com/whatap/go-api/trace"
)

func  main(){
	trace.Init(nil)
	//It  must  be  executed  before  closing  the  app.
	defer  trace.Shutdown()
	
	...  
}
에이전트 설치

대상 애플리케이션에서 UDP 통신으로 데이터를 전달하고, 와탭 수집서버로 데이터를 전송하기 위해서는 같은 서버에 에이전트를 설치해야 합니다.

설치 방식은 패키지 설치로 가능합니다.

  • 와탭 저장소(Repository)를 설치합니다.
  • whatap-agent 리눅스 패키지를(yum, apt-get) 설치합니다.

에이전트는 whatap-agent 서비스(Service)로 실행됩니다.

RedHat/CentOS
패키지 저장소(Repository) 등록

와탭 저장소(Repository)를 등록합니다.

$  sudo  rpm  -Uvh  http://repo.whatap.io/centos/5/noarch/whatap-repo-1.0-1.noarch.rpm
패키지 설치

아래 명령어를 통해 패키지를 설치합니다.

$  sudo  yum  install  whatap-agent
Debian/Ubuntu
패키지 저장소(Repository) 등록

와탭 저장소(Repository)를 등록합니다.

$  wget  http://repo.whatap.io/debian/release.gpg  -O  -|sudo  apt-key  add  -
$  wget  http://repo.whatap.io/debian/whatap-repo_1.0_all.deb
$  sudo  dpkg  -i  whatap-repo_1.0_all.deb
$  sudo  apt-get  update
패키지 설치
$  sudo  apt-get  install  whatap-agent
Amazon Linux
패키지 저장소(Repository) 등록

와탭 저장소(Repository)를 등록합니다.

$  sudo  rpm  --import  http://repo.whatap.io/centos/release.gpg  
$  echo  "[whatap]"  |  sudo  tee  /etc/yum.repos.d/whatap.repo  >  /dev/null  
$  echo  "name=whatap  packages  for  enterprise  linux"  |  sudo  tee  -a  /etc/yum.repos.d/whatap.repo  >  /dev/null  
$  echo  "baseurl=http://repo.whatap.io/centos/latest/\$basearch"  |  sudo  tee  -a  /etc/yum.repos.d/whatap.repo  >  /dev/null
$  echo  "enabled=1"  |  sudo  tee  -a  /etc/yum.repos.d/whatap.repo  >  /dev/null  
$  echo  "gpgcheck=0"  |  sudo  tee  -a  /etc/yum.repos.d/whatap.repo  >  /dev/null
패키지 설치
$  sudo  yum  install  whatap-agent
라이센스 및 수집서버 설정

/usr/whatap/agent 이하에 whatap.conf 파일에 라이센스와 수집서버 정보를 설정합니다.

$  echo  "license=[라이센스키]"  >>  /usr/whatap/agent/whatap.conf
$  echo  "whatap.server.host=[수집서버  주소]"  >>  /usr/whatap/agent/whatap.conf

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL