51 lines
1.3 KiB
Markdown
51 lines
1.3 KiB
Markdown
# HSP Configuration File Specification
|
|
|
|
## Purpose
|
|
This configuation file contains all devices that shall be polled by HSP for diagnostic data. It also containts additional data specifying the connection used.
|
|
|
|
## Format
|
|
The Configuration file shall be stored as JSON file.
|
|
|
|
## File Location
|
|
- Path: `./hsp-config.json` (application directory)
|
|
|
|
## JSON Schema
|
|
```json
|
|
{
|
|
"grpc": {
|
|
"server_address": "localhost",
|
|
"server_port": 50051,
|
|
"timeout_seconds": 30
|
|
},
|
|
"http": {
|
|
"endpoints": [
|
|
"http://device1.local:8080/diagnostics",
|
|
"http://device2.local:8080/diagnostics"
|
|
],
|
|
"polling_interval_seconds": 1,
|
|
"request_timeout_seconds": 30,
|
|
"max_retries": 3,
|
|
"retry_interval_seconds": 5
|
|
},
|
|
"buffer": {
|
|
"max_messages": 300000
|
|
},
|
|
"backoff": {
|
|
"http_start_seconds": 5,
|
|
"http_max_seconds": 300,
|
|
"http_increment_seconds": 5,
|
|
"grpc_interval_seconds": 5
|
|
}
|
|
}
|
|
```
|
|
|
|
(minimum and default 1 second, maximum 3600 seconds).
|
|
|
|
## Field value limits
|
|
|
|
| Field | Type | Required | Constraints |
|
|
|---|---|---|---|
|
|
| grpc.server_address | string | Yes | Valid hostname or IP |
|
|
| grpc.server_port | integer | Yes | 1-65535 |
|
|
| http.endpoints | array | Yes | Min 1, Max 1000 URLs |
|
|
| http.polling_interval_seconds | integer | Yes | 1-3600 | |