@bsb/observable-graylog 9.0.0 → 9.0.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/package.json +7 -4
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/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bsb/observable-graylog",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.1",
|
|
4
4
|
"license": "(AGPL-3.0-only OR Commercial)",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "BetterCorp (PTY) Ltd",
|
|
7
|
-
"email": "
|
|
7
|
+
"email": "ninja@bettercorp.dev",
|
|
8
8
|
"url": "https://bettercorp.dev/"
|
|
9
9
|
},
|
|
10
10
|
"description": "Graylog (GELF) observable plugin for BSB - send logs to Graylog servers",
|
|
@@ -53,6 +53,9 @@
|
|
|
53
53
|
"node": ">=23.0.0",
|
|
54
54
|
"npm": ">=11.0.0"
|
|
55
55
|
},
|
|
56
|
-
"homepage": "https://io.bsbcode.dev/
|
|
56
|
+
"homepage": "https://io.bsbcode.dev/packages/nodejs/@bsb/observable-graylog"
|
|
57
57
|
}
|
|
58
|
-
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|