@bsb/observable-graylog 9.0.0 → 9.1.1
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 +47 -17
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -7
- package/lib/plugins/observable-graylog/index.d.ts +47 -59
- package/lib/plugins/observable-graylog/index.js +28 -70
- package/lib/schemas/observable-graylog.json +0 -95
- package/lib/schemas/observable-graylog.plugin.json +1 -96
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# @bsb/observable-graylog
|
|
2
2
|
|
|
3
|
-
Graylog (GELF) observable plugin for BSB
|
|
3
|
+
Graylog (GELF) observable plugin for BSB that sends logs to Graylog servers using the Graylog Extended Log Format (GELF) protocol.
|
|
4
|
+
|
|
5
|
+
## Key Features
|
|
6
|
+
|
|
7
|
+
- GELF 1.1 protocol support
|
|
8
|
+
- Multiple transports: UDP, TCP, and HTTP
|
|
9
|
+
- Custom fields with automatic trace and span integration
|
|
10
|
+
- Optional gzip compression
|
|
11
|
+
- Level filtering to control which logs are sent
|
|
4
12
|
|
|
5
13
|
## Installation
|
|
6
14
|
|
|
@@ -8,16 +16,10 @@ Graylog (GELF) observable plugin for BSB - send logs to Graylog servers using th
|
|
|
8
16
|
npm install @bsb/observable-graylog
|
|
9
17
|
```
|
|
10
18
|
|
|
11
|
-
## Features
|
|
12
|
-
|
|
13
|
-
- **GELF 1.1 protocol** - Full Graylog Extended Log Format support
|
|
14
|
-
- **Multiple transports** - UDP, TCP, and HTTP
|
|
15
|
-
- **Custom fields** - Automatic trace/span integration
|
|
16
|
-
- **Compression** - Optional gzip compression
|
|
17
|
-
- **Level filtering** - Control which logs are sent
|
|
18
|
-
|
|
19
19
|
## Configuration
|
|
20
20
|
|
|
21
|
+
Add the plugin to your BSB configuration file:
|
|
22
|
+
|
|
21
23
|
```yaml
|
|
22
24
|
plugins:
|
|
23
25
|
observables:
|
|
@@ -41,14 +43,42 @@ plugins:
|
|
|
41
43
|
|
|
42
44
|
### Configuration Options
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
| Option | Description | Default |
|
|
47
|
+
|--------|-------------|---------|
|
|
48
|
+
| `host` | Graylog server hostname | `localhost` |
|
|
49
|
+
| `port` | Graylog GELF input port | `12201` |
|
|
50
|
+
| `protocol` | Transport protocol: `udp`, `tcp`, `http` | `udp` |
|
|
51
|
+
| `httpEndpoint` | HTTP endpoint URL (for HTTP protocol) | - |
|
|
52
|
+
| `facility` | Facility name for log categorization | `bsb` |
|
|
53
|
+
| `additionalFields` | Custom fields included in all messages | `{}` |
|
|
54
|
+
| `compress` | Enable gzip compression | `true` |
|
|
55
|
+
| `levels` | Log level filtering | All enabled |
|
|
56
|
+
|
|
57
|
+
## Usage
|
|
58
|
+
|
|
59
|
+
Once configured, logs are automatically sent to Graylog:
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
this.log.info("Service initialized");
|
|
63
|
+
this.log.error("Failed to connect", new Error("Connection timeout"));
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Graylog Setup
|
|
67
|
+
|
|
68
|
+
Create a GELF input in Graylog:
|
|
69
|
+
|
|
70
|
+
1. Navigate to System -> Inputs
|
|
71
|
+
2. Select GELF UDP/TCP/HTTP
|
|
72
|
+
3. Launch a new input and configure the port
|
|
73
|
+
|
|
74
|
+
## Documentation
|
|
75
|
+
|
|
76
|
+
Detailed documentation (used by the BSB Registry): `https://github.com/BetterCorp/better-service-base/blob/master/plugins/nodejs/observable-graylog/docs/plugin.md`
|
|
77
|
+
|
|
78
|
+
## Links
|
|
79
|
+
|
|
80
|
+
- GitHub: `https://github.com/BetterCorp/better-service-base/tree/master/plugins/nodejs/observable-graylog`
|
|
81
|
+
- BSB Registry (package): `https://io.bsbcode.dev/packages/nodejs/@bsb/observable-graylog`
|
|
52
82
|
|
|
53
83
|
## License
|
|
54
84
|
|
package/lib/index.d.ts
CHANGED
|
@@ -24,4 +24,4 @@
|
|
|
24
24
|
* You should have received a copy of the GNU Affero General Public License
|
|
25
25
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
26
26
|
*/
|
|
27
|
-
export { GraylogConfigSchema, type GraylogConfig, Config, Plugin, } from "./plugins/observable-graylog";
|
|
27
|
+
export { GraylogConfigSchema, type GraylogConfig, Config, Plugin, } from "./plugins/observable-graylog/index.js";
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* BSB (Better-Service-Base) is an event-bus based microservice framework.
|
|
4
3
|
* Copyright (C) 2016 - 2025 BetterCorp (PTY) Ltd
|
|
@@ -25,9 +24,4 @@
|
|
|
25
24
|
* You should have received a copy of the GNU Affero General Public License
|
|
26
25
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
27
26
|
*/
|
|
28
|
-
|
|
29
|
-
exports.Plugin = exports.Config = exports.GraylogConfigSchema = void 0;
|
|
30
|
-
var observable_graylog_1 = require("./plugins/observable-graylog");
|
|
31
|
-
Object.defineProperty(exports, "GraylogConfigSchema", { enumerable: true, get: function () { return observable_graylog_1.GraylogConfigSchema; } });
|
|
32
|
-
Object.defineProperty(exports, "Config", { enumerable: true, get: function () { return observable_graylog_1.Config; } });
|
|
33
|
-
Object.defineProperty(exports, "Plugin", { enumerable: true, get: function () { return observable_graylog_1.Plugin; } });
|
|
27
|
+
export { GraylogConfigSchema, Config, Plugin, } from "./plugins/observable-graylog/index.js";
|
|
@@ -26,72 +26,60 @@
|
|
|
26
26
|
*/
|
|
27
27
|
import { BSBObservable, BSBObservableConstructor, BSBError } from "@bsb/base";
|
|
28
28
|
import { DTrace, LogMeta } from "@bsb/base";
|
|
29
|
-
import
|
|
29
|
+
import * as av from "@anyvali/js";
|
|
30
30
|
/**
|
|
31
31
|
* Configuration schema for Graylog observable
|
|
32
32
|
*/
|
|
33
|
-
export declare const GraylogConfigSchema:
|
|
34
|
-
host:
|
|
35
|
-
port:
|
|
36
|
-
protocol:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
compress: z.ZodDefault<z.ZodBoolean>;
|
|
65
|
-
levels: z.ZodObject<{
|
|
66
|
-
debug: z.ZodDefault<z.ZodBoolean>;
|
|
67
|
-
info: z.ZodDefault<z.ZodBoolean>;
|
|
68
|
-
warn: z.ZodDefault<z.ZodBoolean>;
|
|
69
|
-
error: z.ZodDefault<z.ZodBoolean>;
|
|
70
|
-
}, z.core.$strip>;
|
|
71
|
-
}, z.core.$strip>>;
|
|
33
|
+
export declare const GraylogConfigSchema: av.ObjectSchema<{
|
|
34
|
+
host: av.OptionalSchema<av.StringSchema>;
|
|
35
|
+
port: av.OptionalSchema<av.Int32Schema>;
|
|
36
|
+
protocol: av.OptionalSchema<av.EnumSchema<string[]>>;
|
|
37
|
+
httpEndpoint: av.OptionalSchema<av.StringSchema>;
|
|
38
|
+
facility: av.OptionalSchema<av.StringSchema>;
|
|
39
|
+
additionalFields: av.OptionalSchema<av.RecordSchema<av.UnionSchema<[av.StringSchema, av.NumberSchema, av.BoolSchema]>>>;
|
|
40
|
+
compress: av.OptionalSchema<av.BoolSchema>;
|
|
41
|
+
levels: av.ObjectSchema<{
|
|
42
|
+
debug: av.OptionalSchema<av.BoolSchema>;
|
|
43
|
+
info: av.OptionalSchema<av.BoolSchema>;
|
|
44
|
+
warn: av.OptionalSchema<av.BoolSchema>;
|
|
45
|
+
error: av.OptionalSchema<av.BoolSchema>;
|
|
46
|
+
}>;
|
|
47
|
+
}>;
|
|
48
|
+
export type GraylogConfig = av.Infer<typeof GraylogConfigSchema>;
|
|
49
|
+
export declare const Config: import("@bsb/base").BSBPluginConfigClass<av.ObjectSchema<{
|
|
50
|
+
host: av.OptionalSchema<av.StringSchema>;
|
|
51
|
+
port: av.OptionalSchema<av.Int32Schema>;
|
|
52
|
+
protocol: av.OptionalSchema<av.EnumSchema<string[]>>;
|
|
53
|
+
httpEndpoint: av.OptionalSchema<av.StringSchema>;
|
|
54
|
+
facility: av.OptionalSchema<av.StringSchema>;
|
|
55
|
+
additionalFields: av.OptionalSchema<av.RecordSchema<av.UnionSchema<[av.StringSchema, av.NumberSchema, av.BoolSchema]>>>;
|
|
56
|
+
compress: av.OptionalSchema<av.BoolSchema>;
|
|
57
|
+
levels: av.ObjectSchema<{
|
|
58
|
+
debug: av.OptionalSchema<av.BoolSchema>;
|
|
59
|
+
info: av.OptionalSchema<av.BoolSchema>;
|
|
60
|
+
warn: av.OptionalSchema<av.BoolSchema>;
|
|
61
|
+
error: av.OptionalSchema<av.BoolSchema>;
|
|
62
|
+
}>;
|
|
63
|
+
}>>;
|
|
72
64
|
/**
|
|
73
65
|
* Graylog (GELF) observable plugin - sends logs to Graylog servers
|
|
74
66
|
*/
|
|
75
67
|
export declare class Plugin extends BSBObservable<InstanceType<typeof Config>> {
|
|
76
|
-
static Config: import("@bsb/base").BSBPluginConfigClass<
|
|
77
|
-
host:
|
|
78
|
-
port:
|
|
79
|
-
protocol:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
warn: z.ZodDefault<z.ZodBoolean>;
|
|
92
|
-
error: z.ZodDefault<z.ZodBoolean>;
|
|
93
|
-
}, z.core.$strip>;
|
|
94
|
-
}, z.core.$strip>>;
|
|
68
|
+
static Config: import("@bsb/base").BSBPluginConfigClass<av.ObjectSchema<{
|
|
69
|
+
host: av.OptionalSchema<av.StringSchema>;
|
|
70
|
+
port: av.OptionalSchema<av.Int32Schema>;
|
|
71
|
+
protocol: av.OptionalSchema<av.EnumSchema<string[]>>;
|
|
72
|
+
httpEndpoint: av.OptionalSchema<av.StringSchema>;
|
|
73
|
+
facility: av.OptionalSchema<av.StringSchema>;
|
|
74
|
+
additionalFields: av.OptionalSchema<av.RecordSchema<av.UnionSchema<[av.StringSchema, av.NumberSchema, av.BoolSchema]>>>;
|
|
75
|
+
compress: av.OptionalSchema<av.BoolSchema>;
|
|
76
|
+
levels: av.ObjectSchema<{
|
|
77
|
+
debug: av.OptionalSchema<av.BoolSchema>;
|
|
78
|
+
info: av.OptionalSchema<av.BoolSchema>;
|
|
79
|
+
warn: av.OptionalSchema<av.BoolSchema>;
|
|
80
|
+
error: av.OptionalSchema<av.BoolSchema>;
|
|
81
|
+
}>;
|
|
82
|
+
}>>;
|
|
95
83
|
private logFormatter;
|
|
96
84
|
private isDisposed;
|
|
97
85
|
constructor(config: BSBObservableConstructor<InstanceType<typeof Config>>);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* BSB (Better-Service-Base) is an event-bus based microservice framework.
|
|
4
3
|
* Copyright (C) 2016 - 2025 BetterCorp (PTY) Ltd
|
|
@@ -25,79 +24,39 @@
|
|
|
25
24
|
* You should have received a copy of the GNU Affero General Public License
|
|
26
25
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
27
26
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
32
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
33
|
-
}
|
|
34
|
-
Object.defineProperty(o, k2, desc);
|
|
35
|
-
}) : (function(o, m, k, k2) {
|
|
36
|
-
if (k2 === undefined) k2 = k;
|
|
37
|
-
o[k2] = m[k];
|
|
38
|
-
}));
|
|
39
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
40
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
41
|
-
}) : function(o, v) {
|
|
42
|
-
o["default"] = v;
|
|
43
|
-
});
|
|
44
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
45
|
-
var ownKeys = function(o) {
|
|
46
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
47
|
-
var ar = [];
|
|
48
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
49
|
-
return ar;
|
|
50
|
-
};
|
|
51
|
-
return ownKeys(o);
|
|
52
|
-
};
|
|
53
|
-
return function (mod) {
|
|
54
|
-
if (mod && mod.__esModule) return mod;
|
|
55
|
-
var result = {};
|
|
56
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
57
|
-
__setModuleDefault(result, mod);
|
|
58
|
-
return result;
|
|
59
|
-
};
|
|
60
|
-
})();
|
|
61
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
|
-
exports.Plugin = exports.Config = exports.GraylogConfigSchema = void 0;
|
|
63
|
-
const base_1 = require("@bsb/base");
|
|
64
|
-
const zod_1 = require("zod");
|
|
65
|
-
const gelfPro = __importStar(require("gelf-pro"));
|
|
27
|
+
import { BSBObservable, createConfigSchema, LogFormatter, BSBError } from "@bsb/base";
|
|
28
|
+
import * as av from "@anyvali/js";
|
|
29
|
+
import * as gelfPro from "gelf-pro";
|
|
66
30
|
/**
|
|
67
31
|
* Configuration schema for Graylog observable
|
|
68
32
|
*/
|
|
69
|
-
|
|
70
|
-
host:
|
|
71
|
-
port:
|
|
72
|
-
protocol:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
warn: zod_1.z.boolean().default(true),
|
|
90
|
-
error: zod_1.z.boolean().default(true),
|
|
91
|
-
}),
|
|
92
|
-
});
|
|
93
|
-
exports.Config = (0, base_1.createConfigSchema)({
|
|
33
|
+
export const GraylogConfigSchema = av.object({
|
|
34
|
+
host: av.optional(av.string()).default("localhost"),
|
|
35
|
+
port: av.optional(av.int32().min(1).max(65535)).default(12201),
|
|
36
|
+
protocol: av.optional(av.enum_(["udp", "tcp", "http"])).default("udp"),
|
|
37
|
+
httpEndpoint: av.optional(av.string().format("url")),
|
|
38
|
+
facility: av.optional(av.string()).default("bsb"),
|
|
39
|
+
additionalFields: av.optional(av.record(av.union([
|
|
40
|
+
av.string(),
|
|
41
|
+
av.number(),
|
|
42
|
+
av.bool(),
|
|
43
|
+
]))).default({}),
|
|
44
|
+
compress: av.optional(av.bool()).default(true),
|
|
45
|
+
levels: av.object({
|
|
46
|
+
debug: av.optional(av.bool()).default(true),
|
|
47
|
+
info: av.optional(av.bool()).default(true),
|
|
48
|
+
warn: av.optional(av.bool()).default(true),
|
|
49
|
+
error: av.optional(av.bool()).default(true),
|
|
50
|
+
}, { unknownKeys: "strip" }),
|
|
51
|
+
}, { unknownKeys: "strip" });
|
|
52
|
+
export const Config = createConfigSchema({
|
|
94
53
|
name: 'observable-graylog',
|
|
95
54
|
description: 'Graylog GELF observable plugin for centralized log ingestion',
|
|
96
55
|
version: '9.0.0',
|
|
97
56
|
image: './observable-graylog.png',
|
|
98
57
|
tags: ['graylog', 'gelf', 'observability', 'logging'],
|
|
99
58
|
documentation: ['./docs/plugin.md'],
|
|
100
|
-
},
|
|
59
|
+
}, GraylogConfigSchema);
|
|
101
60
|
/**
|
|
102
61
|
* Convert BSB log level to GELF/syslog severity level
|
|
103
62
|
*/
|
|
@@ -120,9 +79,9 @@ function bsbLevelToGelfLevel(level) {
|
|
|
120
79
|
/**
|
|
121
80
|
* Graylog (GELF) observable plugin - sends logs to Graylog servers
|
|
122
81
|
*/
|
|
123
|
-
class Plugin extends
|
|
124
|
-
static Config =
|
|
125
|
-
logFormatter = new
|
|
82
|
+
export class Plugin extends BSBObservable {
|
|
83
|
+
static Config = Config;
|
|
84
|
+
logFormatter = new LogFormatter();
|
|
126
85
|
isDisposed = false;
|
|
127
86
|
constructor(config) {
|
|
128
87
|
super(config);
|
|
@@ -211,7 +170,7 @@ class Plugin extends base_1.BSBObservable {
|
|
|
211
170
|
if (!this.config.levels.error) {
|
|
212
171
|
return;
|
|
213
172
|
}
|
|
214
|
-
if (message instanceof
|
|
173
|
+
if (message instanceof BSBError) {
|
|
215
174
|
if (message.raw !== null) {
|
|
216
175
|
this.sendLog("error", message.raw.trace, pluginName, message.raw.message, message.raw.meta);
|
|
217
176
|
}
|
|
@@ -228,4 +187,3 @@ class Plugin extends base_1.BSBObservable {
|
|
|
228
187
|
// gelf-pro doesn't require explicit cleanup
|
|
229
188
|
}
|
|
230
189
|
}
|
|
231
|
-
exports.Plugin = Plugin;
|
|
@@ -2,101 +2,6 @@
|
|
|
2
2
|
"pluginName": "observable-graylog",
|
|
3
3
|
"version": "9.0.0",
|
|
4
4
|
"events": {},
|
|
5
|
-
"configSchema": {
|
|
6
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
7
|
-
"type": "object",
|
|
8
|
-
"properties": {
|
|
9
|
-
"host": {
|
|
10
|
-
"default": "localhost",
|
|
11
|
-
"type": "string"
|
|
12
|
-
},
|
|
13
|
-
"port": {
|
|
14
|
-
"default": 12201,
|
|
15
|
-
"type": "integer",
|
|
16
|
-
"minimum": 1,
|
|
17
|
-
"maximum": 65535
|
|
18
|
-
},
|
|
19
|
-
"protocol": {
|
|
20
|
-
"default": "udp",
|
|
21
|
-
"type": "string",
|
|
22
|
-
"enum": [
|
|
23
|
-
"udp",
|
|
24
|
-
"tcp",
|
|
25
|
-
"http"
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
|
-
"httpEndpoint": {
|
|
29
|
-
"type": "string",
|
|
30
|
-
"format": "uri"
|
|
31
|
-
},
|
|
32
|
-
"facility": {
|
|
33
|
-
"default": "bsb",
|
|
34
|
-
"type": "string"
|
|
35
|
-
},
|
|
36
|
-
"additionalFields": {
|
|
37
|
-
"default": {},
|
|
38
|
-
"type": "object",
|
|
39
|
-
"propertyNames": {
|
|
40
|
-
"type": "string"
|
|
41
|
-
},
|
|
42
|
-
"additionalProperties": {
|
|
43
|
-
"anyOf": [
|
|
44
|
-
{
|
|
45
|
-
"type": "string"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"type": "number"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"type": "boolean"
|
|
52
|
-
}
|
|
53
|
-
]
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
"compress": {
|
|
57
|
-
"default": true,
|
|
58
|
-
"type": "boolean"
|
|
59
|
-
},
|
|
60
|
-
"levels": {
|
|
61
|
-
"type": "object",
|
|
62
|
-
"properties": {
|
|
63
|
-
"debug": {
|
|
64
|
-
"default": true,
|
|
65
|
-
"type": "boolean"
|
|
66
|
-
},
|
|
67
|
-
"info": {
|
|
68
|
-
"default": true,
|
|
69
|
-
"type": "boolean"
|
|
70
|
-
},
|
|
71
|
-
"warn": {
|
|
72
|
-
"default": true,
|
|
73
|
-
"type": "boolean"
|
|
74
|
-
},
|
|
75
|
-
"error": {
|
|
76
|
-
"default": true,
|
|
77
|
-
"type": "boolean"
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
"required": [
|
|
81
|
-
"debug",
|
|
82
|
-
"info",
|
|
83
|
-
"warn",
|
|
84
|
-
"error"
|
|
85
|
-
],
|
|
86
|
-
"additionalProperties": false
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
"required": [
|
|
90
|
-
"host",
|
|
91
|
-
"port",
|
|
92
|
-
"protocol",
|
|
93
|
-
"facility",
|
|
94
|
-
"additionalFields",
|
|
95
|
-
"compress",
|
|
96
|
-
"levels"
|
|
97
|
-
],
|
|
98
|
-
"additionalProperties": false
|
|
99
|
-
},
|
|
100
5
|
"pluginType": "observable",
|
|
101
6
|
"capabilities": {
|
|
102
7
|
"logging": {
|
|
@@ -14,100 +14,5 @@
|
|
|
14
14
|
"./docs/plugin.md"
|
|
15
15
|
],
|
|
16
16
|
"dependencies": [],
|
|
17
|
-
"image": "./observable-graylog.png"
|
|
18
|
-
"configSchema": {
|
|
19
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
20
|
-
"type": "object",
|
|
21
|
-
"properties": {
|
|
22
|
-
"host": {
|
|
23
|
-
"default": "localhost",
|
|
24
|
-
"type": "string"
|
|
25
|
-
},
|
|
26
|
-
"port": {
|
|
27
|
-
"default": 12201,
|
|
28
|
-
"type": "integer",
|
|
29
|
-
"minimum": 1,
|
|
30
|
-
"maximum": 65535
|
|
31
|
-
},
|
|
32
|
-
"protocol": {
|
|
33
|
-
"default": "udp",
|
|
34
|
-
"type": "string",
|
|
35
|
-
"enum": [
|
|
36
|
-
"udp",
|
|
37
|
-
"tcp",
|
|
38
|
-
"http"
|
|
39
|
-
]
|
|
40
|
-
},
|
|
41
|
-
"httpEndpoint": {
|
|
42
|
-
"type": "string",
|
|
43
|
-
"format": "uri"
|
|
44
|
-
},
|
|
45
|
-
"facility": {
|
|
46
|
-
"default": "bsb",
|
|
47
|
-
"type": "string"
|
|
48
|
-
},
|
|
49
|
-
"additionalFields": {
|
|
50
|
-
"default": {},
|
|
51
|
-
"type": "object",
|
|
52
|
-
"propertyNames": {
|
|
53
|
-
"type": "string"
|
|
54
|
-
},
|
|
55
|
-
"additionalProperties": {
|
|
56
|
-
"anyOf": [
|
|
57
|
-
{
|
|
58
|
-
"type": "string"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"type": "number"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"type": "boolean"
|
|
65
|
-
}
|
|
66
|
-
]
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
"compress": {
|
|
70
|
-
"default": true,
|
|
71
|
-
"type": "boolean"
|
|
72
|
-
},
|
|
73
|
-
"levels": {
|
|
74
|
-
"type": "object",
|
|
75
|
-
"properties": {
|
|
76
|
-
"debug": {
|
|
77
|
-
"default": true,
|
|
78
|
-
"type": "boolean"
|
|
79
|
-
},
|
|
80
|
-
"info": {
|
|
81
|
-
"default": true,
|
|
82
|
-
"type": "boolean"
|
|
83
|
-
},
|
|
84
|
-
"warn": {
|
|
85
|
-
"default": true,
|
|
86
|
-
"type": "boolean"
|
|
87
|
-
},
|
|
88
|
-
"error": {
|
|
89
|
-
"default": true,
|
|
90
|
-
"type": "boolean"
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
"required": [
|
|
94
|
-
"debug",
|
|
95
|
-
"info",
|
|
96
|
-
"warn",
|
|
97
|
-
"error"
|
|
98
|
-
],
|
|
99
|
-
"additionalProperties": false
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
"required": [
|
|
103
|
-
"host",
|
|
104
|
-
"port",
|
|
105
|
-
"protocol",
|
|
106
|
-
"facility",
|
|
107
|
-
"additionalFields",
|
|
108
|
-
"compress",
|
|
109
|
-
"levels"
|
|
110
|
-
],
|
|
111
|
-
"additionalProperties": false
|
|
112
|
-
}
|
|
17
|
+
"image": "./observable-graylog.png"
|
|
113
18
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bsb/observable-graylog",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.1.1",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"license": "(AGPL-3.0-only OR Commercial)",
|
|
5
6
|
"author": {
|
|
6
7
|
"name": "BetterCorp (PTY) Ltd",
|
|
7
|
-
"email": "
|
|
8
|
+
"email": "ninja@bettercorp.dev",
|
|
8
9
|
"url": "https://bettercorp.dev/"
|
|
9
10
|
},
|
|
10
11
|
"description": "Graylog (GELF) observable plugin for BSB - send logs to Graylog servers",
|
|
@@ -40,11 +41,11 @@
|
|
|
40
41
|
"@bsb/base": "^9.0.0"
|
|
41
42
|
},
|
|
42
43
|
"dependencies": {
|
|
43
|
-
"
|
|
44
|
-
"
|
|
44
|
+
"@anyvali/js": "^0.2.0",
|
|
45
|
+
"gelf-pro": "^1.3.2"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
|
-
"@bsb/base": "
|
|
48
|
+
"@bsb/base": "^9.0.0",
|
|
48
49
|
"@types/node": "^25.0.0",
|
|
49
50
|
"mocha": "^11.0.0",
|
|
50
51
|
"typescript": "^5.9.0"
|
|
@@ -53,6 +54,5 @@
|
|
|
53
54
|
"node": ">=23.0.0",
|
|
54
55
|
"npm": ">=11.0.0"
|
|
55
56
|
},
|
|
56
|
-
"homepage": "https://io.bsbcode.dev/
|
|
57
|
+
"homepage": "https://io.bsbcode.dev/packages/nodejs/@bsb/observable-graylog"
|
|
57
58
|
}
|
|
58
|
-
|