diff --git a/cmd/document-generator/main.go b/cmd/document-generator/main.go index c51774f..f422253 100644 --- a/cmd/document-generator/main.go +++ b/cmd/document-generator/main.go @@ -52,6 +52,11 @@ func main() { err = generator.GenerateDocument("./docs/en/features.md", "feature-template", featureDocumentModel, false) fatal(err, "failed to generate feature document") + formDocumentModel, err := model.GetFormDocumentModel(inspectionServer) + fatal(err, "failed to generate form document model") + err = generator.GenerateDocument("./docs/en/forms.md", "form-template", formDocumentModel, false) + fatal(err, "failed to generate form document") + relationshipDocumentModel := model.GetRelationshipDocumentModel() err = generator.GenerateDocument("./docs/en/relationships.md", "relationship-template", relationshipDocumentModel, false) fatal(err, "failed to generate relationship document") diff --git a/docs/en/features.md b/docs/en/features.md index 5ac41e5..29d56bc 100644 --- a/docs/en/features.md +++ b/docs/en/features.md @@ -15,12 +15,12 @@ This parser reveals how these resources are created,updated or deleted. |Parameter name|Description| |:-:|---| -|Kind|The kinds of resources to gather logs. `@default` is a alias of set of kinds that frequently queried. Specify `@any` to query every kinds of resources| -|Namespaces|The namespace of resources to gather logs. Specify `@all_cluster_scoped` to gather logs for all non-namespaced resources. Specify `@all_namespaced` to gather logs for all namespaced resources.| -|Project ID|The project ID containing the logs of cluster to query| -|Cluster name|The cluster name to gather logs.| -|End time|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| -|Duration|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| +|[Kind](./forms.md#cloud.google.com/input/kinds)|The kinds of resources to gather logs. `@default` is a alias of set of kinds that frequently queried. Specify `@any` to query every kinds of resources| +|[Namespaces](./forms.md#cloud.google.com/input/namespaces)|The namespace of resources to gather logs. Specify `@all_cluster_scoped` to gather logs for all non-namespaced resources. Specify `@all_namespaced` to gather logs for all namespaced resources.| +|[Project ID](./forms.md#cloud.google.com/input/project-id)|The project ID containing the logs of cluster to query| +|[Cluster name](./forms.md#cloud.google.com/input/cluster-name)|The cluster name to gather logs.| +|[End time](./forms.md#cloud.google.com/input/end-time)|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| +|[Duration](./forms.md#cloud.google.com/input/duration)|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| ### Output timelines @@ -63,11 +63,11 @@ This parser shows events associated to K8s resources |Parameter name|Description| |:-:|---| -|Namespaces|The namespace of resources to gather logs. Specify `@all_cluster_scoped` to gather logs for all non-namespaced resources. Specify `@all_namespaced` to gather logs for all namespaced resources.| -|Project ID|The project ID containing the logs of cluster to query| -|Cluster name|The cluster name to gather logs.| -|End time|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| -|Duration|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| +|[Namespaces](./forms.md#cloud.google.com/input/namespaces)|The namespace of resources to gather logs. Specify `@all_cluster_scoped` to gather logs for all non-namespaced resources. Specify `@all_namespaced` to gather logs for all namespaced resources.| +|[Project ID](./forms.md#cloud.google.com/input/project-id)|The project ID containing the logs of cluster to query| +|[Cluster name](./forms.md#cloud.google.com/input/cluster-name)|The cluster name to gather logs.| +|[End time](./forms.md#cloud.google.com/input/end-time)|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| +|[Duration](./forms.md#cloud.google.com/input/duration)|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| ### Output timelines @@ -104,11 +104,11 @@ GKE worker node components logs mainly from kubelet,containerd and dockerd. |Parameter name|Description| |:-:|---| -|Node names|| -|Project ID|The project ID containing the logs of cluster to query| -|Cluster name|The cluster name to gather logs.| -|End time|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| -|Duration|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| +|[Node names](./forms.md#cloud.google.com/input/node-name-filter)|| +|[Project ID](./forms.md#cloud.google.com/input/project-id)|The project ID containing the logs of cluster to query| +|[Cluster name](./forms.md#cloud.google.com/input/cluster-name)|The cluster name to gather logs.| +|[End time](./forms.md#cloud.google.com/input/end-time)|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| +|[Duration](./forms.md#cloud.google.com/input/duration)|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| ### Output timelines @@ -149,12 +149,12 @@ Container logs ingested from stdout/stderr of workload Pods. |Parameter name|Description| |:-:|---| -|Namespaces(Container logs)|| -|Pod names(Container logs)|| -|Project ID|The project ID containing the logs of cluster to query| -|Cluster name|The cluster name to gather logs.| -|End time|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| -|Duration|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| +|[Namespaces(Container logs)](./forms.md#cloud.google.com/input/container-query-namespaces)|| +|[Pod names(Container logs)](./forms.md#cloud.google.com/input/container-query-podnames)|| +|[Project ID](./forms.md#cloud.google.com/input/project-id)|The project ID containing the logs of cluster to query| +|[Cluster name](./forms.md#cloud.google.com/input/cluster-name)|The cluster name to gather logs.| +|[End time](./forms.md#cloud.google.com/input/end-time)|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| +|[Duration](./forms.md#cloud.google.com/input/duration)|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| ### Output timelines @@ -190,10 +190,10 @@ GKE audit log including cluster creation,deletion and upgrades. |Parameter name|Description| |:-:|---| -|Project ID|The project ID containing the logs of cluster to query| -|Cluster name|The cluster name to gather logs.| -|End time|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| -|Duration|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| +|[Project ID](./forms.md#cloud.google.com/input/project-id)|The project ID containing the logs of cluster to query| +|[Cluster name](./forms.md#cloud.google.com/input/cluster-name)|The cluster name to gather logs.| +|[End time](./forms.md#cloud.google.com/input/end-time)|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| +|[Duration](./forms.md#cloud.google.com/input/duration)|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| ### Output timelines @@ -229,12 +229,12 @@ Compute API audit logs used for cluster related logs. This also visualize operat |Parameter name|Description| |:-:|---| -|Kind|The kinds of resources to gather logs. `@default` is a alias of set of kinds that frequently queried. Specify `@any` to query every kinds of resources| -|Namespaces|The namespace of resources to gather logs. Specify `@all_cluster_scoped` to gather logs for all non-namespaced resources. Specify `@all_namespaced` to gather logs for all namespaced resources.| -|Project ID|The project ID containing the logs of cluster to query| -|Cluster name|The cluster name to gather logs.| -|End time|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| -|Duration|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| +|[Kind](./forms.md#cloud.google.com/input/kinds)|The kinds of resources to gather logs. `@default` is a alias of set of kinds that frequently queried. Specify `@any` to query every kinds of resources| +|[Namespaces](./forms.md#cloud.google.com/input/namespaces)|The namespace of resources to gather logs. Specify `@all_cluster_scoped` to gather logs for all non-namespaced resources. Specify `@all_namespaced` to gather logs for all namespaced resources.| +|[Project ID](./forms.md#cloud.google.com/input/project-id)|The project ID containing the logs of cluster to query| +|[Cluster name](./forms.md#cloud.google.com/input/cluster-name)|The cluster name to gather logs.| +|[End time](./forms.md#cloud.google.com/input/end-time)|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| +|[Duration](./forms.md#cloud.google.com/input/duration)|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| ### Output timelines @@ -278,12 +278,12 @@ GCE network API audit log including NEG related audit logs to identify when the |Parameter name|Description| |:-:|---| -|Kind|The kinds of resources to gather logs. `@default` is a alias of set of kinds that frequently queried. Specify `@any` to query every kinds of resources| -|Namespaces|The namespace of resources to gather logs. Specify `@all_cluster_scoped` to gather logs for all non-namespaced resources. Specify `@all_namespaced` to gather logs for all namespaced resources.| -|Project ID|The project ID containing the logs of cluster to query| -|Cluster name|The cluster name to gather logs.| -|End time|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| -|Duration|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| +|[Kind](./forms.md#cloud.google.com/input/kinds)|The kinds of resources to gather logs. `@default` is a alias of set of kinds that frequently queried. Specify `@any` to query every kinds of resources| +|[Namespaces](./forms.md#cloud.google.com/input/namespaces)|The namespace of resources to gather logs. Specify `@all_cluster_scoped` to gather logs for all non-namespaced resources. Specify `@all_namespaced` to gather logs for all namespaced resources.| +|[Project ID](./forms.md#cloud.google.com/input/project-id)|The project ID containing the logs of cluster to query| +|[Cluster name](./forms.md#cloud.google.com/input/cluster-name)|The cluster name to gather logs.| +|[End time](./forms.md#cloud.google.com/input/end-time)|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| +|[Duration](./forms.md#cloud.google.com/input/duration)|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| ### Output timelines @@ -291,7 +291,7 @@ GCE network API audit log including NEG related audit logs to identify when the |Timeline type|Short name on chip| |:-:|:-:| |![000000](https://placehold.co/15x15/000000/000000.png)[Operation timeline](./relationships.md#RelationshipOperation)|operation| -|![A52A2A](https://placehold.co/15x15/A52A2A/A52A2A.png)[NEG timeline](./relationships.md#RelationshipNetworkEndpointGroup)|neg| +|![A52A2A](https://placehold.co/15x15/A52A2A/A52A2A.png)[Network Endpoint Group timeline](./relationships.md#RelationshipNetworkEndpointGroup)|neg| @@ -327,10 +327,10 @@ Anthos Multicloud audit log including cluster creation,deletion and upgrades. |Parameter name|Description| |:-:|---| -|Project ID|The project ID containing the logs of cluster to query| -|Cluster name|The cluster name to gather logs.| -|End time|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| -|Duration|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| +|[Project ID](./forms.md#cloud.google.com/input/project-id)|The project ID containing the logs of cluster to query| +|[Cluster name](./forms.md#cloud.google.com/input/cluster-name)|The cluster name to gather logs.| +|[End time](./forms.md#cloud.google.com/input/end-time)|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| +|[Duration](./forms.md#cloud.google.com/input/duration)|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| ### Output timelines @@ -368,10 +368,10 @@ This log type also includes Node Auto Provisioner logs. |Parameter name|Description| |:-:|---| -|Project ID|The project ID containing the logs of cluster to query| -|Cluster name|The cluster name to gather logs.| -|End time|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| -|Duration|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| +|[Project ID](./forms.md#cloud.google.com/input/project-id)|The project ID containing the logs of cluster to query| +|[Cluster name](./forms.md#cloud.google.com/input/cluster-name)|The cluster name to gather logs.| +|[End time](./forms.md#cloud.google.com/input/end-time)|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| +|[Duration](./forms.md#cloud.google.com/input/duration)|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| ### Output timelines @@ -409,10 +409,10 @@ Anthos OnPrem audit log including cluster creation,deletion,enroll,unenroll and |Parameter name|Description| |:-:|---| -|Project ID|The project ID containing the logs of cluster to query| -|Cluster name|The cluster name to gather logs.| -|End time|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| -|Duration|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| +|[Project ID](./forms.md#cloud.google.com/input/project-id)|The project ID containing the logs of cluster to query| +|[Cluster name](./forms.md#cloud.google.com/input/cluster-name)|The cluster name to gather logs.| +|[End time](./forms.md#cloud.google.com/input/end-time)|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| +|[Duration](./forms.md#cloud.google.com/input/duration)|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| ### Output timelines @@ -449,11 +449,11 @@ Visualize Kubernetes control plane component logs on a cluster |Parameter name|Description| |:-:|---| -|Control plane component names|| -|Project ID|The project ID containing the logs of cluster to query| -|Cluster name|The cluster name to gather logs.| -|End time|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| -|Duration|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| +|[Control plane component names](./forms.md#cloud.google.com/input/component-names)|| +|[Project ID](./forms.md#cloud.google.com/input/project-id)|The project ID containing the logs of cluster to query| +|[Cluster name](./forms.md#cloud.google.com/input/cluster-name)|The cluster name to gather logs.| +|[End time](./forms.md#cloud.google.com/input/end-time)|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| +|[Duration](./forms.md#cloud.google.com/input/duration)|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| ### Output timelines @@ -491,19 +491,20 @@ Serial port logs of worker nodes. Serial port logging feature must be enabled on |Parameter name|Description| |:-:|---| -|Kind|The kinds of resources to gather logs. `@default` is a alias of set of kinds that frequently queried. Specify `@any` to query every kinds of resources| -|Namespaces|The namespace of resources to gather logs. Specify `@all_cluster_scoped` to gather logs for all non-namespaced resources. Specify `@all_namespaced` to gather logs for all namespaced resources.| -|Node names|| -|Project ID|The project ID containing the logs of cluster to query| -|Cluster name|The cluster name to gather logs.| -|End time|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| -|Duration|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| +|[Kind](./forms.md#cloud.google.com/input/kinds)|The kinds of resources to gather logs. `@default` is a alias of set of kinds that frequently queried. Specify `@any` to query every kinds of resources| +|[Namespaces](./forms.md#cloud.google.com/input/namespaces)|The namespace of resources to gather logs. Specify `@all_cluster_scoped` to gather logs for all non-namespaced resources. Specify `@all_namespaced` to gather logs for all namespaced resources.| +|[Node names](./forms.md#cloud.google.com/input/node-name-filter)|| +|[Project ID](./forms.md#cloud.google.com/input/project-id)|The project ID containing the logs of cluster to query| +|[Cluster name](./forms.md#cloud.google.com/input/cluster-name)|The cluster name to gather logs.| +|[End time](./forms.md#cloud.google.com/input/end-time)|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| +|[Duration](./forms.md#cloud.google.com/input/duration)|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| ### Output timelines |Timeline type|Short name on chip| |:-:|:-:| +|![333333](https://placehold.co/15x15/333333/333333.png)[Serialport log timeline](./relationships.md#RelationshipSerialPort)|serialport| @@ -543,11 +544,11 @@ Airflow Scheduler logs contain information related to the scheduling of TaskInst |Parameter name|Description| |:-:|---| -|Location|| -|Project ID|The project ID containing the logs of cluster to query| -|Composer Environment Name|| -|End time|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| -|Duration|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| +|[Location](./forms.md#cloud.google.com/input/location)|| +|[Project ID](./forms.md#cloud.google.com/input/project-id)|The project ID containing the logs of cluster to query| +|[Composer Environment Name](./forms.md#cloud.google.com/input/composer/environment_name)|| +|[End time](./forms.md#cloud.google.com/input/end-time)|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| +|[Duration](./forms.md#cloud.google.com/input/duration)|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| ### Output timelines @@ -579,11 +580,11 @@ Airflow Worker logs contain information related to the execution of TaskInstance |Parameter name|Description| |:-:|---| -|Location|| -|Project ID|The project ID containing the logs of cluster to query| -|Composer Environment Name|| -|End time|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| -|Duration|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| +|[Location](./forms.md#cloud.google.com/input/location)|| +|[Project ID](./forms.md#cloud.google.com/input/project-id)|The project ID containing the logs of cluster to query| +|[Composer Environment Name](./forms.md#cloud.google.com/input/composer/environment_name)|| +|[End time](./forms.md#cloud.google.com/input/end-time)|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| +|[Duration](./forms.md#cloud.google.com/input/duration)|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| ### Output timelines @@ -615,11 +616,11 @@ The DagProcessorManager logs contain information for investigating the number of |Parameter name|Description| |:-:|---| -|Location|| -|Project ID|The project ID containing the logs of cluster to query| -|Composer Environment Name|| -|End time|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| -|Duration|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| +|[Location](./forms.md#cloud.google.com/input/location)|| +|[Project ID](./forms.md#cloud.google.com/input/project-id)|The project ID containing the logs of cluster to query| +|[Composer Environment Name](./forms.md#cloud.google.com/input/composer/environment_name)|| +|[End time](./forms.md#cloud.google.com/input/end-time)|The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter.| +|[Duration](./forms.md#cloud.google.com/input/duration)|The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`)| ### Output timelines diff --git a/docs/en/forms.md b/docs/en/forms.md new file mode 100644 index 0000000..c40238b --- /dev/null +++ b/docs/en/forms.md @@ -0,0 +1,60 @@ + +## Project ID + +The project ID containing the logs of cluster to query + + +## Cluster name + +The cluster name to gather logs. + + +## Duration + +The duration of time range to gather logs. Supported time units are `h`,`m` or `s`. (Example: `3h30m`) + + +## End time + +The endtime of the time range to gather logs. The start time of the time range will be this endtime subtracted with the duration parameter. + + +## Kind + +The kinds of resources to gather logs. `@default` is a alias of set of kinds that frequently queried. Specify `@any` to query every kinds of resources + + +## Location + + + + +## Namespaces + +The namespace of resources to gather logs. Specify `@all_cluster_scoped` to gather logs for all non-namespaced resources. Specify `@all_namespaced` to gather logs for all namespaced resources. + + +## Node names + + + + +## Namespaces(Container logs) + + + + +## Pod names(Container logs) + + + + +## Control plane component names + + + + +## Composer Environment Name + + + diff --git a/docs/en/images/reference/default-timeline.png b/docs/en/images/reference/default-timeline.png new file mode 100644 index 0000000..51cd335 Binary files /dev/null and b/docs/en/images/reference/default-timeline.png differ diff --git a/docs/en/inspection-type.md b/docs/en/inspection-type.md index d081081..91cd1c8 100644 --- a/docs/en/inspection-type.md +++ b/docs/en/inspection-type.md @@ -12,174 +12,98 @@ KHI filters out unsupported parser for the selected inspection type at first. ### Features - + + * [Kubernetes Audit Log](./features.md#k8s_audit) - - * [Kubernetes Event Logs](./features.md#k8s_event) - - * [Kubernetes Node Logs](./features.md#k8s_node) - - * [Kubernetes container logs](./features.md#k8s_container) - - * [GKE Audit logs](./features.md#gke_audit) - - * [Compute API Logs](./features.md#compute_api) - - * [GCE Network Logs](./features.md#gce_network) - - * [Autoscaler Logs](./features.md#autoscaler) - - * [Kubernetes Control plane component logs](./features.md#k8s_control_plane_component) - - * [Node serial port logs](./features.md#serialport) - + ## [Cloud Composer](#gcp-composer) ### Features - + + * [Kubernetes Audit Log](./features.md#k8s_audit) - - * [Kubernetes Event Logs](./features.md#k8s_event) - - * [Kubernetes Node Logs](./features.md#k8s_node) - - * [Kubernetes container logs](./features.md#k8s_container) - - * [GKE Audit logs](./features.md#gke_audit) - - * [Compute API Logs](./features.md#compute_api) - - * [GCE Network Logs](./features.md#gce_network) - - * [Autoscaler Logs](./features.md#autoscaler) - - * [Kubernetes Control plane component logs](./features.md#k8s_control_plane_component) - - * [Node serial port logs](./features.md#serialport) - - * [(Alpha) Composer / Airflow Scheduler](./features.md#airflow_schedule) - - * [(Alpha) Cloud Composer / Airflow Worker](./features.md#airflow_worker) - - * [(Alpha) Composer / Airflow DagProcessorManager](./features.md#airflow_dag_processor) - + ## [GKE on AWS(Anthos on AWS)](#gcp-gke-on-aws) ### Features - + + * [Kubernetes Audit Log](./features.md#k8s_audit) - - * [Kubernetes Event Logs](./features.md#k8s_event) - - * [Kubernetes Node Logs](./features.md#k8s_node) - - * [Kubernetes container logs](./features.md#k8s_container) - - * [MultiCloud API logs](./features.md#multicloud_api) - - * [Kubernetes Control plane component logs](./features.md#k8s_control_plane_component) - + ## [GKE on Azure(Anthos on Azure)](#gcp-gke-on-azure) ### Features - + + * [Kubernetes Audit Log](./features.md#k8s_audit) - - * [Kubernetes Event Logs](./features.md#k8s_event) - - * [Kubernetes Node Logs](./features.md#k8s_node) - - * [Kubernetes container logs](./features.md#k8s_container) - - * [MultiCloud API logs](./features.md#multicloud_api) - - * [Kubernetes Control plane component logs](./features.md#k8s_control_plane_component) - + ## [GDCV for Baremetal(GKE on Baremetal, Anthos on Baremetal)](#gcp-gdcv-for-baremetal) ### Features - + + * [Kubernetes Audit Log](./features.md#k8s_audit) - - * [Kubernetes Event Logs](./features.md#k8s_event) - - * [Kubernetes Node Logs](./features.md#k8s_node) - - * [Kubernetes container logs](./features.md#k8s_container) - - * [OnPrem API logs](./features.md#onprem_api) - - * [Kubernetes Control plane component logs](./features.md#k8s_control_plane_component) - + ## [GDCV for VMWare(GKE on VMWare, Anthos on VMWare)](#gcp-gdcv-for-vmware) ### Features - + + * [Kubernetes Audit Log](./features.md#k8s_audit) - - * [Kubernetes Event Logs](./features.md#k8s_event) - - * [Kubernetes Node Logs](./features.md#k8s_node) - - * [Kubernetes container logs](./features.md#k8s_container) - - * [OnPrem API logs](./features.md#onprem_api) - - * [Kubernetes Control plane component logs](./features.md#k8s_control_plane_component) - + diff --git a/docs/en/relationships.md b/docs/en/relationships.md index cff4cda..272e558 100644 --- a/docs/en/relationships.md +++ b/docs/en/relationships.md @@ -6,6 +6,9 @@ The relationship between its parent and children is usually interpretted as the ## [The default resource timeline](#RelationshipChild) + +![](./images/reference/default-timeline.png) + ### Revisions @@ -87,9 +90,9 @@ This timeline can have the following revisions. |State|Source log|Description| |---|---|---| -|![#004400](https://placehold.co/15x15/004400/004400.png)Endpoint is ready|![#000000](https://placehold.co/15x15/000000/000000.png)k8s_audit|| -|![#EE4400](https://placehold.co/15x15/EE4400/EE4400.png)Endpoint is not ready|![#000000](https://placehold.co/15x15/000000/000000.png)k8s_audit|| -|![#fed700](https://placehold.co/15x15/fed700/fed700.png)Endpoint is being terminated|![#000000](https://placehold.co/15x15/000000/000000.png)k8s_audit|| +|![#004400](https://placehold.co/15x15/004400/004400.png)Endpoint is ready|![#000000](https://placehold.co/15x15/000000/000000.png)k8s_audit|An endpoint associated with the parent resource is ready| +|![#EE4400](https://placehold.co/15x15/EE4400/EE4400.png)Endpoint is not ready|![#000000](https://placehold.co/15x15/000000/000000.png)k8s_audit|An endpoint associated with the parent resource is not ready. Traffic shouldn't be routed during this time.| +|![#fed700](https://placehold.co/15x15/fed700/fed700.png)Endpoint is being terminated|![#000000](https://placehold.co/15x15/000000/000000.png)k8s_audit|An endpoint associated with the parent resource is being terminated. New traffic shouldn't be routed to this endpoint during this time, but the endpoint can still have pending requests.| @@ -103,13 +106,18 @@ This timeline can have the following revisions. |State|Source log|Description| |---|---|---| -|![#997700](https://placehold.co/15x15/997700/997700.png)Waiting for starting container|![#fe9bab](https://placehold.co/15x15/fe9bab/fe9bab.png)k8s_container|| -|![#EE4400](https://placehold.co/15x15/EE4400/EE4400.png)Container is not ready|![#fe9bab](https://placehold.co/15x15/fe9bab/fe9bab.png)k8s_container|| -|![#007700](https://placehold.co/15x15/007700/007700.png)Container is ready|![#fe9bab](https://placehold.co/15x15/fe9bab/fe9bab.png)k8s_container|| -|![#113333](https://placehold.co/15x15/113333/113333.png)Container exited with healthy exit code|![#fe9bab](https://placehold.co/15x15/fe9bab/fe9bab.png)k8s_container|| -|![#331111](https://placehold.co/15x15/331111/331111.png)Container exited with errornous exit code|![#fe9bab](https://placehold.co/15x15/fe9bab/fe9bab.png)k8s_container|| +|![#997700](https://placehold.co/15x15/997700/997700.png)Waiting for starting container|![#fe9bab](https://placehold.co/15x15/fe9bab/fe9bab.png)k8s_container|The container is not started yet and waiting for something.(Example: Pulling images, mounting volumes ...etc)| +|![#EE4400](https://placehold.co/15x15/EE4400/EE4400.png)Container is not ready|![#fe9bab](https://placehold.co/15x15/fe9bab/fe9bab.png)k8s_container|The container is started but the readiness is not ready.| +|![#007700](https://placehold.co/15x15/007700/007700.png)Container is ready|![#fe9bab](https://placehold.co/15x15/fe9bab/fe9bab.png)k8s_container|The container is started and the readiness is ready| +|![#113333](https://placehold.co/15x15/113333/113333.png)Container exited with healthy exit code|![#fe9bab](https://placehold.co/15x15/fe9bab/fe9bab.png)k8s_container|The container is already terminated with successful exit code = 0| +|![#331111](https://placehold.co/15x15/331111/331111.png)Container exited with errornous exit code|![#fe9bab](https://placehold.co/15x15/fe9bab/fe9bab.png)k8s_container|The container is already terminated with errornous exit code != 0| + +> [!TIP] +> Detailed container statuses are only available when your project enabled `DATA_WRITE` audit log for Kubernetes Engine API. +> Check [README](../../README.md) more details to configure `DATA_WRITE` audit log. + ### Events @@ -118,8 +126,8 @@ This timeline can have the following events. |Source log|Description| |---|---| -|![#fe9bab](https://placehold.co/15x15/fe9bab/fe9bab.png)k8s_container|| -|![#0077CC](https://placehold.co/15x15/0077CC/0077CC.png)k8s_node|| +|![#fe9bab](https://placehold.co/15x15/fe9bab/fe9bab.png)k8s_container|A container log on stdout/etderr| +|![#0077CC](https://placehold.co/15x15/0077CC/0077CC.png)k8s_node|kubelet/containerd logs associated with the container| @@ -133,9 +141,9 @@ This timeline can have the following revisions. |State|Source log|Description| |---|---|---| -|![#997700](https://placehold.co/15x15/997700/997700.png)Resource may be existing|![#0077CC](https://placehold.co/15x15/0077CC/0077CC.png)k8s_node|| -|![#0000FF](https://placehold.co/15x15/0000FF/0000FF.png)Resource is existing|![#0077CC](https://placehold.co/15x15/0077CC/0077CC.png)k8s_node|| -|![#CC0000](https://placehold.co/15x15/CC0000/CC0000.png)Resource is deleted|![#0077CC](https://placehold.co/15x15/0077CC/0077CC.png)k8s_node|| +|![#997700](https://placehold.co/15x15/997700/997700.png)Resource may be existing|![#0077CC](https://placehold.co/15x15/0077CC/0077CC.png)k8s_node|The component is infrred to be running because of the logs from it| +|![#0000FF](https://placehold.co/15x15/0000FF/0000FF.png)Resource is existing|![#0077CC](https://placehold.co/15x15/0077CC/0077CC.png)k8s_node|The component is running running. (Few node components supports this state because the parser knows logs on startup for specific components)| +|![#CC0000](https://placehold.co/15x15/CC0000/CC0000.png)Resource is deleted|![#0077CC](https://placehold.co/15x15/0077CC/0077CC.png)k8s_node|The component is no longer running. (Few node components supports this state because the parser knows logs on termination for specific components)| @@ -146,7 +154,7 @@ This timeline can have the following events. |Source log|Description| |---|---| -|![#0077CC](https://placehold.co/15x15/0077CC/0077CC.png)k8s_node|| +|![#0077CC](https://placehold.co/15x15/0077CC/0077CC.png)k8s_node|A log from the component on the log| @@ -178,7 +186,7 @@ This timeline can have the following aliases. -## [![#A52A2A](https://placehold.co/15x15/A52A2A/A52A2A.png) neg - NEG timeline](#RelationshipNetworkEndpointGroup) +## [![#A52A2A](https://placehold.co/15x15/A52A2A/A52A2A.png) neg - Network Endpoint Group timeline](#RelationshipNetworkEndpointGroup) ### Revisions @@ -188,8 +196,8 @@ This timeline can have the following revisions. |State|Source log|Description| |---|---|---| -|![#004400](https://placehold.co/15x15/004400/004400.png)State is 'True'|![#33CCFF](https://placehold.co/15x15/33CCFF/33CCFF.png)network_api|| -|![#EE4400](https://placehold.co/15x15/EE4400/EE4400.png)State is 'False'|![#33CCFF](https://placehold.co/15x15/33CCFF/33CCFF.png)network_api|| +|![#004400](https://placehold.co/15x15/004400/004400.png)State is 'True'|![#33CCFF](https://placehold.co/15x15/33CCFF/33CCFF.png)network_api|indicates the NEG is already attached to the Pod.| +|![#EE4400](https://placehold.co/15x15/EE4400/EE4400.png)State is 'False'|![#33CCFF](https://placehold.co/15x15/33CCFF/33CCFF.png)network_api|indicates the NEG is detached from the Pod| @@ -203,7 +211,7 @@ This timeline can have the following events. |Source log|Description| |---|---| -|![#FF5555](https://placehold.co/15x15/FF5555/FF5555.png)autoscaler|| +|![#FF5555](https://placehold.co/15x15/FF5555/FF5555.png)autoscaler|Autoscaler logs associated to a MIG(e.g The mig was scaled up by the austoscaler)| @@ -217,6 +225,20 @@ This timeline can have the following events. |Source log|Description| |---|---| -|![#FF3333](https://placehold.co/15x15/FF3333/FF3333.png)control_plane_component|| +|![#FF3333](https://placehold.co/15x15/FF3333/FF3333.png)control_plane_component|A log from the control plane component| + +## [![#333333](https://placehold.co/15x15/333333/333333.png) serialport - Serialport log timeline](#RelationshipSerialPort) + + +### Events + +This timeline can have the following events. + + +|Source log|Description| +|---|---| +|![#333333](https://placehold.co/15x15/333333/333333.png)serial_port|A serialport log from the node| + + diff --git a/docs/template/feature.template.md b/docs/template/feature.template.md index 810fd91..af1c470 100644 --- a/docs/template/feature.template.md +++ b/docs/template/feature.template.md @@ -13,7 +13,7 @@ |Parameter name|Description| |:-:|---| {{- range $index,$form := $feature.Forms}} -|{{$form.Label}}|{{$form.Description}}| +|[{{$form.Label}}](./forms.md#{{$form.ID}})|{{$form.Description}}| {{- end}} {{end}} diff --git a/docs/template/form.template.md b/docs/template/form.template.md new file mode 100644 index 0000000..639b5b4 --- /dev/null +++ b/docs/template/form.template.md @@ -0,0 +1,9 @@ +{{define "form-template"}} +{{range $index,$form := .Forms }} + +## {{$form.Label}} + +{{$form.Description}} + +{{end}} +{{end}} \ No newline at end of file diff --git a/docs/template/inspection-types.template.md b/docs/template/inspection-type.template.md similarity index 67% rename from docs/template/inspection-types.template.md rename to docs/template/inspection-type.template.md index 3399113..faebc26 100644 --- a/docs/template/inspection-types.template.md +++ b/docs/template/inspection-type.template.md @@ -7,10 +7,10 @@ + {{range $feature := $type.SupportedFeatures}} - * [{{$feature.Name}}](./features.md#{{$feature.ID}}) - -{{end}} +{{- end}} + {{end}} {{end}} \ No newline at end of file diff --git a/docs/template/log-types.template.md b/docs/template/log-types.template.md deleted file mode 100644 index 2720837..0000000 --- a/docs/template/log-types.template.md +++ /dev/null @@ -1,7 +0,0 @@ -{{define "log-type-template"}} -{{range $index,$type := .LogTypes }} - -## [![#{{$type.ColorCode}}](https://placehold.co/15x15/{{$type.ColorCode}}/{{$type.ColorCode}}.png) {{$type.Name}}](#{{$type.ID}}) - -{{end}} -{{end}} \ No newline at end of file diff --git a/pkg/document/model/form.go b/pkg/document/model/form.go new file mode 100644 index 0000000..3acb430 --- /dev/null +++ b/pkg/document/model/form.go @@ -0,0 +1,30 @@ +package model + +import ( + "github.com/GoogleCloudPlatform/khi/pkg/inspection" + "github.com/GoogleCloudPlatform/khi/pkg/inspection/task/label" + "github.com/GoogleCloudPlatform/khi/pkg/inspection/taskfilter" +) + +type FormDocumentModel struct { + Forms []FormDocumentElement +} + +type FormDocumentElement struct { + ID string + Label string + Description string +} + +func GetFormDocumentModel(taskServer *inspection.InspectionTaskServer) (*FormDocumentModel, error) { + result := FormDocumentModel{} + forms := taskServer.RootTaskSet.FilteredSubset(label.TaskLabelKeyIsFormTask, taskfilter.HasTrue, false) + for _, form := range forms.GetAll() { + result.Forms = append(result.Forms, FormDocumentElement{ + ID: form.ID().String(), + Label: form.Labels().GetOrDefault(label.TaskLabelKeyFormFieldLabel, "").(string), + Description: form.Labels().GetOrDefault(label.TaskLabelKeyFormFieldDescription, "").(string), + }) + } + return &result, nil +} diff --git a/pkg/document/model/inspection_type.go b/pkg/document/model/inspection_type.go index b268f1f..0d19d88 100644 --- a/pkg/document/model/inspection_type.go +++ b/pkg/document/model/inspection_type.go @@ -1,6 +1,8 @@ package model import ( + "strings" + "github.com/GoogleCloudPlatform/khi/pkg/inspection" inspection_task "github.com/GoogleCloudPlatform/khi/pkg/inspection/task" "github.com/GoogleCloudPlatform/khi/pkg/inspection/taskfilter" @@ -36,7 +38,7 @@ func GetInspectionTypeDocumentModel(taskServer *inspection.InspectionTaskServer) features := []InspectionTypeDocumentElementFeature{} for _, task := range tasks { features = append(features, InspectionTypeDocumentElementFeature{ - ID: task.Labels().GetOrDefault(inspection_task.LabelKeyFeatureDocumentAnchorID, "").(string), + ID: strings.ToLower(task.Labels().GetOrDefault(inspection_task.LabelKeyFeatureDocumentAnchorID, "").(string)), Name: task.Labels().GetOrDefault(inspection_task.LabelKeyFeatureTaskTitle, "").(string), Description: task.Labels().GetOrDefault(inspection_task.LabelKeyFeatureTaskDescription, "").(string), }) diff --git a/pkg/model/enum/log_type.go b/pkg/model/enum/log_type.go index 36163d3..f756a97 100644 --- a/pkg/model/enum/log_type.go +++ b/pkg/model/enum/log_type.go @@ -35,7 +35,7 @@ const ( logTypeUnusedEnd ) -const EnumLogTypeLength = int(logTypeUnusedEnd) +const EnumLogTypeLength = int(logTypeUnusedEnd) + 1 type LogTypeFrontendMetadata struct { // EnumKeyName is the name of this enum value. Must match with the enum key. diff --git a/pkg/model/enum/parent_relationship.go b/pkg/model/enum/parent_relationship.go index c3a4581..53151e9 100644 --- a/pkg/model/enum/parent_relationship.go +++ b/pkg/model/enum/parent_relationship.go @@ -33,7 +33,7 @@ const ( ) // EnumParentRelationshipLength is the count of ParentRelationship enum elements. -const EnumParentRelationshipLength = int(relationshipUnusedEnd) +const EnumParentRelationshipLength = int(relationshipUnusedEnd) + 1 // parentRelationshipFrontendMetadata is a type defined for each parent relationship types. type ParentRelationshipFrontendMetadata struct { @@ -241,14 +241,17 @@ var ParentRelationships = map[ParentRelationship]ParentRelationshipFrontendMetad { State: RevisionStateEndpointReady, SourceLogType: LogTypeAudit, + Description: "An endpoint associated with the parent resource is ready", }, { State: RevisionStateEndpointUnready, SourceLogType: LogTypeAudit, + Description: "An endpoint associated with the parent resource is not ready. Traffic shouldn't be routed during this time.", }, { State: RevisionStateEndpointTerminating, SourceLogType: LogTypeAudit, + Description: "An endpoint associated with the parent resource is being terminated. New traffic shouldn't be routed to this endpoint during this time, but the endpoint can still have pending requests.", }, }, }, @@ -265,30 +268,37 @@ var ParentRelationships = map[ParentRelationship]ParentRelationshipFrontendMetad { State: RevisionStateContainerWaiting, SourceLogType: LogTypeContainer, + Description: "The container is not started yet and waiting for something.(Example: Pulling images, mounting volumes ...etc)", }, { State: RevisionStateContainerRunningNonReady, SourceLogType: LogTypeContainer, + Description: "The container is started but the readiness is not ready.", }, { State: RevisionStateContainerRunningReady, SourceLogType: LogTypeContainer, + Description: "The container is started and the readiness is ready", }, { State: RevisionStateContainerTerminatedWithSuccess, SourceLogType: LogTypeContainer, + Description: "The container is already terminated with successful exit code = 0", }, { State: RevisionStateContainerTerminatedWithError, SourceLogType: LogTypeContainer, + Description: "The container is already terminated with errornous exit code != 0", }, }, GeneratableEvents: []GeneratableEventInfo{ { SourceLogType: LogTypeContainer, + Description: "A container log on stdout/etderr", }, { SourceLogType: LogTypeNode, + Description: "kubelet/containerd logs associated with the container", }, }, }, @@ -305,19 +315,23 @@ var ParentRelationships = map[ParentRelationship]ParentRelationshipFrontendMetad { State: RevisionStateInferred, SourceLogType: LogTypeNode, + Description: "The component is infrred to be running because of the logs from it", }, { State: RevisionStateExisting, SourceLogType: LogTypeNode, + Description: "The component is running running. (Few node components supports this state because the parser knows logs on startup for specific components)", }, { State: RevisionStateDeleted, SourceLogType: LogTypeNode, + Description: "The component is no longer running. (Few node components supports this state because the parser knows logs on termination for specific components)", }, }, GeneratableEvents: []GeneratableEventInfo{ { SourceLogType: LogTypeNode, + Description: "A log from the component on the log", }, }, }, @@ -359,7 +373,7 @@ var ParentRelationships = map[ParentRelationship]ParentRelationshipFrontendMetad Visible: true, EnumKeyName: "RelationshipNetworkEndpointGroup", Label: "neg", - LongName: "NEG timeline", + LongName: "Network Endpoint Group timeline", LabelColor: "#FFFFFF", LabelBackgroundColor: "#A52A2A", Hint: "Pod serving status obtained from the associated NEG status", @@ -368,10 +382,12 @@ var ParentRelationships = map[ParentRelationship]ParentRelationshipFrontendMetad { State: RevisionStateConditionTrue, SourceLogType: LogTypeNetworkAPI, + Description: "indicates the NEG is already attached to the Pod.", }, { State: RevisionStateConditionFalse, SourceLogType: LogTypeNetworkAPI, + Description: "indicates the NEG is detached from the Pod", }, }, }, @@ -387,6 +403,7 @@ var ParentRelationships = map[ParentRelationship]ParentRelationshipFrontendMetad GeneratableEvents: []GeneratableEventInfo{ { SourceLogType: LogTypeAutoscaler, + Description: "Autoscaler logs associated to a MIG(e.g The mig was scaled up by the austoscaler)", }, }, }, @@ -402,6 +419,7 @@ var ParentRelationships = map[ParentRelationship]ParentRelationshipFrontendMetad GeneratableEvents: []GeneratableEventInfo{ { SourceLogType: LogTypeControlPlaneComponent, + Description: "A log from the control plane component", }, }, }, @@ -417,6 +435,7 @@ var ParentRelationships = map[ParentRelationship]ParentRelationshipFrontendMetad GeneratableEvents: []GeneratableEventInfo{ { SourceLogType: LogTypeSerialPort, + Description: "A serialport log from the node", }, }, },