@theotherwillembotha/node-red-statsd 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +15 -0
- package/README.md +0 -0
- package/build/GenerateNodes.d.ts +2 -0
- package/build/GenerateNodes.d.ts.map +1 -0
- package/build/GenerateNodes.js +13 -0
- package/build/Nodes.html +104 -0
- package/build/Nodes.js +36056 -0
- package/build/Plugins.html +11 -0
- package/build/Plugins.js +34360 -0
- package/build/index.d.ts +3 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +18 -0
- package/build/runtime/NodeManagerRuntime.js +140 -0
- package/build/statsd/fragments/StatsdCounterFragment.html +34 -0
- package/build/statsd/fragments/StatsdGaugeFragment.html +34 -0
- package/build/statsd/fragments/StatsdTimerFragment.html +41 -0
- package/build/statsd/node/StatsdMetricsConfigNode.d.ts +15 -0
- package/build/statsd/node/StatsdMetricsConfigNode.d.ts.map +1 -0
- package/build/statsd/node/StatsdMetricsConfigNode.js +50 -0
- package/build/statsd/service/StatsdMetricsContainer.d.ts +86 -0
- package/build/statsd/service/StatsdMetricsContainer.d.ts.map +1 -0
- package/build/statsd/service/StatsdMetricsContainer.js +293 -0
- package/package.json +59 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Willem Botha
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
15
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
package/README.md
ADDED
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GenerateNodes.d.ts","sourceRoot":"","sources":["../src/GenerateNodes.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const node_red_plugincore_1 = require("@theotherwillembotha/node-red-plugincore");
|
|
4
|
+
const StatsdMetricsConfigNode_js_1 = require("./statsd/node/StatsdMetricsConfigNode.js");
|
|
5
|
+
// Only register leaf nodes and NodeTypeService.
|
|
6
|
+
// All infrastructure (services, templates, DelegatedConfigReferenceNode)
|
|
7
|
+
// is resolved automatically from @NodeDescription and @TemplateDescription
|
|
8
|
+
// dependency chains.
|
|
9
|
+
new node_red_plugincore_1.NodeGenerator("./src/statsd/")
|
|
10
|
+
.registerService(node_red_plugincore_1.NodeTypeService)
|
|
11
|
+
.registerNode(StatsdMetricsConfigNode_js_1.StatsdMetricsConfigNode)
|
|
12
|
+
.generate("./build/Nodes", "./build/Plugins", "@theotherwillembotha/node-red-statsd");
|
|
13
|
+
process.exit(0);
|
package/build/Nodes.html
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
|
|
2
|
+
<!--
|
|
3
|
+
|
|
4
|
+
This file was automatically generated using the NODERED Core utility.
|
|
5
|
+
Any modifications to his file will be overwritten the next time the code is regenerated.
|
|
6
|
+
|
|
7
|
+
You have been warned.
|
|
8
|
+
|
|
9
|
+
-->
|
|
10
|
+
|
|
11
|
+
<script type="text/javascript">
|
|
12
|
+
RED.nodes.registerType('StatsdMetricsConfigNode', {
|
|
13
|
+
category: 'config',
|
|
14
|
+
label: function() {
|
|
15
|
+
return this.name;
|
|
16
|
+
},
|
|
17
|
+
paletteLabel: 'StatsD Metrics Config',
|
|
18
|
+
defaults: {
|
|
19
|
+
name: {
|
|
20
|
+
value: 'StatsD Metrics',
|
|
21
|
+
required: true
|
|
22
|
+
},
|
|
23
|
+
host: {
|
|
24
|
+
value: 'localhost',
|
|
25
|
+
required: true
|
|
26
|
+
},
|
|
27
|
+
port: {
|
|
28
|
+
value: 8125,
|
|
29
|
+
required: true
|
|
30
|
+
},
|
|
31
|
+
prefix: {
|
|
32
|
+
value: '',
|
|
33
|
+
required: false
|
|
34
|
+
},
|
|
35
|
+
protocol: {
|
|
36
|
+
value: 'udp',
|
|
37
|
+
required: true
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
oneditprepare: function() {
|
|
41
|
+
// **** StatsdMetricsConfigNode **** //
|
|
42
|
+
{
|
|
43
|
+
let node = this;
|
|
44
|
+
$("#node-config-input-protocol").typedInput({
|
|
45
|
+
types: [{
|
|
46
|
+
value: "protocol",
|
|
47
|
+
options: [{
|
|
48
|
+
value: "udp",
|
|
49
|
+
label: "UDP"
|
|
50
|
+
}, {
|
|
51
|
+
value: "tcp",
|
|
52
|
+
label: "TCP"
|
|
53
|
+
}]
|
|
54
|
+
}]
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
oneditsave: function() {},
|
|
59
|
+
oneditcancel: function() {},
|
|
60
|
+
oneditdelete: function() {},
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
</script>
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
<script type="text/html" data-template-name='StatsdMetricsConfigNode'>
|
|
67
|
+
<div id='section_StatsdMetricsConfigNode'>
|
|
68
|
+
<div id="StatsdMetricsConfig">
|
|
69
|
+
<div class="form-row">
|
|
70
|
+
<label class="towb_editorlabel" for="node-config-input-name"><i class="fa fa-font"></i> Name</label>
|
|
71
|
+
<input type="text" id="node-config-input-name" />
|
|
72
|
+
</div>
|
|
73
|
+
<div class="form-row">
|
|
74
|
+
<label for="node-config-input-host" style="width:120px;"><i class="fa fa-server"></i> Host</label>
|
|
75
|
+
<input type="text" id="node-config-input-host" />
|
|
76
|
+
</div>
|
|
77
|
+
<div class="form-row">
|
|
78
|
+
<label for="node-config-input-port" style="width:120px;"><i class="fa fa-plug"></i> Port</label>
|
|
79
|
+
<input type="number" id="node-config-input-port" />
|
|
80
|
+
</div>
|
|
81
|
+
<div class="form-row">
|
|
82
|
+
<label for="node-config-input-prefix" style="width:120px;"><i class="fa fa-tag"></i> Prefix</label>
|
|
83
|
+
<input type="text" id="node-config-input-prefix" placeholder="e.g. nodered." />
|
|
84
|
+
</div>
|
|
85
|
+
<div class="form-row">
|
|
86
|
+
<label for="node-config-input-protocol" style="width:120px;"><i class="fa fa-exchange"></i> Protocol</label>
|
|
87
|
+
<input type="text" id="node-config-input-protocol" />
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
</div>
|
|
92
|
+
</script>
|
|
93
|
+
|
|
94
|
+
<script type="text/markdown" data-help-name='StatsdMetricsConfigNode'>
|
|
95
|
+
### StatsD Metrics Config
|
|
96
|
+
Configures a StatsD client that pushes metrics to a StatsD-compatible server (e.g. StatsD, Graphite, Datadog Agent).
|
|
97
|
+
|
|
98
|
+
: *name* (string) : A descriptive name for this metrics provider.
|
|
99
|
+
: *host* (string) : The hostname or IP address of the StatsD server.
|
|
100
|
+
: *port* (number) : The port the StatsD server listens on (default: 8125).
|
|
101
|
+
: *prefix* (string) : Optional prefix prepended to all metric names (e.g. `nodered.`).
|
|
102
|
+
: *protocol* (string) : Transport protocol — UDP (default, fire-and-forget) or TCP (reliable).
|
|
103
|
+
</script>
|
|
104
|
+
|