본문 바로가기
서버/리눅스 서버

리눅스 웹 기반 모니터링 툴 netdata 설치하기 (U5 SERIES)

by ㅋㅋ잠자 2019. 4. 9.
반응형

안녕하세요? 오늘은 netdata 를 설치해 보겠습니다.





1. 자동 설치


# 아래 스크립트로 자동 설치 됩니다.

root@AOL-Debian:~# bash <(curl -Ss https://my-netdata.io/kickstart.sh)

System            : Linux

Operating System  : GNU/Linux

Machine           : armv7l

BASH major version: 

 --- Downloading script to detect required packages... --- 

$'[\E[2m/tmp/netdata-kickstart-s5o2e3\E(B\E[0m]# \E[1m\E[33m' curl -sSL --connect-timeout 10 --retry 3 https://raw.githubusercontent.com/netdata/netdata-demo-site/master/install-required-packages.sh $'\E(B\E[0m\\n'  OK  curl -sSL --connect-timeout 10 --retry 3 https://raw.githubusercontent.com/netdata/netdata-demo-site/master/install-required-packages.sh 


 --- Running downloaded script to detect required packages... --- 

$'[\E[2m/tmp/netdata-kickstart-s5o2e3\E(B\E[0m]# \E[1m\E[33m' /bin/bash /tmp/netdata-kickstart-s5o2e3/install-required-packages.sh netdata $'\E(B\E[0m\\n' Loading /etc/os-release ...


/etc/os-release information:

NAME            : Debian GNU/Linux

VERSION         : 9 (stretch)

ID              : debian

ID_LIKE         : 

VERSION_ID      : 9


We detected these:

Distribution    : debian

Version         : 9

Codename        : 9 (stretch)

Package Manager : install_apt_get

Packages Tree   : debian

Detection Method: /etc/os-release

Default Python v: 2 


 > Checking if package 'git' is installed...

dpkg-query: no packages found matching git

 > Checking if package 'autoconf' is installed...

 > Checking if package 'autoconf-archive' is installed...

dpkg-query: no packages found matching autoconf-archive

 > Checking if package 'autogen' is installed...

dpkg-query: no packages found matching autogen

 > Checking if package 'automake' is installed...

 > Checking if package 'pkg-config' is installed...

 > Checking if package 'zlib1g-dev' is installed...

dpkg-query: no packages found matching zlib1g-dev

 > Checking if package 'uuid-dev' is installed...

dpkg-query: no packages found matching uuid-dev

 > Checking if package 'libmnl-dev' is installed...

dpkg-query: no packages found matching libmnl-dev

 > Checking if package 'python-yaml' is installed...

dpkg-query: no packages found matching python-yaml

 > Checking if package 'python-pymongo' is installed...

dpkg-query: no packages found matching python-pymongo


The following command will be run:


 >> IMPORTANT << 

    Please make sure your system is up to date

    by running:   apt-get update  


apt-get install autoconf autoconf-archive autogen automake git libmnl-dev pkg-config python-pymongo python-yaml uuid-dev zlib1g-dev 


# 엔터 한번 눌러주시구요

Press ENTER to run it > 

apt-get install autoconf autoconf-archive autogen automake git libmnl-dev pkg-config python-pymongo python-yaml uuid-dev zlib1g-dev 

Reading package lists... Done

Building dependency tree       

Reading state information... Done

The following packages were automatically installed and are no longer required:

  libjsoncpp0 libmicrohttpd10 libupnpp4

Use 'apt autoremove' to remove them.

The following additional packages will be installed:

  autogen-doc autotools-dev git-man guile-2.0-libs liberror-perl libgc1c2 libltdl7 libopts25 libopts25-dev libsigsegv2 libyaml-0-2 m4 python-bson python-gridfs rsync

Suggested packages:

  gnu-standards autoconf-doc libtool gettext gettext-base git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-arch git-cvs git-mediawiki git-svn

  m4-doc python-pymongo-doc

The following NEW packages will be installed:

  autoconf autoconf-archive autogen autogen-doc automake autotools-dev git git-man guile-2.0-libs liberror-perl libgc1c2 libltdl7 libmnl-dev libopts25 libopts25-dev libsigsegv2

  libyaml-0-2 m4 pkg-config python-bson python-gridfs python-pymongo python-yaml rsync uuid-dev zlib1g-dev

0 upgraded, 26 newly installed, 0 to remove and 6 not upgraded.

Need to get 12.8 MB of archives.

After this operation, 52.1 MB of additional disk space will be used.

Do you want to continue? [Y/n] 



All Done! - Now proceed to the next step.


 OK  /bin/bash /tmp/netdata-kickstart-s5o2e3/install-required-packages.sh netdata 


$'[\E[2m/tmp/netdata-kickstart-s5o2e3\E(B\E[0m]# \E[1m\E[33m' curl -sSL --connect-timeout 10 --retry 3 https://storage.googleapis.com/netdata-nightlies/sha256sums.txt $'\E(B\E[0m\\n'  OK  curl -sSL --connect-timeout 10 --retry 3 https://storage.googleapis.com/netdata-nightlies/sha256sums.txt 


$'[\E[2m/tmp/netdata-kickstart-s5o2e3\E(B\E[0m]# \E[1m\E[33m' curl -sSL --connect-timeout 10 --retry 3 https://storage.googleapis.com/netdata-nightlies/netdata-latest.tar.gz $'\E(B\E[0m\\n'  OK  curl -sSL --connect-timeout 10 --retry 3 https://storage.googleapis.com/netdata-nightlies/netdata-latest.tar.gz 


$'[\E[2m/tmp/netdata-kickstart-s5o2e3\E(B\E[0m]# \E[1m\E[33m' tar -xf netdata-latest.tar.gz $'\E(B\E[0m\\n'  OK  tar -xf netdata-latest.tar.gz 


 --- Installing netdata... --- 

$'[\E[2m/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488\E(B\E[0m]# \E[1m\E[33m' ./netdata-installer.sh --auto-update $'\E(B\E[0m\\n' DATE : Tue Apr  9 03:01:55 KST 2019

UPTIME : up 1 week, 3 days, 14 hours, 1 minute

VERSION : 20180918


<CPU INFO>

CLOCK : 8000MHz GOV : interactive

TEMP : 61 degree USE : 45.9%


<MEMORY INFO>

MEM : 1724MB / 1893MB SWAP : 790MB / 2847MB


<NETWORK>

192.168.0.47 



  ^

  |.-.   .-.   .-.   .-.   .  netdata                                        

  |   '-'   '-'   '-'   '-'   real-time performance monitoring, done right!  

  +----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+--->



  You are about to build and install netdata to your system.


  It will be installed at these locations:


   - the daemon     at /usr/sbin/netdata

   - config files   in /etc/netdata

   - web files      in /usr/share/netdata

   - plugins        in /usr/libexec/netdata

   - cache files    in /var/cache/netdata

   - db files       in /var/lib/netdata

   - log files      in /var/log/netdata

   - pid file       at /var/run/netdata.pid

   - logrotate file at /etc/logrotate.d/netdata


  This installer allows you to change the installation path.

  Press Control-C and run the same command with --help for help.


# 엔터를 입력해 줍니다.

Press ENTER to build and install netdata to your system > 


[/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488]# autoreconf -ivf 
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I build/m4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
autoreconf: Leaving directory `.'
 OK   

[/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488]# ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-zlib --with-math --with-user=netdata CFLAGS=-O2 
checking whether to enable maintainer-specific portions of Makefiles... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to create a pax tar archive... gnutar
checking whether make supports nested variables... (cached) yes
checking build system type... armv7l-unknown-linux-gnueabihf
checking host system type... armv7l-unknown-linux-gnueabihf
checking for gcc... gcc
checking whether the C compiler works... 

checking for mnl_socket_open in -lmnl... yes
checking if nfacct.plugin should be enabled... no
checking for YAJL... no
checking for xenstat_init in -lxenstat... no
checking for XENLIGHT... no
checking if xenstat.plugin should be enabled... no
checking for setns... yes
checking if cgroup-network can be enabled... yes
checking whether C compiler accepts -flto... yes
checking if -flto builds executables... yes
checking if LTO should be enabled... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating netdata.spec
config.status: creating backends/graphite/Makefile
config.status: creating backends/json/Makefile
config.status: creating backends/Makefile
config.status: creating backends/opentsdb/Makefile
config.status: creating backends/prometheus/Makefile
config.status: creating collectors/Makefile
config.status: creating collectors/apps.plugin/Makefile
config.status: creating collectors/cgroups.plugin/Makefile
config.status: creating collectors/charts.d.plugin/Makefile
config.status: creating collectors/checks.plugin/Makefile
config.status: creating collectors/diskspace.plugin/Makefile
config.status: creating collectors/fping.plugin/Makefile
config.status: creating collectors/freebsd.plugin/Makefile
config.status: creating collectors/freeipmi.plugin/Makefile
config.status: creating collectors/cups.plugin/Makefile
config.status: creating collectors/idlejitter.plugin/Makefile
config.status: creating collectors/macos.plugin/Makefile
config.status: creating collectors/nfacct.plugin/Makefile

make[4]: Leaving directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/api/formatters/ssv'
Making clean in value
make[4]: Entering directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/api/formatters/value'
make[4]: Nothing to be done for 'clean'.
make[4]: Leaving directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/api/formatters/value'
make[4]: Entering directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/api/formatters'
make[4]: Nothing to be done for 'clean-am'.
make[4]: Leaving directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/api/formatters'
make[3]: Leaving directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/api/formatters'
Making clean in health
make[3]: Entering directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/api/health'
make[3]: Nothing to be done for 'clean'.
make[3]: Leaving directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/api/health'
make[3]: Entering directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/api'
make[3]: Nothing to be done for 'clean-am'.
make[3]: Leaving directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/api'
make[2]: Leaving directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/api'
Making clean in gui
make[2]: Entering directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/gui'
test -z "dashboard.js version.txt " || rm -f dashboard.js version.txt 
make[2]: Leaving directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/gui'
Making clean in server
make[2]: Entering directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/server'
Making clean in static
make[3]: Entering directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/server/static'
make[4]: Entering directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/server/static'
make[4]: Nothing to be done for 'clean-am'.
make[4]: Leaving directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/server/static'
make[3]: Leaving directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/server/static'
make[3]: Entering directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/server'
make[3]: Nothing to be done for 'clean-am'.
make[3]: Leaving directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/server'
make[2]: Leaving directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/server'
make[2]: Entering directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web'
make[2]: Nothing to be done for 'clean-am'.
make[2]: Leaving directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web'
make[1]: Leaving directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web'

make[3]: Leaving directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/gui'
Making all in server
make[3]: Entering directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/server'
Making all in static
make[4]: Entering directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/server/static'
make[5]: Entering directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/server/static'
make[5]: Nothing to be done for 'all-am'.
make[5]: Leaving directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/server/static'
make[4]: Leaving directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/server/static'
make[4]: Entering directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/server'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/server'
make[3]: Leaving directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web/server'
make[3]: Entering directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web'
make[2]: Leaving directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488/web'
make[2]: Entering directory '/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488'
  CC       libnetdata/os.o
  CC       web/api/formatters/json_wrapper.o
  CC       web/api/formatters/charts2json.o
  CC       web/api/formatters/rrdset2json.o
  CC       collectors/cgroups.plugin/sys_fs_cgroup.o
  CC       collectors/apps.plugin/apps_plugin.o
  CC       libnetdata/adaptive_resortable_list/adaptive_resortable_list.o
  CC       libnetdata/config/appconfig.o

  CC       collectors/proc.plugin/proc_net_ip_vs_stats.o
  CC       collectors/proc.plugin/proc_net_netstat.o
  CC       collectors/proc.plugin/proc_net_rpc_nfs.o
  CC       collectors/proc.plugin/proc_net_rpc_nfsd.o
  CC       collectors/proc.plugin/proc_net_snmp.o
  CC       collectors/proc.plugin/proc_net_snmp6.o
  CC       collectors/proc.plugin/proc_net_sctp_snmp.o
  CC       collectors/proc.plugin/proc_net_sockstat.o
  CC       collectors/proc.plugin/proc_net_sockstat6.o
  CC       collectors/proc.plugin/proc_net_softnet_stat.o
  CC       collectors/proc.plugin/proc_net_stat_conntrack.o
  CC       collectors/proc.plugin/proc_net_stat_synproxy.o
  CC       collectors/proc.plugin/zfs_common.o
  CC       collectors/proc.plugin/proc_self_mountinfo.o
  CC       collectors/proc.plugin/proc_spl_kstat_zfs.o
  CC       collectors/proc.plugin/proc_stat.o
  CC       collectors/proc.plugin/proc_sys_kernel_random_entropy_avail.o
  CC       collectors/proc.plugin/proc_vmstat.o
  CC       collectors/proc.plugin/proc_uptime.o
  CC       collectors/proc.plugin/sys_kernel_mm_ksm.o
  CC       collectors/proc.plugin/sys_devices_system_edac_mc.o
  CC       collectors/proc.plugin/sys_devices_system_node.o
  CC       collectors/proc.plugin/sys_fs_btrfs.o
  CC       collectors/proc.plugin/sys_class_power_supply.o
  CC       collectors/tc.plugin/plugin_tc.o
  CCLD     cgroup-network
  CCLD     apps.plugin
  CCLD     netdata

 --- Fix generated files permissions --- 
[/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488]# find ./system/ -type f -a \! -name \*.in -a \! -name Makefile\* -a \! -name \*.conf -a \! -name \*.service -a \! -name \*.logrotate -exec chmod 755 \{\} \; 
 OK   

 --- Add user netdata to required user groups --- 
Adding netdata user group ...
[/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488]# groupadd -r netdata 
 OK   

Adding netdata user account with home /var/lib/netdata ...
[/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488]# useradd -r -g netdata -c netdata -s '' --no-create-home -d /var/lib/netdata netdata 
 OK   

Group 'docker' does not exist.
Group 'nginx' does not exist.
Group 'varnish' does not exist.
Group 'haproxy' does not exist.
Adding netdata user to the adm group ...
[/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488]# usermod -a -G adm netdata 
 OK   

Group 'nsd' does not exist.
Adding netdata user to the proxy group ...
[/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488]# usermod -a -G proxy netdata 
 OK   

Group 'squid' does not exist.
Group 'ceph' does not exist.
Group 'nobody' does not exist.
 --- Install logrotate configuration for netdata --- 
[/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488]# cp system/netdata.logrotate /etc/logrotate.d/netdata 
 OK   

[/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488]# chmod 644 /etc/logrotate.d/netdata 
 OK   

 --- Read installation options from netdata.conf --- 

    Permissions
    - netdata user             : netdata
    - netdata group            : netdata
    - web files user           : netdata
    - web files group          : netdata
    - root user                : root

    Directories
    - netdata user config dir  : /etc/netdata
    - netdata stock config dir : /usr/lib/netdata/conf.d
    - netdata log dir          : /var/log/netdata
    - netdata run dir          : /var/run
    - netdata lib dir          : /var/lib/netdata
    - netdata web dir          : /usr/share/netdata/web
    - netdata cache dir        : /var/cache/netdata

    Other
    - netdata port             : 19999

 --- Install go.d.plugin --- 
[/tmp/netdata-kickstart-s5o2e3/netdata-v1.14.0-rc0-39-g0d4da488]# curl -sSL --connect-timeout 10 --retry 3 https://github.com/netdata/go.d.plugin/releases/download/v0.3.1/go.d.plugin-v0.3.1.linux-arm 

 --- Check KSM (kernel memory deduper) --- 

Memory de-duplication instructions

You have kernel memory de-duper (called Kernel Same-page Merging,
or KSM) available, but it is not currently enabled.

To enable it run:

    echo 1 >/sys/kernel/mm/ksm/run
    echo 1000 >/sys/kernel/mm/ksm/sleep_millisecs

If you enable it, you will save 40-60% of netdata memory.

 --- Check version.txt --- 
 --- Check apps.plugin --- 
 --- Copy uninstaller --- 
 --- Basic netdata instructions --- 

netdata by default listens on all IPs on port 19999,
so you can access it with:

  http://this.machine.ip:19999/

To stop netdata run:

  killall netdata

To start netdata run:

  /usr/sbin/netdata


Uninstall script copied to: /usr/libexec/netdata-uninstaller.sh
 --- Installing new netdata-updater in cron --- 
Update script is located at /etc/cron.daily/netdata-updater

netdata-updater works from cron. It will trigger an email from cron
only if it fails (it should not print anything when it can update netdata).

 --- We are done! --- 

  ^
  |.-.   .-.   .-.   .-.   .-.   .  netdata                          .-.   .-
  |   '-'   '-'   '-'   '-'   '-'   is installed and running now!  -'   '-'  
  +----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+--->

  enjoy real-time performance and health monitoring...

 OK  ./netdata-installer.sh --auto-update 


설치가 정상적으로 완료 되었습니다.


재부팅 후 실행은 아래와 같이 설정하세요.


root@AOL-Debian:~# nano /etc/rc.local


/usr/sbin/netdata


반응형

댓글