n8n-nodes-librenms
Version:
n8n community node for LibreNMS network monitoring system integration with comprehensive device management and monitoring capabilities
101 lines (100 loc) • 3.1 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.arpFields = exports.arpOperations = void 0;
exports.arpOperations = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: ['arp'],
},
},
options: [
{
name: 'Get ARP Entry',
value: 'getArpEntry',
description: 'Retrieve ARP entry by IP, MAC, or network',
action: 'Get ARP entry',
routing: {
request: {
method: 'GET',
url: '=/resources/ip/arp/{{$parameter.query}}',
},
output: {
postReceive: [
{
type: 'rootProperty',
properties: {
property: 'arp',
},
},
],
},
},
},
{
name: 'Get Device ARP',
value: 'getDeviceArp',
description: 'Get all ARP entries for a device',
action: 'Get device ARP entries',
routing: {
request: {
method: 'GET',
url: '/resources/ip/arp/all',
qs: {
device: '={{$parameter.deviceId}}',
},
},
output: {
postReceive: [
{
type: 'rootProperty',
properties: {
property: 'arp',
},
},
],
},
},
},
],
default: 'getArpEntry',
},
];
exports.arpFields = [
// Query field for IP/MAC/Network lookup
{
displayName: 'Query',
name: 'query',
type: 'string',
required: true,
displayOptions: {
show: {
resource: ['arp'],
operation: ['getArpEntry'],
},
},
default: '',
placeholder: '192.168.1.1 or 00:11:22:33:44:55 or 192.168.1.0/24',
description: 'IP address, MAC address, or CIDR network to search for',
},
// Device ID for device-specific ARP lookup
{
displayName: 'Device',
name: 'deviceId',
type: 'string',
required: true,
displayOptions: {
show: {
resource: ['arp'],
operation: ['getDeviceArp'],
},
},
default: '',
placeholder: 'hostname or device ID',
description: 'Device hostname or ID',
},
];