minor improvements for non-linux systems
Costa Tsaousis (ktsaou) committed
Feb 8, 2017 at 22:00 UTC
e618344b361570efecd28676cea8aa998cad5dc2
2 files changed
+17
-13
conf.d/Makefile.am
+10
-10
@@ -62,38 +62,38 @@ dist_healthconfig_DATA = \
62
health.d/apache.conf \
63
health.d/backend.conf \
64
health.d/bind_rndc.conf \
65
- health.d/disks.conf \
65
health.d/elasticsearch.conf \
67
- health.d/entropy.conf \
66
health.d/fping.conf \
67
health.d/haproxy.conf \
70
- health.d/ipc.conf \
68
health.d/ipfs.conf \
69
health.d/isc_dhcpd.conf \
70
health.d/mdstat.conf \
71
health.d/memcached.conf \
75
- health.d/memory.conf \
72
health.d/mysql.conf \
73
health.d/named.conf \
78
- health.d/net.conf \
79
- health.d/netfilter.conf \
74
health.d/nginx.conf \
75
health.d/postgres.conf \
82
- health.d/qos.conf \
76
health.d/redis.conf \
77
health.d/retroshare.conf \
85
- health.d/softnet.conf \
78
health.d/squid.conf \
87
- health.d/tcp_resets.conf \
88
- health.d/udp_errors.conf \
79
health.d/varnish.conf \
80
$(NULL)
81
82
if LINUX
83
dist_healthconfig_DATA += \
84
health.d/cpu.conf \
85
+ health.d/disks.conf \
86
+ health.d/entropy.conf \
87
+ health.d/ipc.conf \
88
+ health.d/memory.conf \
89
+ health.d/net.conf \
90
+ health.d/netfilter.conf \
91
+ health.d/qos.conf \
92
health.d/ram.conf \
93
+ health.d/softnet.conf \
94
health.d/swap.conf \
95
+ health.d/tcp_resets.conf \
96
+ health.d/udp_errors.conf \
97
$(NULL)
98
endif LINUX
99
netdata-installer.sh
+7
-3
@@ -29,7 +29,7 @@ umask 002
29
# Be nice on production environments
30
renice 19 $$ >/dev/null 2>/dev/null
31
32
-processors=$(grep ^processor </proc/cpuinfo | wc -l)
32
+processors=$(grep ^processor </proc/cpuinfo 2>/dev/null | wc -l)
33
[ $(( processors )) -lt 1 ] && processors=1
34
35
# you can set CFLAGS before running installer
@@ -69,6 +69,7 @@ banner() {
69
echo >&2
70
}
71
72
+setcap="$(which setcap 2>/dev/null || command -v setcap 2>/dev/null)"
73
service="$(which service 2>/dev/null || command -v service 2>/dev/null)"
74
systemctl="$(which systemctl 2>/dev/null || command -v systemctl 2>/dev/null)"
75
service() {
@@ -853,8 +854,11 @@ if [ ${UID} -eq 0 ]
854
setcap_ret=1
855
if ! iscontainer
856
then
856
- run setcap cap_dac_read_search,cap_sys_ptrace+ep "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/apps.plugin"
857
- setcap_ret=$?
857
+ if [ ! -z "${setcap}" ]
858
+ then
859
+ run setcap cap_dac_read_search,cap_sys_ptrace+ep "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/apps.plugin"
860
+ setcap_ret=$?
861
+ fi
862
863
if [ ${setcap_ret} -eq 0 ]
864
then