/
Managing CloudHub agent configuration

Managing CloudHub agent configuration

개요

CloudHub는 SaltStack을 활용한 Collector(Telegraf) installation & configuration provisioning을 지원하며, Salt API를 통하여 각 Salt Minion이 설치되어 있는 호스트들의 Collector(Telegraf)를 관리할 수 있습니다.

Minions

Agent Configuration의 Minions은 Salt Minion을 Accept, Reject, Delete 기능을 통해 Salt Minion이 설치된 호스트를 Salt Master의 연결 및 연결 해지 기능을 제공합니다.

Accept된 Host에 대한 OS, OS Version, IP 정보를 제공합니다.

Salt Minion 설치 : Installing Agent Node

Minions 초기화면

 

Accept Minion

1단계 : Minions 리스트에서 Operation의 버튼 클릭

Accept, Delete를 선택할 수 있도록 나타납니다.

 

2단계 : Accept 클릭

Accept한 Host의 결과가 Console에 출력되고 Minions 리스트는 새로 고침 되어 Status가 Accepted로 변경되어 출력됩니다.

 

Accept된 Host의 한해서 OS, OS Version, IP 정보를 제공하지만, Accept 후 바로 조회되지 않고 약 5초 후 재 조회 시 출력됩니다.

 

Reject Minion

1단계 : Minions 리스트에서 Status가 Accepted인 Host의 Operation의 버튼 클릭

Reject, Delete를 선택할 수 있도록 나타납니다.

2단계 : Reject 클릭

Reject한 Host의 결과가 Console에 출력되고 Minions 리스트는 새로고침 되어 Status가 Reject로 변경되어 출력됩니다. 또한 Reject된 Host의 OS, OS Version 은 출력되지 않습니다.

Delete Minion

1단계 : Minions 리스트에서 Status가 Accepted, Reject, UnAccept인 Host의 Operation의 버튼 클릭

Delete를 선택할 수 있도록 나타납니다.

 

2단계 : Delete 클릭

Delete한 Host의 결과가 Console에 출력되고 Minions 리스트에서 삭제한 Host를 제외한 Host 리스트가 출력됩니다.

 

Host Delete 시 해당 Host를 Minions에서 재활용하려면 Host의 Salt Minion의 Service를 재시작 해야 합니다.

Host 시스템 정보 조회

1단계 : Minions 리스트에서 Accepted 클릭

아래와 같이 해당 Host의 기본 시스템 정보를 조회할 수 있습니다.

saltversion: '3001.1' master: 192.168.34.59 os_family: RedHat os: CentOS osrelease: 7.8.2003 kernel: Linux kernelrelease: 3.10.0-1127.10.1.el7.x86_64 kernelversion: '#1 SMP Wed Jun 3 14:28:03 UTC 2020' virtual: VirtualBox cpuarch: x86_64 cpu_model: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz localhost: master-node ip_interfaces: lo: - 127.0.0.1 - '::1' enp0s3: - 192.168.34.59 - 'fe80::4950:5197:f54a:a40a' - 'fe80::33f6:4558:84d0:d45b' - 'fe80::2de:4527:4cc5:fb1f' enp0s8: - 10.0.2.97 - 'fe80::7631:a2d3:1c41:ecf3' docker0: - 172.17.0.1 ip6_interfaces: lo: - '::1' enp0s3: - 'fe80::4950:5197:f54a:a40a' - 'fe80::33f6:4558:84d0:d45b' - 'fe80::2de:4527:4cc5:fb1f' enp0s8: - 'fe80::7631:a2d3:1c41:ecf3' docker0: [] ip4_gw: 10.0.2.1 ip6_gw: false 'dns:nameservers': - 208.67.220.220 - 8.8.8.8 - 168.126.63.1 locale_info: defaultlanguage: en_US defaultencoding: UTF-8 detectedencoding: UTF-8 timezone: unknown biosversion: VirtualBox mem_total: 990 swap_total: 819 gpus: - vendor: vmware model: SVGA II Adapter selinux: enabled: true enforced: Enforcing path: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin'

Client SSH

1단계 : Minions 리스트에서 Operation의 버튼 클릭하면 터미널 입력창이 표시됩니다. 입력창의 ADDRESS 필드는 미니언이 가지고 있는 IP을 기본으로 입력합니다.

 

2단계 : 터미널 입력창에 접속 정보를 입력를 입력하고, [Connect] 버튼을 클릭합니다.

 

3단계 : 정상 접속이 되는 경우 하단의 이미지와 비슷하게 표시됩니다.

 

##

Collector Control

Collector Control은 Accepted 된 Host에 대해 Collector(Telegraf) 설치 및 Collector(Telegraf) 서비스를 실행 및 중지할 수 있습니다.

INSTALL Collector

1단계 : Collector Control 탭 메뉴 클릭

  • Minions 탭 메뉴에서 Accept 된 Host가 리스트에 출력됩니다.

  • 선택된 Host가 없으면 RUN, STOP, INSTALL 버튼은 비활성화됩니다.

2단계 : Install할 Host의 체크 박스 선택

Host 체크 박스 선택을 하게 되면 RUN, STOP, INSTALL 버튼은 활성화됩니다.

3단계 : INSTALL 버튼 클릭

Collector(Telegraf) Install한 Host의 결과가 Console에 출력되고 Minions 리스트에서 Enabled가 Enable로 변경되어 출력됩니다.

RUN Collector

Collector(Telegraf)가 설치된 Host의 한해 Collector(Telegraf)를 실행할 수 있습니다.

  • Minions 리스트의 Action의 ▶ 버튼을 클릭하여 Collector(Telegraf)를 실행할 수 있습니다.

  • Minions 리스트에서 실행할 Host를 선택하고 RUN을 클릭해도 Collector(Telegraf)를 실행할 수 있습니다.

실행 결과

STOP Collector

Collector(Telegraf)가 설치된 Host의 한해 Collector(Telegraf)가 실행 중인 경우 서비스를 중지할 수 있습니다.

  • Minions 리스트의 Action의 ■ 버튼을 클릭하여 Collector(Telegraf)를 서비스를 중지할 수 있습니다.

  • Minions 리스트에서 Collector(Telegraf) 서비스를 중지할 Host를 선택하고 STOP을 클릭해도 중지할 수 있습니다.

실행 결과

Collector Config

Collector Config 탭 메뉴는 Host가 Salt Master에 Accept 되어 있고 Collector(Telegraf)가 설치된 Host에 대한 Measurements 정보를 제공하고 Collector(Telegraf) Configuration 정보를 Editor를 이용해 수정한 후 적용할 수 있습니다.

Collector.conf 수정 및 적용

1단계 : Collector Config 탭 메뉴 클릭

Minions 리스트에 Host가 Salt Master에 Accept 되어 있고 Collector(Telegraf)가 설치된 Host가 리스트에 조회됩니다.

2단계 : 조회된 Host 클릭

선택된 Host에 해당하는 Measurements 정보와 collector의 Configuration 정보가 collector.conf Editor에 출력됩니다.

 

3단계 : collector.conf Editor의 Configuration 수정

[global_tags] dc = "" rack = "" [agent] interval = "5s" round_interval = true metric_batch_size = 1000 metric_buffer_limit = 10000 collection_jitter = "0s" flush_interval = "5s" flush_jitter = "0s" precision = "" debug = false quiet = false logfile = "/var/log/telegraf/telegraf.log" hostname = "minion01" omit_hostname = false [[outputs.influxdb]] urls = ["http://<influxdb_address:port>"] database = "" username = "" password = "" retention_policy = "" write_consistency = "any" timeout = "5s" [[inputs.cpu]] percpu = true totalcpu = true collect_cpu_time = false report_active = false [[inputs.disk]] ignore_fs = [ "tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs" ] [[inputs.diskio]] [[inputs.kernel]] [[inputs.mem]] [[inputs.net]] [[inputs.processes]] [[inputs.procstat]] exe = "salt" [[inputs.swap]] [[inputs.system]] [[inputs.netstat]] [[inputs.influxdb]] urls = [ "http://<influxdb_address:port>/debug/vars" ] [[inputs.kapacitor]] urls = [ "http://<kapacitor_address:port>/kapacitor/v1/debug/vars" ] timeout = "5s"

4단계 : “APPLY” 버튼 클릭

Collector(Telegraf) 의 Configuration 이 적용되고 Collector(Telegraf) Service가 재시작됩니다.

  • 데이터 확인

Visualize 메뉴 확인

Infrastructure 메뉴 확인

Collector.conf Test

1단계 : Collector Config 탭 메뉴 클릭

Minions 리스트에 Host가 Salt Master에 Accept 되어 있고 Collector(Telegraf)가 설치된 Host가 리스트에 조회됩니다.

 

2단계 : 조회된 Host 클릭

선택된 Host에 해당하는 Measurements 정보와 collector의 Configuration 정보가 collector.conf Editor에 출력됩니다.

 

3단계 : collector.conf Editor의 Configuration 수정

 

4단계 : “TEST” 버튼 클릭

“TEST” 버튼을 클릭하게 되면 'Input Plugin'을 테스트 할 수 있는 팝업 창이 나옵니다.

 

5단계 : 팝업 창의 “Test” 버튼 클릭

테스트할 'Input Plugins'은 기본 값 'All'로 설정되어 있습니다.
'Test' 버튼을 클릭하면 'Configuration'에 입력한 'Input Plugin' 모두를 테스트한 결과 값이 출력 됩니다.

 

  • 드롭 다운 메뉴를 클릭하게 되면 'Configuration'에 입력한 'Input Plugin’이 조회 됩니다.

 

  • 입력 창을 이용하여 원하는 'Input Plugin'을 검색할 수 있습니다.

 

  • 테스트를 원하는 'Input Plugin'을 선택한 후 팝업 창의 'Test' 버튼을 누르면 선택한 'Input Plugin'에 대한 테스트 결과 값이 출력 됩니다.

 

Related content

Multi-tenant
Multi-tenant
Read with this
Quick Installation Guide on Linux Agent node
Quick Installation Guide on Linux Agent node
More like this
VMware Monitoring
VMware Monitoring
Read with this
Advanced Kapacitor usage
Advanced Kapacitor usage
Read with this
Inventory Topology Manual
Inventory Topology Manual
Read with this
User Guides
Read with this