Overview

This is the QKView API documentation.

API

API (1.0.0)

Download OpenAPI specification:

API to handle qkview operations

Errors

The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format:

{
  "code": 404
  "message": "page not found"
}

Qkview

Create a new qkview

Request Body schema: application/json
optional
namespace
string

The namespace from which the qkview should be collected.

If not specified, it will include all namespaces

filename
string^[a-zA-Z0-9_-]+$
Default: "The auto-generated qkview unique identifier"

Assign the specified name to the qkview tarball.

Only alphanumeric characters, underscores, and hyphens are allowed.

If not provided, a unique auto-generated ID will be used.

prefer_ipv6
boolean
Default: false

Prefer IPv6 for communication with pods when dual-stack is enabled Otherwise, use IPv4.

pod_patterns
Array of strings (pattern)
Default: ["*"]

Pattern reports whether name or file name matches the shell pattern.

The pattern syntax is:

pattern:

{ term }

term:

'*'         matches any sequence of non-/ characters
'?'         matches any single non-/ character
'[' [ '^' ] { character-range } ']'
            character class (must be non-empty)
c           matches character c (c != '*', '?', '\\', '[')
'\\' c      matches character c

character-range:

c           matches character c (c != '\\', '-', ']')
'\\' c      matches character c
lo '-' hi   matches character c for lo <= c <= hi

Requires pattern to match all of name, not just a substring.

examples:

- f5-tmm*
- * 
- *tmm*
- [a-zA-Z]*_[0-9]*
- file[1-3].log
- /var/logs/*/*.log
Array of objects

Log Queries use LogQL; (Log Query Language) to filter, parse, and analyze logs stored in f5-fluentd, which are included in the qkview tarball.

Queries must not begin with a stream selector, as qkview automatically appends its own selector. Failing to follow this rule will result in an error, causing the qkview task to fail.

Each query is mapped to a file pattern, allowing different queries to be applied to different files.

  [
      {
          "file_pattern": "*f5ingress*/f5ingress*",
          "query": "|~ info"
      },
      {
          "file_pattern": "f5-tmm*/*",
          "query": "|~ error"
      }
  ]

The file pattern must correspond to either the absolute path or the relative path within the f5-fluentd pod.

Queries will not alter the resulting line format; log lines will be written to qkview exactly as they were originally recorded by their respective processes.

For example, the following query modifies the log line format.

| line_format "{{ .ts }} - {{ .lvl }}: {{ .msg }

However, since the query returns true for all log lines, qkview will write the log lines in their original, unaltered format.

Instead, use line_format to parse logs and achieve advanced filtering, such as extracting logs within a specific time range.

| line_format tsu='{{ 
    .ts | toDate "2006-01-02 ..." | unixEpochMillis 
  }}'
| tsu >= 1738162427598 and tsu <= 1738162427631

You can use logfmt with F5 log format log lines to parse attributes and apply attribute-based filtering.

# "ts"="2025-01-01..."|"m"="log example"|"key"="value"
| logfmt | key="value"

By default, QKView includes all logs from Fluentd.

Note: If a customized pod_pattern is used and does not include fluentd pod, no log files will be collected.

WARNING: If fluentd is running without log persistence,
         the logs will not be included in the QKView, 
         and this may cause the overall task to result
         in a warning status.
object or null
Default: null

Core file settings to include in the qkview:

By default, qkview excludes core files. This setting applies to each individual coremon, which refers to each node.

For example, if there are 3 coremons and the maximum number of files is set to 2, the total would be 3 * 2.

To limit the core files for a specific node, include the full coremon pod name in the pod_patterns so that qkview will exclude all other coremons, if present.

Note: If a customized pod_pattern is used and does not include coremond, while the core_file setting is enabled, no core files will be collected.

WARNING: If the core files are too large and the qkview
         tarball exceeds 4GB, it cannot be uploaded to
         iHealth.

         It is recommended to create a dedicated qkview
         for specific core files.
Array of objects

Kubernetes resources to collect and include in the qkview:

The qkview will query the Kubernetes API using the provided Group, Version, and Resource to list all available objects. It will then filter the objects to include by performing a match on the first match found; the object will be marshaled to YAML format and written to the tarball. Objects that do not match are discarded.

If the given Group Version Resource (GVR) is namespace-scoped, qkview will use the namespace specified in the request body.

By default, qkview collects the following:

  • v1/pods: *f5*
  • metrics.k8s.io/v1beta1/pods: *f5*
  • apiextensions.k8s.io/v1/customresourcedefinitions: *f5*
  • v1/events: *f5*

By default, QKView does not collect Custom Resources (CRs). See section below on how to include them.

The defaults are always running and cannot be excluded, but their patterns can be overridden.

For example, to change the pod pattern from *f5*

  {
      "group_version_resource": {
          "group": "",
          "version": "v1",
          "resource": "pods"
      },
      "name_patterns": [
          "*cert*"
          "*f5*",
      ]
  }

Adding Custom Resources:

  • Out of performance considerations, Custom Resources (CRs) are not collected by default as they are not part of the built-in resource definitions.
  • To include a custom resource, its Group Version Resource (GVR) has to be specified in the request body under kube_resources.

Obtaining a GVR for a Custom Resource (CR): • The Kubernetes API follows a standardized structure known as Group Version Resource (GVR). If you are unsure of the specific GVR for your custom resource, you can run: kubectl api-resources This command will list all available resources with columns for:

  • NAME: the resource (R) in GVR
  • APIGROUP: the group (G) in GVR
  • VERSION: the api group version (V) in GVR

For example: Suppose the output of kubectl api-resources shows:

NAME SHORTNAMES   APIGROUP      NAMESPACED   KIND
bnkgatewayclasses k8s.f5.com/v1 true         BNKGatewayClass

From this, we can derive the GVR for kube_resources:

{
  "kube_resources": [
    {
      "group_version_resource": {
        "group": "k8s.f5.com",
        "version": "v1",
        "resource": "bnkgatewayclasses"
      },
      "name_patterns": [
        "*"
      ]
    }
  ]
}

Responses

Request samples

Content type
application/json
{
  • "namespace": "default",
  • "filename": "vlan-issue",
  • "prefer_ipv6": true,
  • "pod_patterns": [
    ],
  • "log_queries": [
    ],
  • "core_files": {
    },
  • "kube_resources": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "123e4567-e89b-12d3-a456-426614174000"
}

Retrieve a list of created qkviews

query Parameters
filename
string

Filter qkviews by filename

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve a specific qkview by its unique identifier

path Parameters
id
required
string

The unique identifier of the qkview

Responses

Response samples

Content type
application/json
{
  • "namespace": "default",
  • "filename": "vlan-issue",
  • "prefer_ipv6": true,
  • "pod_patterns": [
    ],
  • "log_queries": [
    ],
  • "core_files": {
    },
  • "kube_resources": [
    ]
}

Delete a specific qkview by its unique identifier

path Parameters
id
required
string

The unique identifier of the qkview

Responses

Response samples

Content type
application/json
{
  • "message": "Something went wrong.",
  • "code": 500
}

Download the qkview tarball

path Parameters
id
required
string

The unique identifier of the qkview

Responses

Response samples

Content type
application/json
{
  • "message": "Something went wrong.",
  • "code": 500
}

Retrieve the status of a specific qkview by its unique identifier

path Parameters
id
required
string

The unique identifier of the qkview

Responses

Response samples

Content type
application/json
{
  • "status": "Failed",
  • "nested": {
    }
}