Difference between revisions of "Netdata"

From Freephile Wiki
Jump to navigation Jump to search
(link to RedHat docs)
(Adds haproxy config)
Line 16: Line 16:
 
   - logrotate file at /etc/logrotate.d/netdata
 
   - logrotate file at /etc/logrotate.d/netdata
 
</pre>
 
</pre>
 +
  
 
== Host Modifications ==
 
== Host Modifications ==
  
 +
=== HAProxy ===
 +
<source lang="python">
 +
frontend netstats
 +
        bind *:20000
 +
        mode http
 +
        default_backend netstats-back
 +
 +
backend netstats-back
 +
        server stats1 127.0.0.1:19999
 +
</source>
 +
 +
=== Kernel ===
 
You have kernel memory de-duper (called [https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_tuning_and_optimization_guide/chap-ksm Kernel Same-page Merging], or KSM) available, but it is not currently enabled.
 
You have kernel memory de-duper (called [https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_tuning_and_optimization_guide/chap-ksm Kernel Same-page Merging], or KSM) available, but it is not currently enabled.
  

Revision as of 17:34, 22 August 2018

Netdata will be part of the QualityBox dashboard.

See http://wiki.freephile.org:20000/

System Locations[edit | edit source]

   - 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


Host Modifications[edit | edit source]

HAProxy[edit | edit source]

frontend netstats 
        bind *:20000 
        mode http 
        default_backend netstats-back 
 
backend netstats-back 
        server stats1 127.0.0.1:19999

Kernel[edit | edit source]

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

Memory de-duplication instructions

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.


Ports[edit | edit source]

netdata by default listens on all IPs on port 19999. We add a rule to firewalld to allow 20000 and then pass that port through to the backend in haproxy config.

 http://this.machine.ip:20000/ => http://127.0.0.1:19999

Start/Stop[edit | edit source]

To stop netdata run: systemctl stop netdata

To start netdata run: systemctl start netdata

Installation extras[edit | edit source]

The configuration will send messages to 'root' so be sure to either edit the conf sudo vim /etc/netdata/health_alarm_notify.conf, or set vim /etc/aliases && newaliases

You'll probably receive alarms for 'tcp listen drops'. This is likely bot-related, and there is a good discussion on how to identify the source of the problem and how to mitigate or resolve it https://github.com/firehol/netdata/issues/3234

Following the advice from NASA at https://wiki.earthdata.nasa.gov/display/HDD/SOMAXCONN, I increased my somaxconn kernel parameter to 1024 from 128

 cat /proc/sys/net/core/somaxconn
 128
 sysctl -w net.core.somaxconn=1024

TCP State diagram


Updates[edit | edit source]

Netdata will update itself, and puts a script into cron: ln -s /root/netdata/netdata-updater.sh /etc/cron.daily/netdata-updater