n8n-nodes-logicmonitor 0.1.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/README.md +90 -0
- package/dist/credentials/LogicMonitorApi.credentials.d.ts +8 -0
- package/dist/credentials/LogicMonitorApi.credentials.d.ts.map +1 -0
- package/dist/credentials/LogicMonitorApi.credentials.js +38 -0
- package/dist/credentials/LogicMonitorApi.credentials.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/nodes/LogicMonitor/LogicMonitor.node.d.ts +6 -0
- package/dist/nodes/LogicMonitor/LogicMonitor.node.d.ts.map +1 -0
- package/dist/nodes/LogicMonitor/LogicMonitor.node.js +118 -0
- package/dist/nodes/LogicMonitor/LogicMonitor.node.js.map +1 -0
- package/dist/nodes/LogicMonitor/descriptions/alerts.descriptions.d.ts +4 -0
- package/dist/nodes/LogicMonitor/descriptions/alerts.descriptions.d.ts.map +1 -0
- package/dist/nodes/LogicMonitor/descriptions/alerts.descriptions.js +157 -0
- package/dist/nodes/LogicMonitor/descriptions/alerts.descriptions.js.map +1 -0
- package/dist/nodes/LogicMonitor/descriptions/collectors.descriptions.d.ts +4 -0
- package/dist/nodes/LogicMonitor/descriptions/collectors.descriptions.d.ts.map +1 -0
- package/dist/nodes/LogicMonitor/descriptions/collectors.descriptions.js +232 -0
- package/dist/nodes/LogicMonitor/descriptions/collectors.descriptions.js.map +1 -0
- package/dist/nodes/LogicMonitor/descriptions/datasources.descriptions.d.ts +4 -0
- package/dist/nodes/LogicMonitor/descriptions/datasources.descriptions.d.ts.map +1 -0
- package/dist/nodes/LogicMonitor/descriptions/datasources.descriptions.js +214 -0
- package/dist/nodes/LogicMonitor/descriptions/datasources.descriptions.js.map +1 -0
- package/dist/nodes/LogicMonitor/descriptions/deviceGroups.descriptions.d.ts +4 -0
- package/dist/nodes/LogicMonitor/descriptions/deviceGroups.descriptions.d.ts.map +1 -0
- package/dist/nodes/LogicMonitor/descriptions/deviceGroups.descriptions.js +279 -0
- package/dist/nodes/LogicMonitor/descriptions/deviceGroups.descriptions.js.map +1 -0
- package/dist/nodes/LogicMonitor/descriptions/devices.descriptions.d.ts +4 -0
- package/dist/nodes/LogicMonitor/descriptions/devices.descriptions.d.ts.map +1 -0
- package/dist/nodes/LogicMonitor/descriptions/devices.descriptions.js +307 -0
- package/dist/nodes/LogicMonitor/descriptions/devices.descriptions.js.map +1 -0
- package/dist/nodes/LogicMonitor/descriptions/sdts.descriptions.d.ts +4 -0
- package/dist/nodes/LogicMonitor/descriptions/sdts.descriptions.d.ts.map +1 -0
- package/dist/nodes/LogicMonitor/descriptions/sdts.descriptions.js +260 -0
- package/dist/nodes/LogicMonitor/descriptions/sdts.descriptions.js.map +1 -0
- package/dist/nodes/LogicMonitor/helpers/apiRequest.d.ts +4 -0
- package/dist/nodes/LogicMonitor/helpers/apiRequest.d.ts.map +1 -0
- package/dist/nodes/LogicMonitor/helpers/apiRequest.js +115 -0
- package/dist/nodes/LogicMonitor/helpers/apiRequest.js.map +1 -0
- package/dist/nodes/LogicMonitor/helpers/errorHandler.d.ts +2 -0
- package/dist/nodes/LogicMonitor/helpers/errorHandler.d.ts.map +1 -0
- package/dist/nodes/LogicMonitor/helpers/errorHandler.js +29 -0
- package/dist/nodes/LogicMonitor/helpers/errorHandler.js.map +1 -0
- package/dist/nodes/LogicMonitor/helpers/executeOperation.d.ts +3 -0
- package/dist/nodes/LogicMonitor/helpers/executeOperation.d.ts.map +1 -0
- package/dist/nodes/LogicMonitor/helpers/executeOperation.js +99 -0
- package/dist/nodes/LogicMonitor/helpers/executeOperation.js.map +1 -0
- package/dist/nodes/LogicMonitor/helpers/responseFormatter.d.ts +3 -0
- package/dist/nodes/LogicMonitor/helpers/responseFormatter.d.ts.map +1 -0
- package/dist/nodes/LogicMonitor/helpers/responseFormatter.js +19 -0
- package/dist/nodes/LogicMonitor/helpers/responseFormatter.js.map +1 -0
- package/dist/nodes/LogicMonitor/logicmonitor.svg +1 -0
- package/dist/nodes/LogicMonitor/methods/alerts.d.ts +7 -0
- package/dist/nodes/LogicMonitor/methods/alerts.d.ts.map +1 -0
- package/dist/nodes/LogicMonitor/methods/alerts.js +53 -0
- package/dist/nodes/LogicMonitor/methods/alerts.js.map +1 -0
- package/dist/nodes/LogicMonitor/methods/collectors.d.ts +9 -0
- package/dist/nodes/LogicMonitor/methods/collectors.d.ts.map +1 -0
- package/dist/nodes/LogicMonitor/methods/collectors.js +95 -0
- package/dist/nodes/LogicMonitor/methods/collectors.js.map +1 -0
- package/dist/nodes/LogicMonitor/methods/datasources.d.ts +6 -0
- package/dist/nodes/LogicMonitor/methods/datasources.d.ts.map +1 -0
- package/dist/nodes/LogicMonitor/methods/datasources.js +62 -0
- package/dist/nodes/LogicMonitor/methods/datasources.js.map +1 -0
- package/dist/nodes/LogicMonitor/methods/deviceGroups.d.ts +7 -0
- package/dist/nodes/LogicMonitor/methods/deviceGroups.d.ts.map +1 -0
- package/dist/nodes/LogicMonitor/methods/deviceGroups.js +81 -0
- package/dist/nodes/LogicMonitor/methods/deviceGroups.js.map +1 -0
- package/dist/nodes/LogicMonitor/methods/devices.d.ts +7 -0
- package/dist/nodes/LogicMonitor/methods/devices.d.ts.map +1 -0
- package/dist/nodes/LogicMonitor/methods/devices.js +94 -0
- package/dist/nodes/LogicMonitor/methods/devices.js.map +1 -0
- package/dist/nodes/LogicMonitor/methods/sdts.d.ts +7 -0
- package/dist/nodes/LogicMonitor/methods/sdts.d.ts.map +1 -0
- package/dist/nodes/LogicMonitor/methods/sdts.js +72 -0
- package/dist/nodes/LogicMonitor/methods/sdts.js.map +1 -0
- package/package.json +53 -0
package/README.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# n8n-nodes-logicmonitor
|
|
2
|
+
|
|
3
|
+
An n8n community node for integrating with the [LogicMonitor](https://www.logicmonitor.com) REST API v3.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
### Supported Resources & Operations
|
|
8
|
+
|
|
9
|
+
| Resource | Operations |
|
|
10
|
+
|----------|-----------|
|
|
11
|
+
| **Device** | Get Many, Get, Create, Update, Delete |
|
|
12
|
+
| **Device Group** | Get Many, Get, Create, Update, Delete |
|
|
13
|
+
| **Alert** | Get Many, Get, Acknowledge, Escalate, Add Note |
|
|
14
|
+
| **SDT (Scheduled Downtime)** | Get Many, Get, Create, Update, Delete |
|
|
15
|
+
| **Collector** | Get Many, Get, Create, Update, Delete, Get Versions, Acknowledge Down |
|
|
16
|
+
| **Datasource** | Get Many, Get, Update, Delete |
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
In your n8n instance, go to **Settings → Community Nodes** and install:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
n8n-nodes-logicmonitor
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Credentials
|
|
27
|
+
|
|
28
|
+
You will need a LogicMonitor API token pair. To generate one:
|
|
29
|
+
|
|
30
|
+
1. Log in to your LogicMonitor portal
|
|
31
|
+
2. Go to **Settings → Users & Roles → API Tokens**
|
|
32
|
+
3. Click **Add** to create a new token
|
|
33
|
+
4. Copy the **Access ID** and **Access Key**
|
|
34
|
+
|
|
35
|
+
Configure the credential in n8n with:
|
|
36
|
+
|
|
37
|
+
- **Company Name** — your portal subdomain (e.g. `mycompany` for `mycompany.logicmonitor.com`)
|
|
38
|
+
- **Access ID** — the API token access ID
|
|
39
|
+
- **Access Key** — the API token access key (stored encrypted)
|
|
40
|
+
|
|
41
|
+
Authentication uses the LMv1 HMAC-SHA256 signing scheme required by LogicMonitor's API.
|
|
42
|
+
|
|
43
|
+
## Usage
|
|
44
|
+
|
|
45
|
+
### Filtering
|
|
46
|
+
|
|
47
|
+
Most list operations support LogicMonitor's RSQL filter syntax:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
name~"web*" # name contains "web"
|
|
51
|
+
hostStatus=="dead" # exact match
|
|
52
|
+
severity=="error" # alert severity
|
|
53
|
+
cleared==false # boolean
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Multiple conditions use `;` (AND) or `,` (OR):
|
|
57
|
+
```
|
|
58
|
+
severity=="error";cleared==false
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Pagination
|
|
62
|
+
|
|
63
|
+
Use **Return All** to automatically paginate through all results. For large datasets, use the **Filter** field to narrow results server-side before fetching.
|
|
64
|
+
|
|
65
|
+
### Custom Properties
|
|
66
|
+
|
|
67
|
+
When creating or updating devices and device groups, custom properties are set as key/value pairs. These replace existing properties with the same name.
|
|
68
|
+
|
|
69
|
+
### SDT Types
|
|
70
|
+
|
|
71
|
+
When creating a Scheduled Downtime, select the appropriate type to match the resource being put into SDT:
|
|
72
|
+
|
|
73
|
+
| SDT Type | Use For |
|
|
74
|
+
|----------|---------|
|
|
75
|
+
| `ResourceSDT` | A single device |
|
|
76
|
+
| `ResourceGroupSDT` | A device group |
|
|
77
|
+
| `CollectorSDT` | A collector |
|
|
78
|
+
| `DeviceDataSourceSDT` | A datasource on a device |
|
|
79
|
+
| `DeviceDataSourceInstanceSDT` | A specific datasource instance |
|
|
80
|
+
| `WebsiteSDT` | A website monitor |
|
|
81
|
+
| `WebsiteGroupSDT` | A website group |
|
|
82
|
+
|
|
83
|
+
## API Reference
|
|
84
|
+
|
|
85
|
+
- [LogicMonitor REST API Guide](https://www.logicmonitor.com/support/rest-api-developers-guide/overview/using-logicmonitors-rest-api)
|
|
86
|
+
- [LogicMonitor API v3 Reference](https://www.logicmonitor.com/swagger-ui-master/api-v3/lm-sdkv3-swagger.html)
|
|
87
|
+
|
|
88
|
+
## License
|
|
89
|
+
|
|
90
|
+
MIT
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class LogicMonitorApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=LogicMonitorApi.credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogicMonitorApi.credentials.d.ts","sourceRoot":"","sources":["../../credentials/LogicMonitorApi.credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEhE,qBAAa,eAAgB,YAAW,eAAe;IACtD,IAAI,SAAqB;IACzB,WAAW,SAAsB;IACjC,gBAAgB,SAA0G;IAE1H,UAAU,EAAE,eAAe,EAAE,CA2B3B;CACF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogicMonitorApi = void 0;
|
|
4
|
+
class LogicMonitorApi {
|
|
5
|
+
name = 'logicMonitorApi';
|
|
6
|
+
displayName = 'LogicMonitor API';
|
|
7
|
+
documentationUrl = 'https://www.logicmonitor.com/support/rest-api-developers-guide/overview/using-logicmonitors-rest-api';
|
|
8
|
+
properties = [
|
|
9
|
+
{
|
|
10
|
+
displayName: 'Company Name',
|
|
11
|
+
name: 'company',
|
|
12
|
+
type: 'string',
|
|
13
|
+
default: '',
|
|
14
|
+
required: true,
|
|
15
|
+
placeholder: 'mycompany',
|
|
16
|
+
description: 'Your LogicMonitor portal subdomain (e.g. "mycompany" for mycompany.logicmonitor.com)',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
displayName: 'Access ID',
|
|
20
|
+
name: 'accessId',
|
|
21
|
+
type: 'string',
|
|
22
|
+
default: '',
|
|
23
|
+
required: true,
|
|
24
|
+
description: 'The LogicMonitor API Access ID',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Access Key',
|
|
28
|
+
name: 'accessKey',
|
|
29
|
+
type: 'string',
|
|
30
|
+
typeOptions: { password: true },
|
|
31
|
+
default: '',
|
|
32
|
+
required: true,
|
|
33
|
+
description: 'The LogicMonitor API Access Key',
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
}
|
|
37
|
+
exports.LogicMonitorApi = LogicMonitorApi;
|
|
38
|
+
//# sourceMappingURL=LogicMonitorApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogicMonitorApi.credentials.js","sourceRoot":"","sources":["../../credentials/LogicMonitorApi.credentials.ts"],"names":[],"mappings":";;;AAEA,MAAa,eAAe;IAC3B,IAAI,GAAG,iBAAiB,CAAC;IACzB,WAAW,GAAG,kBAAkB,CAAC;IACjC,gBAAgB,GAAG,sGAAsG,CAAC;IAE1H,UAAU,GAAsB;QAC/B;YACC,WAAW,EAAE,cAAc;YAC3B,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,sFAAsF;SACnG;QACD;YACC,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,gCAAgC;SAC7C;QACD;YACC,WAAW,EAAE,YAAY;YACzB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC/B,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,iCAAiC;SAC9C;KACD,CAAC;CACF;AAjCD,0CAiCC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogicMonitorApi = exports.LogicMonitor = void 0;
|
|
4
|
+
var LogicMonitor_node_1 = require("./nodes/LogicMonitor/LogicMonitor.node");
|
|
5
|
+
Object.defineProperty(exports, "LogicMonitor", { enumerable: true, get: function () { return LogicMonitor_node_1.LogicMonitor; } });
|
|
6
|
+
var LogicMonitorApi_credentials_1 = require("./credentials/LogicMonitorApi.credentials");
|
|
7
|
+
Object.defineProperty(exports, "LogicMonitorApi", { enumerable: true, get: function () { return LogicMonitorApi_credentials_1.LogicMonitorApi; } });
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,4EAAsE;AAA7D,iHAAA,YAAY,OAAA;AACrB,yFAA4E;AAAnE,8HAAA,eAAe,OAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class LogicMonitor implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=LogicMonitor.node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogicMonitor.node.d.ts","sourceRoot":"","sources":["../../../nodes/LogicMonitor/LogicMonitor.node.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EAEpB,MAAM,cAAc,CAAC;AAUtB,qBAAa,YAAa,YAAW,SAAS;IAC7C,WAAW,EAAE,oBAAoB,CA6E/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CA6BvE"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogicMonitor = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const devices_descriptions_1 = require("./descriptions/devices.descriptions");
|
|
6
|
+
const deviceGroups_descriptions_1 = require("./descriptions/deviceGroups.descriptions");
|
|
7
|
+
const alerts_descriptions_1 = require("./descriptions/alerts.descriptions");
|
|
8
|
+
const sdts_descriptions_1 = require("./descriptions/sdts.descriptions");
|
|
9
|
+
const collectors_descriptions_1 = require("./descriptions/collectors.descriptions");
|
|
10
|
+
const datasources_descriptions_1 = require("./descriptions/datasources.descriptions");
|
|
11
|
+
const executeOperation_1 = require("./helpers/executeOperation");
|
|
12
|
+
class LogicMonitor {
|
|
13
|
+
description = {
|
|
14
|
+
displayName: 'LogicMonitor',
|
|
15
|
+
name: 'logicMonitor',
|
|
16
|
+
icon: 'file:logicmonitor.svg',
|
|
17
|
+
group: ['transform'],
|
|
18
|
+
version: 1,
|
|
19
|
+
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
20
|
+
description: 'Interact with the LogicMonitor API',
|
|
21
|
+
defaults: {
|
|
22
|
+
name: 'LogicMonitor',
|
|
23
|
+
},
|
|
24
|
+
inputs: ['main'],
|
|
25
|
+
outputs: ['main'],
|
|
26
|
+
credentials: [
|
|
27
|
+
{
|
|
28
|
+
name: 'logicMonitorApi',
|
|
29
|
+
required: true,
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
properties: [
|
|
33
|
+
// ── RESOURCE SELECTOR ─────────────────────────────────────────────────────
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Resource',
|
|
36
|
+
name: 'resource',
|
|
37
|
+
type: 'options',
|
|
38
|
+
noDataExpression: true,
|
|
39
|
+
options: [
|
|
40
|
+
{
|
|
41
|
+
name: 'Alert',
|
|
42
|
+
value: 'alert',
|
|
43
|
+
description: 'Manage alerts',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'Collector',
|
|
47
|
+
value: 'collector',
|
|
48
|
+
description: 'Manage collectors (polling agents)',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'Datasource',
|
|
52
|
+
value: 'datasource',
|
|
53
|
+
description: 'Manage datasource definitions',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'Device',
|
|
57
|
+
value: 'device',
|
|
58
|
+
description: 'Manage monitored devices',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'Device Group',
|
|
62
|
+
value: 'deviceGroup',
|
|
63
|
+
description: 'Manage device groups',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'SDT (Scheduled Downtime)',
|
|
67
|
+
value: 'sdt',
|
|
68
|
+
description: 'Manage scheduled downtime windows',
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
default: 'device',
|
|
72
|
+
},
|
|
73
|
+
// ── OPERATIONS ────────────────────────────────────────────────────────────
|
|
74
|
+
...devices_descriptions_1.deviceOperations,
|
|
75
|
+
...deviceGroups_descriptions_1.deviceGroupOperations,
|
|
76
|
+
...alerts_descriptions_1.alertOperations,
|
|
77
|
+
...sdts_descriptions_1.sdtOperations,
|
|
78
|
+
...collectors_descriptions_1.collectorOperations,
|
|
79
|
+
...datasources_descriptions_1.datasourceOperations,
|
|
80
|
+
// ── FIELDS ────────────────────────────────────────────────────────────────
|
|
81
|
+
...devices_descriptions_1.deviceFields,
|
|
82
|
+
...deviceGroups_descriptions_1.deviceGroupFields,
|
|
83
|
+
...alerts_descriptions_1.alertFields,
|
|
84
|
+
...sdts_descriptions_1.sdtFields,
|
|
85
|
+
...collectors_descriptions_1.collectorFields,
|
|
86
|
+
...datasources_descriptions_1.datasourceFields,
|
|
87
|
+
],
|
|
88
|
+
};
|
|
89
|
+
async execute() {
|
|
90
|
+
const items = this.getInputData();
|
|
91
|
+
const returnData = [];
|
|
92
|
+
const resource = this.getNodeParameter('resource', 0);
|
|
93
|
+
const operation = this.getNodeParameter('operation', 0);
|
|
94
|
+
for (let i = 0; i < items.length; i++) {
|
|
95
|
+
try {
|
|
96
|
+
const results = await executeOperation_1.executeOperation.call(this, resource, operation, i);
|
|
97
|
+
returnData.push(...results);
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
if (this.continueOnFail()) {
|
|
101
|
+
returnData.push({
|
|
102
|
+
json: { error: error.message },
|
|
103
|
+
pairedItem: { item: i },
|
|
104
|
+
});
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
if (error.context) {
|
|
108
|
+
error.context.itemIndex = i;
|
|
109
|
+
throw error;
|
|
110
|
+
}
|
|
111
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, { itemIndex: i });
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return [returnData];
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
exports.LogicMonitor = LogicMonitor;
|
|
118
|
+
//# sourceMappingURL=LogicMonitor.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogicMonitor.node.js","sourceRoot":"","sources":["../../../nodes/LogicMonitor/LogicMonitor.node.ts"],"names":[],"mappings":";;;AAAA,+CAMsB;AAEtB,8EAAqF;AACrF,wFAAoG;AACpG,4EAAkF;AAClF,wEAA4E;AAC5E,oFAA8F;AAC9F,sFAAiG;AACjG,iEAA8D;AAE9D,MAAa,YAAY;IACxB,WAAW,GAAyB;QACnC,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,uBAAuB;QAC7B,KAAK,EAAE,CAA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CAAC,CAAC;IACrB,CAAC;CACD;AA7GD,oCA6GC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alerts.descriptions.d.ts","sourceRoot":"","sources":["../../../../nodes/LogicMonitor/descriptions/alerts.descriptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,eAAO,MAAM,eAAe,EAAE,eAAe,EA6C5C,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,EA8GxC,CAAC"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.alertFields = exports.alertOperations = void 0;
|
|
4
|
+
exports.alertOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: {
|
|
12
|
+
resource: ['alert'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Acknowledge',
|
|
18
|
+
value: 'acknowledge',
|
|
19
|
+
description: 'Acknowledge an alert',
|
|
20
|
+
action: 'Acknowledge an alert',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Add Note',
|
|
24
|
+
value: 'addNote',
|
|
25
|
+
description: 'Add a note to an alert',
|
|
26
|
+
action: 'Add a note to an alert',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'Escalate',
|
|
30
|
+
value: 'escalate',
|
|
31
|
+
description: 'Escalate an alert',
|
|
32
|
+
action: 'Escalate an alert',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'Get',
|
|
36
|
+
value: 'get',
|
|
37
|
+
description: 'Get an alert by ID',
|
|
38
|
+
action: 'Get an alert',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'Get Many',
|
|
42
|
+
value: 'getMany',
|
|
43
|
+
description: 'Get a list of alerts',
|
|
44
|
+
action: 'Get many alerts',
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
default: 'getMany',
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
exports.alertFields = [
|
|
51
|
+
// ─── GET MANY ───────────────────────────────────────────────────────────────
|
|
52
|
+
{
|
|
53
|
+
displayName: 'Return All',
|
|
54
|
+
name: 'returnAll',
|
|
55
|
+
type: 'boolean',
|
|
56
|
+
default: false,
|
|
57
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
58
|
+
displayOptions: {
|
|
59
|
+
show: { resource: ['alert'], operation: ['getMany'] },
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
displayName: 'Limit',
|
|
64
|
+
name: 'limit',
|
|
65
|
+
type: 'number',
|
|
66
|
+
default: 50,
|
|
67
|
+
typeOptions: { minValue: 1, maxValue: 1000 },
|
|
68
|
+
description: 'Max number of results to return',
|
|
69
|
+
displayOptions: {
|
|
70
|
+
show: { resource: ['alert'], operation: ['getMany'], returnAll: [false] },
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
displayName: 'Additional Fields',
|
|
75
|
+
name: 'additionalFields',
|
|
76
|
+
type: 'collection',
|
|
77
|
+
placeholder: 'Add Field',
|
|
78
|
+
default: {},
|
|
79
|
+
displayOptions: {
|
|
80
|
+
show: { resource: ['alert'], operation: ['getMany'] },
|
|
81
|
+
},
|
|
82
|
+
options: [
|
|
83
|
+
{
|
|
84
|
+
displayName: 'Fields',
|
|
85
|
+
name: 'fields',
|
|
86
|
+
type: 'string',
|
|
87
|
+
default: '',
|
|
88
|
+
description: 'Comma-separated list of fields to return',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
displayName: 'Filter',
|
|
92
|
+
name: 'filter',
|
|
93
|
+
type: 'string',
|
|
94
|
+
default: '',
|
|
95
|
+
placeholder: 'severity=="error"',
|
|
96
|
+
description: 'RSQL filter expression (e.g. severity=="error" or cleared==false)',
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
// ─── GET / ACK / ESCALATE / NOTE ────────────────────────────────────────────
|
|
101
|
+
{
|
|
102
|
+
displayName: 'Alert ID',
|
|
103
|
+
name: 'alertId',
|
|
104
|
+
type: 'string',
|
|
105
|
+
default: '',
|
|
106
|
+
required: true,
|
|
107
|
+
description: 'The ID of the alert',
|
|
108
|
+
displayOptions: {
|
|
109
|
+
show: { resource: ['alert'], operation: ['get', 'acknowledge', 'escalate', 'addNote'] },
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
// ─── GET ─────────────────────────────────────────────────────────────────────
|
|
113
|
+
{
|
|
114
|
+
displayName: 'Options',
|
|
115
|
+
name: 'options',
|
|
116
|
+
type: 'collection',
|
|
117
|
+
placeholder: 'Add Option',
|
|
118
|
+
default: {},
|
|
119
|
+
displayOptions: {
|
|
120
|
+
show: { resource: ['alert'], operation: ['get'] },
|
|
121
|
+
},
|
|
122
|
+
options: [
|
|
123
|
+
{
|
|
124
|
+
displayName: 'Need Message',
|
|
125
|
+
name: 'needMessage',
|
|
126
|
+
type: 'boolean',
|
|
127
|
+
default: false,
|
|
128
|
+
description: 'Whether to include the alert message in the response',
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
},
|
|
132
|
+
// ─── ACKNOWLEDGE ────────────────────────────────────────────────────────────
|
|
133
|
+
{
|
|
134
|
+
displayName: 'Comment',
|
|
135
|
+
name: 'ackComment',
|
|
136
|
+
type: 'string',
|
|
137
|
+
default: '',
|
|
138
|
+
required: true,
|
|
139
|
+
description: 'Comment for the acknowledgement',
|
|
140
|
+
displayOptions: {
|
|
141
|
+
show: { resource: ['alert'], operation: ['acknowledge'] },
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
// ─── ADD NOTE ───────────────────────────────────────────────────────────────
|
|
145
|
+
{
|
|
146
|
+
displayName: 'Note',
|
|
147
|
+
name: 'ackComment',
|
|
148
|
+
type: 'string',
|
|
149
|
+
default: '',
|
|
150
|
+
required: true,
|
|
151
|
+
description: 'The note to add to the alert',
|
|
152
|
+
displayOptions: {
|
|
153
|
+
show: { resource: ['alert'], operation: ['addNote'] },
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
];
|
|
157
|
+
//# sourceMappingURL=alerts.descriptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alerts.descriptions.js","sourceRoot":"","sources":["../../../../nodes/LogicMonitor/descriptions/alerts.descriptions.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAsB;IACjD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,OAAO,CAAC;aACnB;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,aAAa;gBACpB,WAAW,EAAE,sBAAsB;gBACnC,MAAM,EAAE,sBAAsB;aAC9B;YACD;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,wBAAwB;gBACrC,MAAM,EAAE,wBAAwB;aAChC;YACD;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,mBAAmB;gBAChC,MAAM,EAAE,mBAAmB;aAC3B;YACD;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,WAAW,EAAE,oBAAoB;gBACjC,MAAM,EAAE,cAAc;aACtB;YACD;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,sBAAsB;gBACnC,MAAM,EAAE,iBA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QACd,WAAW,EAAE,8BAA8B;QAC3C,cAAc,EAAE;YACf,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE;SACrD;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collectors.descriptions.d.ts","sourceRoot":"","sources":["../../../../nodes/LogicMonitor/descriptions/collectors.descriptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,eAAO,MAAM,mBAAmB,EAAE,eAAe,EAyDhD,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,eAAe,EA6K5C,CAAC"}
|