2015-03-04 20:55:53 +01:00
|
|
|
<script type="text/x-red" data-template-name="snmp">
|
|
|
|
<div class="form-row">
|
2017-06-27 00:02:34 +02:00
|
|
|
<label for="node-input-host"><i class="fa fa-globe"></i> Host</label>
|
|
|
|
<input type="text" id="node-input-host" placeholder="localhost">
|
2015-03-04 20:55:53 +01:00
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-community"><i class="fa fa-user"></i> Community</label>
|
|
|
|
<input type="text" id="node-input-community" placeholder="public">
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-version"><i class="fa fa-bookmark"></i> Version</label>
|
|
|
|
<select type="text" id="node-input-version" style="width: 150px;">
|
|
|
|
<option value="1">v1</option>
|
|
|
|
<option value="2c">v2c</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-oids"><i class="fa fa-tags"></i> OIDs</label>
|
|
|
|
<textarea rows="4" cols="60" id="node-input-oids" placeholder="e.g. 1.3.6.1.2.1.1.5.0" style="width:70%;"></textarea>
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
|
|
|
<input type="text" id="node-input-name" placeholder="Name">
|
|
|
|
</div>
|
|
|
|
<div class="form-tips">Tip: Multiple OIDs can be separated by commas.</div>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/x-red" data-help-name="snmp">
|
|
|
|
<p>Simple SNMP oid or oid list fetcher. Triggered by any input.</p>
|
2017-04-22 16:53:04 +02:00
|
|
|
<p><code>msg.host</code> may contain the host.</p>
|
|
|
|
<p><code>msg.community</code> may contain the community.</p>
|
2016-02-11 23:50:30 +01:00
|
|
|
<p><code>msg.oid</code> may contain a comma separated list of oids to request. (no spaces)</p>
|
|
|
|
<p>The node will output <code>msg.payload</code> and <code>msg.oid</code>.</p>
|
2015-03-04 20:55:53 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2017-06-27 00:02:34 +02:00
|
|
|
RED.nodes.registerType('snmp', {
|
2015-03-04 20:55:53 +01:00
|
|
|
category: 'network-input',
|
2017-06-27 00:02:34 +02:00
|
|
|
color: "YellowGreen",
|
2015-03-04 20:55:53 +01:00
|
|
|
defaults: {
|
2017-06-27 00:02:34 +02:00
|
|
|
host: { value: "127.0.0.1" },
|
|
|
|
community: { value: "public" },
|
|
|
|
version: { value: "1", required: true },
|
|
|
|
oids: { value: "" },
|
|
|
|
name: { value: "" }
|
2015-03-04 20:55:53 +01:00
|
|
|
},
|
2017-06-27 00:02:34 +02:00
|
|
|
inputs: 1,
|
|
|
|
outputs: 1,
|
2015-03-04 20:55:53 +01:00
|
|
|
icon: "snmp.png",
|
2017-06-27 00:02:34 +02:00
|
|
|
label: function () {
|
|
|
|
return this.name || "snmp " + this.host;
|
2015-03-04 20:55:53 +01:00
|
|
|
},
|
2017-06-27 00:02:34 +02:00
|
|
|
labelStyle: function () {
|
|
|
|
return this.name ? "node_label_italic" : "";
|
2015-03-04 20:55:53 +01:00
|
|
|
}
|
|
|
|
});
|
2017-06-27 00:02:34 +02:00
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/x-red" data-template-name="snmp set">
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-host"><i class="fa fa-globe"></i> Host</label>
|
|
|
|
<input type="text" id="node-input-host" placeholder="localhost">
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-community"><i class="fa fa-user"></i> Community</label>
|
|
|
|
<input type="text" id="node-input-community" placeholder="public">
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-version"><i class="fa fa-bookmark"></i> Version</label>
|
|
|
|
<select type="text" id="node-input-version" style="width: 150px;">
|
|
|
|
<option value="1">v1</option>
|
|
|
|
<option value="2c">v2c</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-varbinds"><i class="fa fa-tags"></i> Varbinds</label>
|
|
|
|
<textarea rows="10" cols="60" id="node-input-varbinds" placeholder="e.g. [ { "oid": "1.3.6.1.2.1.1.5.0","type": "OctetString","value": "host1"},{"oid": "1.3.6.1.2.1.1.6.0","type": "OctetString",value: "somewhere"}]"
|
|
|
|
style="width:70%;"></textarea>
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
|
|
|
<input type="text" id="node-input-name" placeholder="Name">
|
|
|
|
</div>
|
2015-03-04 20:55:53 +01:00
|
|
|
</script>
|
|
|
|
|
2017-06-27 00:02:34 +02:00
|
|
|
<script type="text/x-red" data-help-name="snmp set">
|
|
|
|
<p>Simple snmp Set node. Trigger by any input</p>
|
|
|
|
<p><code>msg.host</code> may contain the host.</p>
|
|
|
|
<p><code>msg.community</code> may contain the community.</p>
|
|
|
|
<p><code>msg.varbinds</code> may contain varbinds as an array of json objects containing multiple oids, types and values.
|
|
|
|
<pre>[
|
|
|
|
{
|
|
|
|
"oid": "1.3.6.1.2.1.1.5.0",
|
|
|
|
"type": "OctetString",
|
|
|
|
"value": "host1"
|
|
|
|
},
|
|
|
|
{ "oid": ... }
|
|
|
|
]</pre>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
RED.nodes.registerType('snmp set', {
|
|
|
|
category: 'network-input',
|
|
|
|
color: "YellowGreen",
|
|
|
|
defaults: {
|
|
|
|
host: { value: "127.0.0.1" },
|
|
|
|
community: { value: "public" },
|
|
|
|
version: { value: "1", required: true },
|
|
|
|
varbinds: { value: "" },
|
|
|
|
name: { value: "" }
|
|
|
|
},
|
|
|
|
inputs: 1,
|
|
|
|
outputs: 0,
|
|
|
|
icon: "snmp.png",
|
|
|
|
label: function () {
|
|
|
|
return this.name || "snmp set " + this.host;
|
|
|
|
},
|
|
|
|
labelStyle: function () {
|
|
|
|
return this.name ? "node_label_italic" : "";
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
2015-03-04 20:55:53 +01:00
|
|
|
|
|
|
|
<script type="text/x-red" data-template-name="snmp table">
|
|
|
|
<div class="form-row">
|
2017-06-27 00:02:34 +02:00
|
|
|
<label for="node-input-host"><i class="fa fa-globe"></i> Host</label>
|
|
|
|
<input type="text" id="node-input-host" placeholder="localhost">
|
2015-03-04 20:55:53 +01:00
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-community"><i class="fa fa-user"></i> Community</label>
|
|
|
|
<input type="text" id="node-input-community" placeholder="public">
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-version"><i class="fa fa-bookmark"></i> Version</label>
|
|
|
|
<select type="text" id="node-input-version" style="width: 150px;">
|
|
|
|
<option value="1">v1</option>
|
|
|
|
<option value="2c">v2c</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-oids"><i class="fa fa-tags"></i> OID</label>
|
|
|
|
<input type="text" id="node-input-oids" placeholder="e.g. 1.3.6.1.2.1.1.5.0">
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
|
|
|
<input type="text" id="node-input-name" placeholder="Name">
|
|
|
|
</div>
|
|
|
|
<div class="form-tips">Tip: ONLY accepts a single OID.</div>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/x-red" data-help-name="snmp table">
|
|
|
|
<p>Simple SNMP oid table fetcher. Triggered by any input.</p>
|
2017-04-22 16:53:04 +02:00
|
|
|
<p><code>msg.host</code> may contain the host.</p>
|
|
|
|
<p><code>msg.community</code> may contain the community.</p>
|
2016-02-11 23:50:30 +01:00
|
|
|
<p><code>msg.oid</code> may contain the oid of a table to request.</p>
|
|
|
|
<p>The node will output <code>msg.payload</code> and <code>msg.oid</code>.</p>
|
2015-03-04 20:55:53 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2017-06-27 00:02:34 +02:00
|
|
|
RED.nodes.registerType('snmp table', {
|
2015-03-04 20:55:53 +01:00
|
|
|
category: 'network-input',
|
2017-06-27 00:02:34 +02:00
|
|
|
color: "YellowGreen",
|
2015-03-04 20:55:53 +01:00
|
|
|
defaults: {
|
2017-06-27 00:02:34 +02:00
|
|
|
host: { value: "127.0.0.1" },
|
|
|
|
community: { value: "public" },
|
|
|
|
version: { value: "1", required: true },
|
|
|
|
oids: { value: "" },
|
|
|
|
name: { value: "" }
|
2015-03-04 20:55:53 +01:00
|
|
|
},
|
2017-06-27 00:02:34 +02:00
|
|
|
inputs: 1,
|
|
|
|
outputs: 1,
|
2015-03-04 20:55:53 +01:00
|
|
|
icon: "snmp.png",
|
2017-06-27 00:02:34 +02:00
|
|
|
label: function () {
|
|
|
|
return this.name || "snmp table " + this.host;
|
2015-03-04 20:55:53 +01:00
|
|
|
},
|
2017-06-27 00:02:34 +02:00
|
|
|
labelStyle: function () {
|
|
|
|
return this.name ? "node_label_italic" : "";
|
2015-03-04 20:55:53 +01:00
|
|
|
}
|
|
|
|
});
|
2017-06-27 00:02:34 +02:00
|
|
|
|
2015-03-04 20:55:53 +01:00
|
|
|
</script>
|
2016-04-12 19:39:19 +02:00
|
|
|
|
|
|
|
<script type="text/x-red" data-template-name="snmp subtree">
|
|
|
|
<div class="form-row">
|
2017-06-27 00:02:34 +02:00
|
|
|
<label for="node-input-host"><i class="fa fa-globe"></i> Host</label>
|
|
|
|
<input type="text" id="node-input-host" placeholder="localhost">
|
2016-04-12 19:39:19 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-community"><i class="fa fa-user"></i> Community</label>
|
|
|
|
<input type="text" id="node-input-community" placeholder="public">
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-version"><i class="fa fa-bookmark"></i> Version</label>
|
|
|
|
<select type="text" id="node-input-version" style="width: 150px;">
|
|
|
|
<option value="1">v1</option>
|
|
|
|
<option value="2c">v2c</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-oids"><i class="fa fa-tags"></i> OID</label>
|
|
|
|
<input type="text" id="node-input-oids" placeholder="e.g. 1.3.6.1.2.1.1.5.0">
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
|
|
|
<input type="text" id="node-input-name" placeholder="Name">
|
|
|
|
</div>
|
|
|
|
<div class="form-tips">Tip: ONLY accepts a single OID (node).</div>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/x-red" data-help-name="snmp subtree">
|
|
|
|
<p>Simple SNMP oid subtree fetcher. Triggered by any input.</p>
|
2017-04-22 16:53:04 +02:00
|
|
|
<p><code>msg.host</code> may contain the host.</p>
|
|
|
|
<p><code>msg.community</code> may contain the community.</p>
|
2016-04-12 19:39:19 +02:00
|
|
|
<p><code>msg.oid</code> may contain the oid of a table to request.</p>
|
|
|
|
<p>The node will output <code>msg.payload</code> and <code>msg.oid</code>.</p>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2017-06-27 00:02:34 +02:00
|
|
|
RED.nodes.registerType('snmp subtree', {
|
2016-04-12 19:39:19 +02:00
|
|
|
category: 'network-input',
|
2017-06-27 00:02:34 +02:00
|
|
|
color: "YellowGreen",
|
2016-04-12 19:39:19 +02:00
|
|
|
defaults: {
|
2017-06-27 00:02:34 +02:00
|
|
|
host: { value: "127.0.0.1" },
|
|
|
|
community: { value: "public" },
|
|
|
|
version: { value: "1", required: true },
|
|
|
|
oids: { value: "" },
|
|
|
|
name: { value: "" }
|
2016-04-12 19:39:19 +02:00
|
|
|
},
|
2017-06-27 00:02:34 +02:00
|
|
|
inputs: 1,
|
|
|
|
outputs: 1,
|
2016-04-12 19:39:19 +02:00
|
|
|
icon: "snmp.png",
|
2017-06-27 00:02:34 +02:00
|
|
|
label: function () {
|
|
|
|
return this.name || "snmp subtree " + this.host;
|
2016-04-12 19:39:19 +02:00
|
|
|
},
|
2017-06-27 00:02:34 +02:00
|
|
|
labelStyle: function () {
|
|
|
|
return this.name ? "node_label_italic" : "";
|
2016-04-12 19:39:19 +02:00
|
|
|
}
|
|
|
|
});
|
2017-06-27 00:02:34 +02:00
|
|
|
|
2016-04-12 19:39:19 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/x-red" data-template-name="snmp walker">
|
|
|
|
<div class="form-row">
|
2017-06-27 00:02:34 +02:00
|
|
|
<label for="node-input-host"><i class="fa fa-globe"></i> Host</label>
|
|
|
|
<input type="text" id="node-input-host" placeholder="localhost">
|
2016-04-12 19:39:19 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-community"><i class="fa fa-user"></i> Community</label>
|
|
|
|
<input type="text" id="node-input-community" placeholder="public">
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-version"><i class="fa fa-bookmark"></i> Version</label>
|
|
|
|
<select type="text" id="node-input-version" style="width: 150px;">
|
|
|
|
<option value="1">v1</option>
|
|
|
|
<option value="2c">v2c</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-oids"><i class="fa fa-tags"></i> OID</label>
|
|
|
|
<input type="text" id="node-input-oids" placeholder="e.g. 1.3.6.1.2.1.1.5.0">
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
|
|
|
<input type="text" id="node-input-name" placeholder="Name">
|
|
|
|
</div>
|
|
|
|
<div class="form-tips">Tip: ONLY accepts a single OID (node).</div>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/x-red" data-help-name="snmp walker">
|
|
|
|
<p>Simple SNMP oid walker fetcher. Triggered by any input.</p>
|
2017-04-22 16:53:04 +02:00
|
|
|
<p><code>msg.host</code> may contain the host.</p>
|
|
|
|
<p><code>msg.community</code> may contain the community.</p>
|
2016-04-12 19:39:19 +02:00
|
|
|
<p><code>msg.oid</code> may contain the oid of a table to request.</p>
|
|
|
|
<p>The node will output <code>msg.payload</code> and <code>msg.oid</code>.</p>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2017-06-27 00:02:34 +02:00
|
|
|
RED.nodes.registerType('snmp walker', {
|
2016-04-12 19:39:19 +02:00
|
|
|
category: 'network-input',
|
2017-06-27 00:02:34 +02:00
|
|
|
color: "YellowGreen",
|
2016-04-12 19:39:19 +02:00
|
|
|
defaults: {
|
2017-06-27 00:02:34 +02:00
|
|
|
host: { value: "127.0.0.1" },
|
|
|
|
community: { value: "public" },
|
|
|
|
version: { value: "1", required: true },
|
|
|
|
oids: { value: "" },
|
|
|
|
name: { value: "" }
|
2016-04-12 19:39:19 +02:00
|
|
|
},
|
2017-06-27 00:02:34 +02:00
|
|
|
inputs: 1,
|
|
|
|
outputs: 1,
|
2016-04-12 19:39:19 +02:00
|
|
|
icon: "snmp.png",
|
2017-06-27 00:02:34 +02:00
|
|
|
label: function () {
|
|
|
|
return this.name || "snmp walker " + this.host;
|
2016-04-12 19:39:19 +02:00
|
|
|
},
|
2017-06-27 00:02:34 +02:00
|
|
|
labelStyle: function () {
|
|
|
|
return this.name ? "node_label_italic" : "";
|
2016-04-12 19:39:19 +02:00
|
|
|
}
|
|
|
|
});
|
2017-06-27 00:02:34 +02:00
|
|
|
|
|
|
|
</script>
|