Author Topic: netdata monitoring tool realtime  (Read 3819 times)


golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: netdata monitoring tool realtime
« Reply #1 on: กันยายน 15, 2017, 09:45:08 AM »
วันนี้ลองเทสลง netdata เพื่อทำเป็น analyse log system และเก็บ log จาก device ต่างๆในเน็ตเวิร์คเราครับผม
https://github.com/firehol/netdata/wiki/Installation
หลังจากลง os : CentOS 7.3 64bit เสร็จก็

#yum install autoconf automake curl gcc git libmnl-devel libuuid-devel lm-sensors make MySQL-python nc pkgconfig python python-psycopg2 PyYAML zlib-devel

รายละเอียดของpackage   description
libuuid   part of util-linux for GUIDs management
zlib   gzip compression for the internal netdata web server
netdata will fail to start without the above.

netdata plugins and various aspects of netdata can be enabled or benefit when these are installed (they are optional):

package   description
bash   for shell plugins and alarm notifications
curl   for shell plugins and alarm notifications
iproute   for monitoring Linux QoS
python   for most of the external plugins
python-yaml   for parsing python.d.plugin configuration
(netdata ships one version for python2 and python3)
python-mysqldb   used for monitoring mysql databases
python-psycopg2   used for monitoring postgres databases
python-pymongo   used for monitoring mongodb databases
nodejs   used for node.js plugins for monitoring named and SNMP devices
lm-sensors   for monitoring hardware sensors
libmnl   for collecting netfilter metrics
netcat   for shell plugins to collect metrics from remote systems
netdata will greatly benefit if you have the above packages installed.

หลังจากสั่ง yum บันทัดบนเสร็จแล้ว ทำการติดตั้ง netdata ผ่าน git
### download it - the directory 'netdata' will be created
git clone https://github.com/firehol/netdata.git --depth=1
cd netdata

#### run script with root privileges to build, install, start netdata
./netdata-installer.sh

####ทำการสั่งให้ starting netdata at boot
In the system directory you can find scripts and configurations for the various distros.

#systemd

The installer already installs netdata.service if it detects a systemd system.
To install netdata.service by hand, run:
# stop netdata
killall netdata

# copy netdata.service to systemd
cp system/netdata.service /etc/systemd/system/

# let systemd know there is a new service
systemctl daemon-reload

# enable netdata at boot
systemctl enable netdata

# start netdata
systemctl start netdata

###System tunning for better netdata or add into rc.local
echo 1 > /sys/kernel/mm/ksm/run
echo 1000 > /sys/kernel/mm/ksm/sleep_millisecs

#systemctl restart netdata

access to netdata on
#http://ipaddr:19999


Auto-update

Please, consider the risks of running an auto-update. Something can always go wrong. Keep an eye on your installation, and run a manual update if something ever fails.

You can call netdata-updater.sh from a cron-job. A successful update will not trigger an email from cron.

# Edit your cron-jobs
crontab -e

# add a cron-job at the bottom. This one will update netdata every day at 6:00AM:
# update netdata
0 6 * * * /path/to/git/downloaded/netdata/netdata-updater.sh
« Last Edit: กันยายน 15, 2017, 09:58:55 AM by golfreeze »