Remove dummies, fix for title, conf update_every 5 and colors
Christopher Cox committed
Apr 20, 2017 at 22:40 UTC
989a22679dba2c1e5672fcd281a02de35dde0af7
5 files changed
+117
-32
conf.d/Makefile.am
+1
@@ -51,6 +51,7 @@ dist_pythonconfig_DATA = \
51
python.d/postgres.conf \
52
python.d/redis.conf \
53
python.d/retroshare.conf \
54
+ python.d/Samba.conf \
55
python.d/sensors.conf \
56
python.d/squid.conf \
57
python.d/smartd_log.conf \
conf.d/python.d/samba.conf
new
+58
@@ -0,0 +1,58 @@
1
+# netdata python.d.plugin configuration for samba
2
+#
3
+# This file is in YaML format. Generally the format is:
4
+#
5
+# name: value
6
+#
7
+# There are 2 sections:
8
+# - global variables
9
+# - one or more JOBS
10
+#
11
+# JOBS allow you to collect values from multiple sources.
12
+# Each source will have its own set of charts.
13
+#
14
+# JOB parameters have to be indented (using spaces only, example below).
15
+
16
+# ----------------------------------------------------------------------
17
+# Global Variables
18
+# These variables set the defaults for all JOBs, however each JOB
19
+# may define its own, overriding the defaults.
20
+
21
+# update_every sets the default data collection frequency.
22
+# If unset, the python.d.plugin default is used.
23
+update_every: 5
24
+
25
+# priority controls the order of charts at the netdata dashboard.
26
+# Lower numbers move the charts towards the top of the page.
27
+# If unset, the default for python.d.plugin is used.
28
+# priority: 60000
29
+
30
+# retries sets the number of retries to be made in case of failures.
31
+# If unset, the default for python.d.plugin is used.
32
+# Attempts to restore the service are made once every update_every
33
+# and only if the module has collected values in the past.
34
+# retries: 5
35
+
36
+# ----------------------------------------------------------------------
37
+# JOBS (data collection sources)
38
+#
39
+# The default JOBS share the same *name*. JOBS with the same name
40
+# are mutually exclusive. Only one of them will be allowed running at
41
+# any time. This allows autodetection to try several alternatives and
42
+# pick the one that works.
43
+#
44
+# Any number of jobs is supported.
45
+#
46
+# All python.d.plugin JOBS (for all its modules) support a set of
47
+# predefined parameters. These are:
48
+#
49
+# job_name:
50
+# name: myname # the JOB's name as it will appear at the
51
+# # dashboard (by default is the job_name)
52
+# # JOBs sharing a name are mutually exclusive
53
+# update_every: 1 # the JOB's data collection frequency
54
+# priority: 60000 # the JOB's order on the dashboard
55
+# retries: 5 # the JOB's number of restoration attempts
56
+#
57
+#
58
+
python.d/Makefile.am
+2
-1
@@ -41,6 +41,7 @@ dist_python_DATA = \
41
postgres.chart.py \
42
redis.chart.py \
43
retroshare.chart.py \
44
+ Samba.chart.py \
45
sensors.chart.py \
46
squid.chart.py \
47
smartd_log.chart.py \
@@ -59,7 +60,7 @@ dist_pythonmodules_DATA = \
60
61
pythonyaml2dir=$(pythonmodulesdir)/pyyaml2
62
dist_pythonyaml2_DATA = \
62
- python_modules/pyyaml2/__init__.py \
63
+
64
python_modules/pyyaml2/composer.py \
65
python_modules/pyyaml2/constructor.py \
66
python_modules/pyyaml2/cyaml.py \
python.d/samba.chart.py
renamed
+1
-31
@@ -33,8 +33,6 @@ retries = 60
33
34
ORDER = ['smb2_rw','smb2_create_close','smb2_info','smb2_find','smb2_notify','smb2_sm_count']
35
36
-# The weird dummy1, etc. is for color selection.
37
-
36
CHARTS = {
37
'smb2_rw': {
38
'lines': [
@@ -47,8 +45,6 @@ CHARTS = {
45
},
46
'smb2_create_close': {
47
'lines': [
50
- ['dummy1', ' ', 'incremental', 1, 1],
51
- ['dummy2', ' ', 'incremental', 1, 1],
48
['smb2_create_count', 'create', 'incremental', 1, 1],
49
['smb2_close_count', 'close', 'incremental', -1, 1]
50
],
@@ -56,10 +52,6 @@ CHARTS = {
52
},
53
'smb2_info': {
54
'lines': [
59
- ['dummy1', ' ', 'incremental', 1, 1],
60
- ['dummy2', ' ', 'incremental', 1, 1],
61
- ['dummy3', ' ', 'incremental', 1, 1],
62
- ['dummy4', ' ', 'incremental', 1, 1],
55
['smb2_getinfo_count', 'getinfo', 'incremental', 1, 1],
56
['smb2_setinfo_count', 'setinfo', 'incremental', -1, 1]
57
],
@@ -67,25 +59,12 @@ CHARTS = {
59
},
60
'smb2_find': {
61
'lines': [
70
- ['dummy1', ' ', 'incremental', 1, 1],
71
- ['dummy2', ' ', 'incremental', 1, 1],
72
- ['dummy3', ' ', 'incremental', 1, 1],
73
- ['dummy4', ' ', 'incremental', 1, 1],
74
- ['dummy5', ' ', 'incremental', 1, 1],
75
- ['dummy6', ' ', 'incremental', 1, 1],
62
['smb2_find_count', 'find', 'incremental', 1, 1]
63
],
64
'options': [None, 'Find', 'operations/s', 'Smb2', 'smb2.find', 'area']
65
},
66
'smb2_notify': {
67
'lines': [
82
- ['dummy1', ' ', 'incremental', 1, 1],
83
- ['dummy2', ' ', 'incremental', 1, 1],
84
- ['dummy3', ' ', 'incremental', 1, 1],
85
- ['dummy4', ' ', 'incremental', 1, 1],
86
- ['dummy5', ' ', 'incremental', 1, 1],
87
- ['dummy6', ' ', 'incremental', 1, 1],
88
- ['dummy7', ' ', 'incremental', 1, 1],
68
['smb2_notify_count', 'notify', 'incremental', 1, 1]
69
],
70
'options': [None, 'Notify', 'operations/s', 'Smb2', 'smb2.notify', 'area']
@@ -143,7 +122,7 @@ class Service(SimpleService):
122
123
def _get_raw_data(self):
124
try:
146
- reply = Popen(['/usr/bin/sudo', self.smbstatus, '-P'], stdout=PIPE, stderr=PIPE, shell=False)
125
+ reply = Popen(['/usr/bin/sudo', '-n', self.smbstatus, '-P'], stdout=PIPE, stderr=PIPE, shell=False)
126
except OSError:
127
return None
128
@@ -167,15 +146,6 @@ class Service(SimpleService):
146
147
# 1. ALL data from 'smbstatus -P'.
148
to_netdata = dict([(k, int(v)) for k, v in data_all])
170
- # Add dummy values that are always zero (forcing color selection in charts)
171
- to_netdata['dummy1'] = 0
172
- to_netdata['dummy2'] = 0
173
- to_netdata['dummy3'] = 0
174
- to_netdata['dummy4'] = 0
175
- to_netdata['dummy5'] = 0
176
- to_netdata['dummy6'] = 0
177
- to_netdata['dummy7'] = 0
178
- to_netdata['dummy8'] = 0
149
150
# Ready steady go!
151
return to_netdata
web/dashboard_info.js
+55
@@ -91,6 +91,12 @@ netdataDashboard.menu = {
91
info: 'The Intelligent Platform Management Interface (IPMI) is a set of computer interface specifications for an autonomous computer subsystem that provides management and monitoring capabilities independently of the host system\'s CPU, firmware (BIOS or UEFI) and operating system.'
92
},
93
94
+ 'samba': {
95
+ title: 'Samba',
96
+ icon: '<i class="fa fa-folder-open" aria-hidden="true"></i>',
97
+ info: 'Performance metrics of the Samba file share operations of this system. Samba is a implementation of Windows services, including Windows SMB protocol file shares.'
98
+ },
99
+
100
'nfsd': {
101
title: 'NFS Server',
102
icon: '<i class="fa fa-folder-open" aria-hidden="true"></i>',
@@ -847,6 +853,55 @@ netdataDashboard.context = {
853
info: 'Statistics about RetroShare\'s DHT. These values are estimated!'
854
},
855
856
+ // ------------------------------------------------------------------------
857
+ // SAMBA
858
+
859
+ 'smb2_read_outbytes': {
860
+ colors: NETDATA.colors[0],
861
+ },
862
+
863
+ 'smb2_write_inbytes': {
864
+ colors: NETDATA.colors[1],
865
+ },
866
+
867
+ 'smb2_read_inbytes': {
868
+ colors: NETDATA.colors[2],
869
+ },
870
+
871
+ 'smb2_write_outbytes': {
872
+ colors: NETDATA.colors[3],
873
+ },
874
+
875
+ 'smb2_create_count': {
876
+ colors: NETDATA.colors[2],
877
+ height: 0.5
878
+ },
879
+
880
+ 'smb2_close_count': {
881
+ colors: NETDATA.colors[3],
882
+ height: 0.5
883
+ },
884
+
885
+ 'smb2_getinfo_count': {
886
+ colors: NETDATA.colors[4],
887
+ height: 0.5
888
+ },
889
+
890
+ 'smb2_setinfo_count': {
891
+ colors: NETDATA.colors[5],
892
+ height: 0.5
893
+ },
894
+
895
+ 'smb2_find_count': {
896
+ colors: NETDATA.colors[6],
897
+ height: 0.5
898
+ },
899
+
900
+ 'smb2_notify_count': {
901
+ colors: NETDATA.colors[7],
902
+ height: 0.5
903
+ },
904
+
905
// ------------------------------------------------------------------------
906
// fping
907