@cryptotaxi247 / netdata-1 / commits / 7ae3814fb

default registry in HTTPS, delayed registry qeueries 3 seconds at the dashboard; added debugging for tracing impersonate

Costa Tsaousis (ktsaou) committed May 14, 2016 at 18:07 UTC 7ae3814fb59043e1f3359738fb4392e18adda1b9
8 files changed +191 -184
src/registry.c
+7 -3
@@ -1174,10 +1174,14 @@ int registry_person_url_callback_verify_machine_exists(void *entry, void *machin
1174 PERSON_URL *pu = (PERSON_URL *)entry;
1175 MACHINE *m = (MACHINE *)machine;
1176
1177 - if(pu->machine == m)
1177 + if(pu->machine == m) {
1178 + info("registry_person_url_callback_verify_machine_exists('%s', '%s'): no", pu->machine->guid, m->guid);
1179 return 1;
1179 - else
1180 + }
1181 + else {
1182 + info("registry_person_url_callback_verify_machine_exists('%s', '%s'): yes", pu->machine->guid, m->guid);
1183 return 0;
1184 + }
1185 }
1186
1187 // the main method for switching user identity
@@ -1648,7 +1652,7 @@ int registry_init(void) {
1652 registry.save_registry_every_entries = config_get_number("registry", "registry save db every new entries", 1000000);
1653 registry.persons_expiration = config_get_number("registry", "registry expire idle persons days", 365) * 86400;
1654 registry.registry_domain = config_get("registry", "registry domain", "");
1651 - registry.registry_to_announce = config_get("registry", "registry to announce", "//registry.my-netdata.io");
1655 + registry.registry_to_announce = config_get("registry", "registry to announce", "https://registry.my-netdata.io");
1656 registry.hostname = config_get("registry", "registry hostname", config_get("global", "hostname", hostname));
1657
1658 registry.max_url_length = config_get_number("registry", "max URL length", 1024);
web/dashboard.html
+1 -1
@@ -646,4 +646,4 @@ So, to avoid flashing the charts, we destroy and re-create the charts on each up
646 <!-- <script> netdataServer = "http://box:19999"; </script> -->
647
648 <!-- load the dashboard manager - it will do the rest -->
649 - <script type="text/javascript" src="dashboard.js?v36"></script>
649 + <script type="text/javascript" src="dashboard.js?v37"></script>
web/dashboard.js
+1 -1
@@ -3392,7 +3392,7 @@
3392 NETDATA.parseDom(NETDATA.chartRefresher);
3393
3394 // Registry initialization
3395 - setTimeout(NETDATA.registry.init, 1000);
3395 + setTimeout(NETDATA.registry.init, 3000);
3396 };
3397
3398 // ----------------------------------------------------------------------------------------------------------------
web/demo.html
+42 -42
@@ -1,42 +1,42 @@
1 -<!DOCTYPE html>
2 -<html lang="en">
3 -<head>
4 - <title>NetData Dashboard</title>
5 -
6 - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 - <meta charset="utf-8">
8 - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
9 - <meta name="viewport" content="width=device-width, initial-scale=1">
10 - <meta name="apple-mobile-web-app-capable" content="yes">
11 - <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
12 - <meta name="author" content="costa@tsaousis.gr">
13 -
14 - <script type="text/javascript" src="dashboard.js?v36"></script>
15 -</head>
16 -<body>
17 -
18 -<div style="width: 100%; text-align: center;">
19 - <div data-netdata="netdata.server_cpu"
20 - data-dimensions="user"
21 - data-chart-library="gauge"
22 - data-width="150px"
23 - data-after="-60"
24 - data-points="60"
25 - data-title="Yes! Realtime!"
26 - data-units="I am alive!"
27 - data-colors="#FF5555"
28 - ></div>
29 - <br/>
30 - <div data-netdata="netdata.server_cpu"
31 - data-dimensions="user"
32 - data-chart-library="dygraph"
33 - data-dygraph-theme="sparkline"
34 - data-width="200px"
35 - data-height="30px"
36 - data-after="-60"
37 - data-points="60"
38 - data-colors="#FF5555"
39 - ></div>
40 -</div>
41 -</body>
42 -</html>
1 +<!DOCTYPE html>
2 +<html lang="en">
3 +<head>
4 + <title>NetData Dashboard</title>
5 +
6 + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 + <meta charset="utf-8">
8 + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
9 + <meta name="viewport" content="width=device-width, initial-scale=1">
10 + <meta name="apple-mobile-web-app-capable" content="yes">
11 + <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
12 + <meta name="author" content="costa@tsaousis.gr">
13 +
14 + <script type="text/javascript" src="dashboard.js?v37"></script>
15 +</head>
16 +<body>
17 +
18 +<div style="width: 100%; text-align: center;">
19 + <div data-netdata="netdata.server_cpu"
20 + data-dimensions="user"
21 + data-chart-library="gauge"
22 + data-width="150px"
23 + data-after="-60"
24 + data-points="60"
25 + data-title="Yes! Realtime!"
26 + data-units="I am alive!"
27 + data-colors="#FF5555"
28 + ></div>
29 + <br/>
30 + <div data-netdata="netdata.server_cpu"
31 + data-dimensions="user"
32 + data-chart-library="dygraph"
33 + data-dygraph-theme="sparkline"
34 + data-width="200px"
35 + data-height="30px"
36 + data-after="-60"
37 + data-points="60"
38 + data-colors="#FF5555"
39 + ></div>
40 +</div>
41 +</body>
42 +</html>
web/demo2.html
+134 -134
@@ -1,134 +1,134 @@
1 -<!DOCTYPE html>
2 -<html lang="en">
3 -<head>
4 - <title>NetData Dashboard</title>
5 -
6 - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 - <meta charset="utf-8">
8 - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
9 - <meta name="viewport" content="width=device-width, initial-scale=1">
10 - <meta name="apple-mobile-web-app-capable" content="yes">
11 - <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
12 - <meta name="author" content="costa@tsaousis.gr">
13 -
14 - <script>var netdataTheme = 'slate';</script>
15 - <script type="text/javascript" src="dashboard.js?v36"></script>
16 -</head>
17 -<body>
18 -
19 -<div class="container" style="width: 90%; padding-top: 10px; text-align: center; color: #AAA">
20 - <div style="font-size: 7vw;">why netdata?</div>
21 - <br/>
22 - <div style="font-size: 2vw; color: white;">These charts visualize the same data...</div>
23 -
24 -
25 - <!-- Nav tabs -->
26 - <ul class="nav nav-tabs" role="tablist">
27 - <li role="presentation" class="active"><a href="#gauge" aria-controls="gauge" role="tab" data-toggle="tab">Gauge.js</a></li>
28 - <li role="presentation"><a href="#easypiechart" aria-controls="easypiechart" role="tab" data-toggle="tab">Easy Pie Chart</a></li>
29 - </ul>
30 -
31 - <!-- Tab panes -->
32 - <div class="tab-content">
33 - <div role="tabpanel" class="tab-pane active" id="gauge">
34 -
35 - <div style="display: inline-block; width: 35.8%">
36 - <div style="font-size: 1.2vw; color: #666; padding-top: 10px;"><i class="fa fa-comment"></i> I can trace an issue like this</div>
37 - <br/>
38 - <div data-netdata="example.random2"
39 - data-dimensions="random"
40 - data-chart-library="gauge"
41 - data-gauge-max-value="32767"
42 - data-width="100%"
43 - data-after="-600"
44 - data-points="600"
45 - data-title="1/second (netdata&nbsp;default)"
46 - data-units="important metric"
47 - data-colors="#5A5"
48 - ></div>
49 - </div>
50 - <div style="display: inline-block; width: 50%">
51 - <div style="font-size: 1.2vw; color: #666;"><i class="fa fa-comment"></i> Can you trace an issue like these?<br/>&nbsp;<br/></div>
52 - <div data-netdata="example.random2"
53 - data-dimensions="random"
54 - data-chart-library="gauge"
55 - data-gauge-max-value="32767"
56 - data-width="45%"
57 - data-after="-600"
58 - data-points="40"
59 - data-title="Updates Every 15&nbsp;Sec"
60 - data-units="important metric"
61 - data-colors="#C55"
62 - ></div>
63 - <div data-netdata="example.random2"
64 - data-dimensions="random"
65 - data-chart-library="gauge"
66 - data-gauge-max-value="32767"
67 - data-width="45%"
68 - data-after="-600"
69 - data-points="2"
70 - data-title="Updates Every 5&nbsp;Mins"
71 - data-units="important metric"
72 - data-colors="#C55"
73 - ></div>
74 - </div>
75 - </div>
76 - <div role="tabpanel" class="tab-pane" id="easypiechart">
77 -
78 - <div style="display: inline-block; width: 25%">
79 - <div style="font-size: 1.2vw; color: #666; padding-top: 10px;"><i class="fa fa-comment"></i> I can trace an issue like this</div>
80 - <br/>
81 - <div data-netdata="example.random2"
82 - data-dimensions="random"
83 - data-chart-library="easypiechart"
84 - data-easypiechart-max-value="32767"
85 - data-width="100%"
86 - data-after="-600"
87 - data-points="600"
88 - data-title="1/second (netdata&nbsp;default)"
89 - data-units="important metric"
90 - data-colors="#5A5"
91 - ></div>
92 - </div>
93 - <div style="display: inline-block; width: 40%">
94 - <div style="font-size: 1.2vw; color: #666;"><i class="fa fa-comment"></i> Can you trace an issue like these?<br/>&nbsp;<br/></div>
95 - <div data-netdata="example.random2"
96 - data-dimensions="random"
97 - data-chart-library="easypiechart"
98 - data-easypiechart-max-value="32767"
99 - data-width="45%"
100 - data-after="-600"
101 - data-points="40"
102 - data-title="Updates Every 15&nbsp;Sec&nbsp;(<a href='https://github.com/OpenTSDB/opentsdb.net/blob/gh-pages/docs/source/user_guide/utilities/tcollector.rst#collecting-lots-of-metrics-with-tcollector' target='_blank'>OpenTSDB</a>)"
103 - data-units="important metric"
104 - data-colors="#C55"
105 - ></div>
106 - <div data-netdata="example.random2"
107 - data-dimensions="random"
108 - data-chart-library="easypiechart"
109 - data-easypiechart-max-value="32767"
110 - data-width="45%"
111 - data-after="-600"
112 - data-points="2"
113 - data-title="Updates Every 5&nbsp;Mins&nbsp;(your&nbsp;NMS)"
114 - data-units="important metric"
115 - data-colors="#C55"
116 - ></div>
117 - </div>
118 - </div>
119 - </div>
120 - <div style="font-size: 1.5vw;">Hover on the chart below, to see the selected value on the charts above!</div>
121 - <div data-netdata="example.random2"
122 - data-dimensions="random"
123 - data-dygraph-theme="sparkline"
124 - data-width="100%"
125 - data-height="20vh"
126 - data-after="-600"
127 - data-points="600"
128 - data-title="1/second (netdata&nbsp;default)"
129 - data-units="something"
130 - data-colors="#888"
131 - ></div>
132 -</div>
133 -</body>
134 -</html>
1 +<!DOCTYPE html>
2 +<html lang="en">
3 +<head>
4 + <title>NetData Dashboard</title>
5 +
6 + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 + <meta charset="utf-8">
8 + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
9 + <meta name="viewport" content="width=device-width, initial-scale=1">
10 + <meta name="apple-mobile-web-app-capable" content="yes">
11 + <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
12 + <meta name="author" content="costa@tsaousis.gr">
13 +
14 + <script>var netdataTheme = 'slate';</script>
15 + <script type="text/javascript" src="dashboard.js?v37"></script>
16 +</head>
17 +<body>
18 +
19 +<div class="container" style="width: 90%; padding-top: 10px; text-align: center; color: #AAA">
20 + <div style="font-size: 7vw;">why netdata?</div>
21 + <br/>
22 + <div style="font-size: 2vw; color: white;">These charts visualize the same data...</div>
23 +
24 +
25 + <!-- Nav tabs -->
26 + <ul class="nav nav-tabs" role="tablist">
27 + <li role="presentation" class="active"><a href="#gauge" aria-controls="gauge" role="tab" data-toggle="tab">Gauge.js</a></li>
28 + <li role="presentation"><a href="#easypiechart" aria-controls="easypiechart" role="tab" data-toggle="tab">Easy Pie Chart</a></li>
29 + </ul>
30 +
31 + <!-- Tab panes -->
32 + <div class="tab-content">
33 + <div role="tabpanel" class="tab-pane active" id="gauge">
34 +
35 + <div style="display: inline-block; width: 35.8%">
36 + <div style="font-size: 1.2vw; color: #666; padding-top: 10px;"><i class="fa fa-comment"></i> I can trace an issue like this</div>
37 + <br/>
38 + <div data-netdata="example.random2"
39 + data-dimensions="random"
40 + data-chart-library="gauge"
41 + data-gauge-max-value="32767"
42 + data-width="100%"
43 + data-after="-600"
44 + data-points="600"
45 + data-title="1/second (netdata&nbsp;default)"
46 + data-units="important metric"
47 + data-colors="#5A5"
48 + ></div>
49 + </div>
50 + <div style="display: inline-block; width: 50%">
51 + <div style="font-size: 1.2vw; color: #666;"><i class="fa fa-comment"></i> Can you trace an issue like these?<br/>&nbsp;<br/></div>
52 + <div data-netdata="example.random2"
53 + data-dimensions="random"
54 + data-chart-library="gauge"
55 + data-gauge-max-value="32767"
56 + data-width="45%"
57 + data-after="-600"
58 + data-points="40"
59 + data-title="Updates Every 15&nbsp;Sec"
60 + data-units="important metric"
61 + data-colors="#C55"
62 + ></div>
63 + <div data-netdata="example.random2"
64 + data-dimensions="random"
65 + data-chart-library="gauge"
66 + data-gauge-max-value="32767"
67 + data-width="45%"
68 + data-after="-600"
69 + data-points="2"
70 + data-title="Updates Every 5&nbsp;Mins"
71 + data-units="important metric"
72 + data-colors="#C55"
73 + ></div>
74 + </div>
75 + </div>
76 + <div role="tabpanel" class="tab-pane" id="easypiechart">
77 +
78 + <div style="display: inline-block; width: 25%">
79 + <div style="font-size: 1.2vw; color: #666; padding-top: 10px;"><i class="fa fa-comment"></i> I can trace an issue like this</div>
80 + <br/>
81 + <div data-netdata="example.random2"
82 + data-dimensions="random"
83 + data-chart-library="easypiechart"
84 + data-easypiechart-max-value="32767"
85 + data-width="100%"
86 + data-after="-600"
87 + data-points="600"
88 + data-title="1/second (netdata&nbsp;default)"
89 + data-units="important metric"
90 + data-colors="#5A5"
91 + ></div>
92 + </div>
93 + <div style="display: inline-block; width: 40%">
94 + <div style="font-size: 1.2vw; color: #666;"><i class="fa fa-comment"></i> Can you trace an issue like these?<br/>&nbsp;<br/></div>
95 + <div data-netdata="example.random2"
96 + data-dimensions="random"
97 + data-chart-library="easypiechart"
98 + data-easypiechart-max-value="32767"
99 + data-width="45%"
100 + data-after="-600"
101 + data-points="40"
102 + data-title="Updates Every 15&nbsp;Sec&nbsp;(<a href='https://github.com/OpenTSDB/opentsdb.net/blob/gh-pages/docs/source/user_guide/utilities/tcollector.rst#collecting-lots-of-metrics-with-tcollector' target='_blank'>OpenTSDB</a>)"
103 + data-units="important metric"
104 + data-colors="#C55"
105 + ></div>
106 + <div data-netdata="example.random2"
107 + data-dimensions="random"
108 + data-chart-library="easypiechart"
109 + data-easypiechart-max-value="32767"
110 + data-width="45%"
111 + data-after="-600"
112 + data-points="2"
113 + data-title="Updates Every 5&nbsp;Mins&nbsp;(your&nbsp;NMS)"
114 + data-units="important metric"
115 + data-colors="#C55"
116 + ></div>
117 + </div>
118 + </div>
119 + </div>
120 + <div style="font-size: 1.5vw;">Hover on the chart below, to see the selected value on the charts above!</div>
121 + <div data-netdata="example.random2"
122 + data-dimensions="random"
123 + data-dygraph-theme="sparkline"
124 + data-width="100%"
125 + data-height="20vh"
126 + data-after="-600"
127 + data-points="600"
128 + data-title="1/second (netdata&nbsp;default)"
129 + data-units="something"
130 + data-colors="#888"
131 + ></div>
132 +</div>
133 +</body>
134 +</html>
web/demosites.html
+1 -1
@@ -42,7 +42,7 @@
42 and that you have chown it to be owned by netdata:netdata
43 -->
44 <!-- <script type="text/javascript" src="http://my.server:19999/dashboard.js"></script> -->
45 - <script type="text/javascript" src="dashboard.js?v36"></script>
45 + <script type="text/javascript" src="dashboard.js?v37"></script>
46
47 <script>
48 // --- OPTIONS FOR THE CHARTS --
web/index.html
+4 -1
@@ -425,7 +425,7 @@
425 </script>
426
427 <!-- load the dashboard manager - it will do the rest -->
428 - <script type="text/javascript" src="dashboard.js?v36"></script>
428 + <script type="text/javascript" src="dashboard.js?v37"></script>
429 </head>
430
431 <body data-spy="scroll" data-target="#sidebar">
@@ -439,10 +439,12 @@
439 <div class="row">
440 <div class="col-sm-6" style="width: 85%; padding-right: 0;">
441 <ul id="mynetdata_servers" class="multi-column-dropdown">
442 + <li><a href="#" onclck="return false;" style="color: #999;">loading...</a></li>
443 </ul>
444 </div>
445 <div class="col-sm-3 hidden-xs" style="width: 15%; padding-left: 0;">
446 <ul id="mynetdata_actions1" class="multi-column-dropdown">
447 + <li style="color: #999;">&nbsp;</li>
448 </ul>
449 </div>
450 </div>
@@ -476,6 +478,7 @@
478 <li class="dropdown hidden-sm hidden-md hidden-lg">
479 <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="current_view">my-netdata <strong class="caret"></strong></a>
480 <ul id="mynetdata_servers2" class="dropdown-menu scrollable-menu inpagemenu" role="menu">
481 + <li><a href="#" onclck="return false;" style="color: #999;">loading...</a></li>
482 </ul>
483 </li>
484 </ul>
web/tv.html
+1 -1
@@ -40,7 +40,7 @@
40 and that you have chown it to be owned by netdata:netdata
41 -->
42 <!-- <script type="text/javascript" src="http://my.server:19999/dashboard.js"></script> -->
43 - <script type="text/javascript" src="dashboard.js?v36"></script>
43 + <script type="text/javascript" src="dashboard.js?v37"></script>
44
45 <script>
46 // Set options for TV operation