Query Config Sync logs

This page contains queries that you can use with Logs Explorer . You can use these queries to retrieve, view, and analyze log data. These logs can contain valuable historical data that isn't captured by nomos bugreport when the operator or reconciler Pods are restarted.

To find the most important logs, sort the issues by severity and then adjust the timestamp to control the time window.

Query/filter name Expression Notes
Check the reconciler-manager logs
 resource 
 . 
 type 
 = 
 "k8s_container" 
 resource 
 . 
 labels 
 . 
 project_id 
 = 
 " PROJECT_ID 
" 
 resource 
 . 
 labels 
 . 
 cluster_name 
 = 
 " CLUSTER_NAME 
" 
 resource 
 . 
 labels 
 . 
 namespace_name 
 = 
 "config-management-system" 
 resource 
 . 
 labels 
 . 
 container_name 
 = 
 "reconciler-manager" 
 timestamp 
  
 >= 
  
 " START_TIME 
" 
 timestamp 
  
 <= 
  
 " STOP_TIME 
" 
  
Check the reconciler logs for a namespace repository
 resource 
 . 
 type 
 = 
 "k8s_container" 
 resource 
 . 
 labels 
 . 
 project_id 
 = 
 " PROJECT_ID 
" 
 resource 
 . 
 labels 
 . 
 cluster_name 
 = 
 " CLUSTER_NAME 
" 
 resource 
 . 
 labels 
 . 
 namespace_name 
 = 
 "config-management-system" 
 resource 
 . 
 labels 
 . 
 container_name 
 = 
 "reconciler" 
 resource 
 . 
 labels 
 . 
 pod_name 
 : 
 "ns-reconciler- NAMESPACE 
" 
 timestamp 
  
 >= 
  
 " START_TIME 
" 
 timestamp 
  
 <= 
  
 " STOP_TIME 
" 
  

To view the git-sync logs, change resource.laels.container_name to git-sync . To view the root reconciler logs, change resource.labels.pod_name to root-reconciler .

Check if a cluster was upgraded in a period
 resource 
 . 
 type 
 = 
 "gke_cluster" 
 resource 
 . 
 labels 
 . 
 project_id 
 = 
 " PROJECT_ID 
" 
 resource 
 . 
 labels 
 . 
 cluster_name 
 = 
 " CLUSTER_NAME 
" 
 resource 
 . 
 labels 
 . 
 location 
 = 
 " LOCATION 
" 
 timestamp 
  
 >= 
  
 " START_TIME 
" 
 timestamp 
  
 <= 
  
 " STOP_TIME 
" 
  

If the cluster you queried wasn't upgraded, the result is empty.

Check if reconciler Pods failed to start
 resource 
 . 
 type 
 = 
 "k8s_pod" 
 resource 
 . 
 labels 
 . 
 project_id 
 = 
 " PROJECT_ID 
" 
 resource 
 . 
 labels 
 . 
 cluster_name 
 = 
 " CLUSTER_NAME 
" 
 resource 
 . 
 labels 
 . 
 location 
 = 
 " LOCATION 
" 
 resource 
 . 
 labels 
 . 
 pod_name 
 : 
 "ns-reconciler- NAMESPACE 
" 
 timestamp 
  
 >= 
  
 " START_TIME 
" 
 timestamp 
  
 <= 
  
 " STOP_TIME 
" 
  

If you see an error for Config Sync related Pods, that means those Pods weren't able to start at the associated timestamp.

Check the operation of a ConfigMap
 resource 
 . 
 type 
 = 
 "k8s_cluster" 
 resource 
 . 
 labels 
 . 
 project_id 
 = 
 " PROJECT_ID 
" 
 resource 
 . 
 labels 
 . 
 cluster_name 
 = 
 " CLUSTER_NAME 
" 
 resource 
 . 
 labels 
 . 
 location 
 = 
 " LOCATION 
" 
 protoPayload 
 . 
 methodName 
 : 
 "io.k8s.core.v1.configmaps" 
 protoPayload 
 . 
 resourceName 
 : 
 "core/v1/namespaces/config-management-system/configmaps/ns-reconciler-cap-logging-service" 
 timestamp 
  
 >= 
  
 " START_TIME 
" 
 timestamp 
  
 <= 
  
 " STOP_TIME 
" 
  
Check the operation of a RepoSync
 resource 
 . 
 type 
 = 
 "k8s_cluster" 
 resource 
 . 
 labels 
 . 
 project_id 
 = 
 " PROJECT_ID 
" 
 resource 
 . 
 labels 
 . 
 cluster_name 
 = 
 " CLUSTER_NAME 
" 
 resource 
 . 
 labels 
 . 
 location 
 = 
 " LOCATION 
" 
 protoPayload 
 . 
 methodName 
 : 
 "reposyncs" 
 protoPayload 
 . 
 resourceName 
 : 
 "namespaces/cap-logging-service/reposyncs" 
 timestamp 
  
 >= 
  
 " START_TIME 
" 
 timestamp 
  
 <= 
  
 " STOP_TIME 
" 
  
List all Git revisions synced by git-sync
 resource 
 . 
 type 
 = 
 "k8s_container" 
 resource 
 . 
 labels 
 . 
 project_id 
 = 
 " PROJECT_ID 
" 
 resource 
 . 
 labels 
 . 
 location 
 = 
 " LOCATION 
" 
 resource 
 . 
 labels 
 . 
 cluster_name 
 = 
 " CLUSTER_NAME 
" 
 resource 
 . 
 labels 
 . 
 namespace_name 
 = 
 "config-management-system" 
 resource 
 . 
 labels 
 . 
 pod_name 
 : 
 "git-importer-" 
  
 severity 
 >= 
 DEFAULT 
 "adding worktree" 
  

Replace the following:

  • PROJECT_ID : Your project ID.
  • CLUSTER_NAME : The name of the cluster that you want to query.
  • START_TIME : Set the time that you want to start collecting logs. You must use the following format when writing a query with a timestamp: YYYY-MM-DDT00:00:00Z.
  • STOP_TIME : Set the time that you want to stop collecting logs. You must use the following format when writing a query with a timestamp: YYYY-MM-DDT00:00:00Z.
  • NAMESPACE : The namespace that you created your namespace repository in.
  • LOCATION : The location that you created your cluster in.
Design a Mobile Site
View Site in Mobile | Classic
Share by: