obzervo-agent 1.0.0 → 1.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 +68 -0
- package/package.json +3 -2
package/README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# obzervo-agent
|
|
2
|
+
|
|
3
|
+
Lightweight CLI monitoring agent for [Obzervo](https://github.com/YadavAkhileshh/Obzervo) API Observability Platform. Monitors private, local, or VPC endpoints and pushes health metrics to your Obzervo dashboard using API keys.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g obzervo-agent
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
### Option 1: CLI flags
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
obzervo monitor \
|
|
17
|
+
--endpointId "YOUR_24_CHAR_ENDPOINT_ID" \
|
|
18
|
+
--targetUrl "http://localhost:3000/health" \
|
|
19
|
+
--key "obz_live_YOUR_API_KEY" \
|
|
20
|
+
--method GET \
|
|
21
|
+
--expectedStatus 200 \
|
|
22
|
+
--interval 10000
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Option 2: Config file
|
|
26
|
+
|
|
27
|
+
Create an `obzervo.json` in your project root:
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"endpointId": "YOUR_ENDPOINT_ID",
|
|
32
|
+
"targetUrl": "http://localhost:3000/health",
|
|
33
|
+
"apiKey": "obz_live_YOUR_API_KEY",
|
|
34
|
+
"serverUrl": "http://localhost:5000",
|
|
35
|
+
"interval": 10000
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Then run:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
obzervo monitor
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## How it works
|
|
46
|
+
|
|
47
|
+
1. The agent sends an HTTP request to your `targetUrl` at the configured interval.
|
|
48
|
+
2. It records the response status code, latency (ms), and payload size.
|
|
49
|
+
3. It pushes that data to your Obzervo server via `POST /api/v1/telemetry/push` using the `x-api-key` header.
|
|
50
|
+
4. Your Obzervo dashboard updates in real time over WebSockets.
|
|
51
|
+
|
|
52
|
+
## CLI Options
|
|
53
|
+
|
|
54
|
+
| Flag | Default | Description |
|
|
55
|
+
|---|---|---|
|
|
56
|
+
| `--endpointId` | (required) | The Obzervo endpoint ID to report against |
|
|
57
|
+
| `--targetUrl` | (required) | The URL to monitor |
|
|
58
|
+
| `--key` | (required) | Your Obzervo API key (`obz_live_...`) |
|
|
59
|
+
| `--method` | `GET` | HTTP method for the health check |
|
|
60
|
+
| `--expectedStatus` | `200` | Expected healthy status code |
|
|
61
|
+
| `--interval` | `10000` | Polling interval in milliseconds |
|
|
62
|
+
| `--serverUrl` | `http://localhost:5000` | Obzervo server base URL |
|
|
63
|
+
|
|
64
|
+
## Security
|
|
65
|
+
|
|
66
|
+
- API keys are sent via the `x-api-key` HTTP header, never in query strings or URLs.
|
|
67
|
+
- The Obzervo server validates keys by comparing SHA-256 hashes and verifies endpoint ownership before accepting data.
|
|
68
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "obzervo-agent",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Obzervo Local & VPC Microservice Monitoring CLI Agent",
|
|
5
5
|
"bin": {
|
|
6
6
|
"obzervo": "./bin/index.js",
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
},
|
|
9
9
|
"main": "./bin/index.js",
|
|
10
10
|
"files": [
|
|
11
|
-
"bin/"
|
|
11
|
+
"bin/",
|
|
12
|
+
"README.md"
|
|
12
13
|
],
|
|
13
14
|
"preferGlobal": true,
|
|
14
15
|
"scripts": {
|