Diagnostic Service
Service to access to Diagnostic Tools in TSB
ProxyDiagnosticService
The Proxy Diagnostic Service exposes methods to access diagnostic tools in workload proxies handled by TSB, such as handling log level, gathering configurations or stats. When performing a diagnostic operation on a workload, the caller must specify:
- The resource the workload belongs to, identified by its FQN provided via the
fqn
field in the request messages. On this resource, the caller must have the requiredProxyDiagnostic
permissions. - The cluster the workload belongs to, identified by the
cluster
field in the request messages. - The workload details to run the task against.
These methods are authorized by the ReadProxyDiagnostic
and WriteProxyDiagnostic
permissions which the
caller must have on the resource the workload belongs to. These permissions can be granted via the TSB RBAC system.
For example, the following proxytools-user
role allows to perform read and write operations related to
the diagnostic tools. Via the access binding, in the context of the demo
tenant, the proxytools-user
role is granted to the demo-team
team. As a result, any user in the team will be able to operate
the diagnostic tools on the resources belonging to that tenant.
apiVersion: rbac.tsb.tetrate.io/v2
kind: Role
metadata:
name: proxytools-user
spec:
rules:
- types:
- apiGroup: diagnostic.tsb.tetrate.io/v2
kinds:
- ProxyDiagnostic
permissions:
- READ
- WRITE
---
apiVersion: rbac.tsb.tetrate.io/v2
kind: AccessBindings
metadata:
fqn: organizations/demo/tenants/demo
spec:
allow:
- role: rbac/proxytools-user
subjects:
- user: organizations/tetrate/teams/demo-team
GetLoggerLevels
SetLoggerLevels
GetConfigDump
GetServerStats
GetClusterStats
ListWorkloads
StreamLogs
GetClusterStatsRequest
Request for the cluster stats of an Istio Proxy.
Field | Description | Validation Rule |
---|---|---|
fqn | string | string = { |
cluster | string | string = { |
workload | tetrateio.api.tsb.diagnostic.v2.Workload | message = { |
outputFormat | tetrateio.api.tsb.diagnostic.v2.GetClusterStatsRequest.ClusterStatsFormat | enum = { |
GetClusterStatsResponse
Response to the request for the cluster stats of an Istio Proxy.
Returns the output of the /clusters
endpoint of the Envoy Admin interface.
See https://www.envoyproxy.io/docs/envoy/latest/operations/admin#get--clusters
Field | Description | Validation Rule |
---|---|---|
output | string | – |
outputFormat | tetrateio.api.tsb.diagnostic.v2.GetClusterStatsRequest.ClusterStatsFormat | – |
GetConfigDumpRequest
Request for a config dump from a workload (Istio Proxy).
Field | Description | Validation Rule |
---|---|---|
fqn | string | string = { |
cluster | string | string = { |
workload | tetrateio.api.tsb.diagnostic.v2.Workload | message = { |
all | tetrateio.api.tsb.diagnostic.v2.GetConfigDumpRequest.All oneof _selector | – |
bootstrap | tetrateio.api.tsb.diagnostic.v2.GetConfigDumpRequest.Bootstrap oneof _selector | – |
clusters | tetrateio.api.tsb.diagnostic.v2.GetConfigDumpRequest.Clusters oneof _selector | – |
ecds | tetrateio.api.tsb.diagnostic.v2.GetConfigDumpRequest.Ecds oneof _selector | – |
endpoints | tetrateio.api.tsb.diagnostic.v2.GetConfigDumpRequest.Endpoints oneof _selector | – |
listeners | tetrateio.api.tsb.diagnostic.v2.GetConfigDumpRequest.Listeners oneof _selector | – |
routes | tetrateio.api.tsb.diagnostic.v2.GetConfigDumpRequest.Routes oneof _selector | – |
secrets | tetrateio.api.tsb.diagnostic.v2.GetConfigDumpRequest.Secrets oneof _selector | – |
All
Dump all configuration.
Field | Description | Validation Rule |
---|---|---|
includeEds | bool | – |
Bootstrap
Dump bootstrap configuration.
Clusters
Dump cluster configuration.
Ecds
Dump typed extension configuration.
Endpoints
Dump endpoint configuration.
Listeners
Dump listener configuration.
Routes
Dump route configuration.
Secrets
Dump secret configuration.
GetConfigDumpResponse
Response to the request for a config dump from an Istio Proxy.
Returns the output of the /config_dump
endpoint of the Envoy Admin interface.
See https://www.envoyproxy.io/docs/envoy/latest/operations/admin#get--config_dump
Field | Description | Validation Rule |
---|---|---|
output | string | – |
GetLoggerLevelsRequest
Request for effective logger levels of an Istio Proxy.
Field | Description | Validation Rule |
---|---|---|
fqn | string | string = { |
cluster | string | string = { |
workload | tetrateio.api.tsb.diagnostic.v2.Workload | message = { |
GetServerStatsRequest
Request for the server stats of an Istio Proxy.
Field | Description | Validation Rule |
---|---|---|
fqn | string | string = { |
cluster | string | string = { |
workload | tetrateio.api.tsb.diagnostic.v2.Workload | message = { |
outputFormat | tetrateio.api.tsb.diagnostic.v2.GetServerStatsRequest.ServerStatsFormat | enum = { |
GetServerStatsResponse
Response to the request for the server stats of an Istio Proxy.
Returns the output of the /stats
endpoint of the Envoy Admin interface.
See https://www.envoyproxy.io/docs/envoy/latest/operations/admin#get--stats
Field | Description | Validation Rule |
---|---|---|
output | string | – |
outputFormat | tetrateio.api.tsb.diagnostic.v2.GetServerStatsRequest.ServerStatsFormat | – |
ListWorkloadsRequest
Request to retrieve the workload names on which the diagnostic tools can be run.
The returned workloads are belonging to the resource specified by the fqn
field
and are running in the cluster specified by the cluster
field.
Field | Description | Validation Rule |
---|---|---|
fqn | string | string = { |
cluster | string | string = { |
pageSize | int32 | – |
pageToken | string When paginating, all other parameters provided to | – |
filter | tetrateio.api.tsb.diagnostic.v2.ListWorkloadsRequest.Filter | – |
Filter
Workloads filter.
Field | Description | Validation Rule |
---|---|---|
namespace | string | – |
serviceName | string | – |
ListWorkloadsResponse
Response to the request for a list of Workloads.
Field | Description | Validation Rule |
---|---|---|
workloads | List of tetrateio.api.tsb.diagnostic.v2.Workload | – |
nextPageToken | string | – |
totalSize | int32 | – |
LoggerLevelsResponse
Response to the request for effective logger levels of an Istio Proxy.
Returns the output of the /logging
endpoint of the Envoy Admin interface.
Field | Description | Validation Rule |
---|---|---|
supportedLevels | List of string | – |
loggerLevels | – |
SetLoggerLevelsRequest
Request to change effective logger levels of an Istio Proxy.
Field | Description | Validation Rule |
---|---|---|
fqn | string | string = { |
cluster | string | string = { |
workload | tetrateio.api.tsb.diagnostic.v2.Workload | message = { |
allLoggers | tetrateio.api.tsb.diagnostic.v2.SetLoggerLevelsRequest.AllLoggers oneof _loggers | – |
givenLoggers | tetrateio.api.tsb.diagnostic.v2.SetLoggerLevelsRequest.GivenLoggers oneof _loggers | – |
AllLoggers
Desired level for all loggers.
Field | Description | Validation Rule |
---|---|---|
level | string | string = { |
GivenLoggers
Desired levels for given loggers. Available log levels are: trace, debug, info, warning/warn, error, critical, off. Examples: {"config": "trace", "grpc": "debug", "http": "debug", "http2": "debug"} See https://www.envoyproxy.io/docs/envoy/latest/operations/admin#post--logging for more details about loggers' naming.
Field | Description | Validation Rule |
---|---|---|
loggerLevels | map<string, string> | map = { |
StreamLogsRequest
Request to stream logs of an Istio Proxy.
Field | Description | Validation Rule |
---|---|---|
fqn | string | string = { |
cluster | string | string = { |
workload | tetrateio.api.tsb.diagnostic.v2.Workload | message = { |
follow | bool | – |
previous | bool | – |
sinceSeconds | google.protobuf.Int64Value | – |
StreamLogsResponse
Response to the request to stream logs of an Istio Proxy.
Field | Description | Validation Rule |
---|---|---|
output | string | – |
Workload
Name and namespace of a workload.
Field | Description | Validation Rule |
---|---|---|
namespace | string | string = { |
name | string | string = { |
ClusterStatsFormat
Format of the cluster stats of an Istio Proxy.
Field | Number | Description |
---|---|---|
JSON | 0 | JSON format. |
TEXT | 1 | Text format. |
ServerStatsFormat
Format of the server stats of an Istio Proxy.
Field | Number | Description |
---|---|---|
JSON | 0 | JSON format. |
TEXT | 1 | Text format. |
PROMETHEUS | 2 | Prometheus format. |