Note that the string type related to time (i.e. timeout, idleConnTimeout, expirationTime) is decimal numbers, each with optional fraction and a unit suffix, such as “300ms”, “1.5h” or “2h45m”. Valid time units are “ns”, “us”, “ms”, “s”, “m”, “h”.
HTTP Gateway exposes the client’s REST API to manage user’s devices, as well as the Web UI known as plgd Dashboard.
docker pull ghcr.io/plgd-dev/hub/http-gateway:latest
A configuration template is available on http-gateway/config.yaml.
Property | Type | Description | Default |
---|---|---|---|
log.level | string | Logging enabled from level. | "info" |
log.encoding | string | Logging format. The supported values are: "json", "console" | "json" |
log.stacktrace.enabled | bool | Log stacktrace. | false |
log.stacktrace.level | string | Stacktrace from level. | "warn" |
log.encoderConfig.timeEncoder | string | Time format for logs. The supported values are: "rfc3339nano", "rfc3339". | "rfc3339nano" |
APIs of the HTTP Gateway service as defined uri and swagger for REST API.
Property | Type | Description | Default |
---|---|---|---|
apis.http.address | string | Listen specification <host>:<port> for http client connection. | "0.0.0.0:9100" |
apis.http.readTimeout | string | The maximum duration for reading the entire request, including the body by the server. A zero or negative value means there will be no timeout. | 8s |
apis.http.readHeaderTimeout | string | The amount of time allowed to read request headers by the server. If readHeaderTimeout is zero, the value of readTimeout is used. If both are zero, there is no timeout. | 4s |
apis.http.writeTimeout | string | The maximum duration before the server times out writing of the response. A zero or negative value means there will be no timeout. | 16s |
apis.http.idleTimeout | string | The maximum amount of time the server waits for the next request when keep-alives are enabled. If idleTimeout is zero, the value of readTimeout is used. If both are zero, there is no timeout. | 30s |
apis.http.tls.caPool | []string | File paths to the root certificates in PEM format. The file may contain multiple certificates. | [] |
apis.http.tls.keyFile | string | File path to private key in PEM format. | "" |
apis.http.tls.certFile | string | File path to certificate in PEM format. | "" |
apis.http.tls.clientCertificateRequired | bool | If true, require client certificate. | true |
apis.http.websocket.streamBodyLimit | int | Limit a size for the buffer used while reading the grpc stream. | 262144 |
apis.http.websocket.pingFrequency | string | Ping frequency specifies the ping interval between pings. | 10s |
apis.http.authorization.authority | string | Authority is the address of the token-issuing authentication server. Services will use this URI to find and retrieve the public key that can be used to validate the token’s signature. | "" |
apis.http.authorization.audience | string | Identifier of the API configured in your OAuth provider. | "" |
apis.http.authorization.http.maxIdleConns | int | It controls the maximum number of idle (keep-alive) connections across all hosts. Zero means no limit. | 16 |
apis.http.authorization.http.maxConnsPerHost | int | It optionally limits the total number of connections per host, including connections in the dialing, active, and idle states. On limit violation, dials will block. Zero means no limit. | 32 |
apis.http.authorization.http.maxIdleConnsPerHost | int | If non-zero, controls the maximum idle (keep-alive) connections to keep per-host. If zero, DefaultMaxIdleConnsPerHost is used. | 16 |
apis.http.authorization.http.idleConnTimeout | string | The maximum amount of time an idle (keep-alive) connection will remain idle before closing itself. Zero means no limit. | 30s |
apis.http.authorization.http.timeout | string | A time limit for requests made by this Client. A Timeout of zero means no timeout. | 10s |
apis.http.authorization.http.tls.caPool | []string | File paths to the root certificates in PEM format. The file may contain multiple certificates. | [] |
apis.http.authorization.http.tls.keyFile | string | File path to private key in PEM format. | "" |
apis.http.authorization.http.tls.certFile | string | File path to certificate in PEM format. | "" |
apis.http.authorization.http.tls.useSystemCAPool | bool | If true, use system certification pool. | false |
apis.http.authorization.tokenTrustVerification.cacheExpiration | string | Duration for which a valid token is kept in a runtime cache before re-verification is required. | 30s |
Client configurations to internally connect to GRPC Gateway service.
Property | Type | Description | Default |
---|---|---|---|
clients.grpcGateway.grpc.address | string | GRPC Gateway service address. | "127.0.0.1:9100" |
clients.grpcGateway.grpc.tls.caPool | []string | File paths to the root certificates in PEM format. The file may contain multiple certificates. | [] |
clients.grpcGateway.grpc.tls.keyFile | string | File path to private key in PEM format. | "" |
clients.grpcGateway.grpc.tls.certFile | string | File path to certificate in PEM format. | "" |
clients.grpcGateway.grpc.tls.useSystemCAPool | bool | If true, use system certification pool. | false |
clients.grpcGateway.grpc.keepAlive.time | string | After a duration of this time if the client doesn't see any activity it pings the server to see if the transport is still alive. | 10s |
clients.grpcGateway.grpc.keepAlive.timeout | string | After having pinged for keepalive check, the client waits for a duration of Timeout and if no activity is seen even after that the connection is closed. | 20s |
clients.grpcGateway.grpc.keepAlive.permitWithoutStream | bool | If true, client sends keepalive pings even with no active RPCs. If false, when there are no active RPCs, Time and Timeout will be ignored and no keepalive pings will be sent. | false |
These configurations are for plgd Dashboard
as described in here.
Property | Type | Description | Default |
---|---|---|---|
ui.enabled | string | Set to true if you would like to run the web UI. | false |
ui.directory | string | Path to default web ui built by nodejs | "/usr/local/var/www" |
ui.webConfiguration.authority | string | Authority is the address of the token-issuing authentication server. | "" |
ui.webConfiguration.httpGatewayAddress | string | External address of Http gateway service. | "" |
ui.webConfiguration.webOAuthClient.clientID | string | Client ID to exchange an authorization code for an access token. | "" |
ui.webConfiguration.webOAuthClient.audience | string | Identifier of the API configured in your OAuth provider. | "" |
ui.webConfiguration.webOAuthClient.scopes | string array | List of required scopes. | "" |
ui.webConfiguration.deviceOAuthClient.clientID | string | Client ID to get an authorization code for the device. | "" |
ui.webConfiguration.deviceOAuthClient.audience | string | Identifier of the API configured in your OAuth provider. | "" |
ui.webConfiguration.deviceOAuthClient.scopes | string array | List of required scopes. | "" |
ui.webConfiguration.deviceOAuthClient.providerName | string | Name of provider, which needs to be set to cloud resource during cloud provisioning. | "plgd" |
ui.webConfiguration.visibility.mainSidebar.certificates | bool | Show certificates in the main sidebar. | true |
ui.webConfiguration.visibility.mainSidebar.chatRoom | bool | Show chat room in the main sidebar. | true |
ui.webConfiguration.visibility.mainSidebar.configuration | bool | Show configuration in the main sidebar. | true |
ui.webConfiguration.visibility.mainSidebar.deviceProvisioning | bool | Show device provisioning in the main sidebar. | true |
ui.webConfiguration.visibility.mainSidebar.devices | bool | Show devices in the main sidebar. | true |
ui.webConfiguration.visibility.mainSidebar.docs | bool | Show docs in the main sidebar. | true |
ui.webConfiguration.visibility.mainSidebar.pendingCommands | bool | Show pending commands in the main sidebar. | true |
ui.webConfiguration.visibility.mainSidebar.remoteClients | bool | Show remote clients in the main sidebar. | true |
ui.webConfiguration.visibility.mainSidebar.snippetService | bool | Show snippet service in the main sidebar. | true |
ui.webConfiguration.visibility.mainSidebar.dashboard | bool | Show dashboard in the main sidebar. | false |
ui.webConfiguration.visibility.mainSidebar.integrations | bool | Show integrations in the main sidebar. | false |
ui.webConfiguration.visibility.mainSidebar.deviceFirmwareUpdate | bool | Show device firmware update in the main sidebar. | false |
ui.webConfiguration.visibility.mainSidebar.deviceLogs | bool | Show device logs in the main sidebar. | false |
ui.webConfiguration.visibility.mainSidebar.apiTokens | bool | Show api tokens in the main sidebar. | false |
ui.webConfiguration.visibility.mainSidebar.schemaHub | bool | Show schema hub in the main sidebar. | false |
The plgd open telemetry exporter configuration.
Property | Type | Description | Default |
---|---|---|---|
clients.openTelemetryCollector.grpc.enabled | bool | Enable OTLP gRPC exporter | false |
clients.openTelemetryCollector.grpc.address | string | The gRPC collector to which the exporter is going to send data | "" |
clients.openTelemetryCollector.grpc.keepAlive.time | string | After a duration of this time if the client doesn't see any activity it pings the server to see if the transport is still alive. | 10s |
clients.openTelemetryCollector.grpc.keepAlive.timeout | string | After having pinged for keepalive check, the client waits for a duration of Timeout and if no activity is seen even after that the connection is closed. | 20s |
clients.openTelemetryCollector.grpc.keepAlive.permitWithoutStream | bool | If true, client sends keepalive pings even with no active RPCs. If false, when there are no active RPCs, Time and Timeout will be ignored and no keepalive pings will be sent. | true |
clients.openTelemetryCollector.grpc.tls.caPool | string | File path to the root certificate in PEM format which might contain multiple certificates in a single file. | "" |
clients.openTelemetryCollector.grpc.tls.keyFile | string | File path to private key in PEM format. | "" |
clients.openTelemetryCollector.grpc.tls.certFile | string | File path to certificate in PEM format. | "" |
clients.openTelemetryCollector.grpc.tls.useSystemCAPool | bool | If true, use system certification pool. | false |
Note that the string type related to time (i.e. timeout, idleConnTimeout, expirationTime) is decimal numbers, each with optional fraction and a unit suffix, such as “300ms”, “1.5h” or “2h45m”. Valid time units are “ns”, “us”, “ms”, “s”, “m”, “h”.
plgd makes it simpler to build a successful IoT initiative – to create a proof of concept, evaluate, optimize, and scale.