Documentation
¶
Index ¶
Constants ¶
View Source
const MaxNodesPerQuery = 30
Variables ¶
View Source
var ClusterIdentityAliasTask = coretask.NewAliasTask( googlecloudlogserialport_contract.ClusterIdentityTaskID, googlecloudk8scommon_contract.ClusterIdentityTaskID.Ref(), )
View Source
var FieldSetReadTask = inspectiontaskbase.NewFieldSetReadTask( googlecloudlogserialport_contract.FieldSetReadTaskID, googlecloudlogserialport_contract.LogQueryTaskID.Ref(), []log.FieldSetReader{ &googlecloudlogserialport_contract.GCESerialPortLogFieldSetReader{}, &googlecloudcommon_contract.GCPDefaultSeverityFieldSetReader{}, }, )
FieldSetReadTask is the task to run GCESerialPortLogFieldSetReader on logs to parse serial port logs.
View Source
var LogFilterTask = inspectiontaskbase.NewLogFilterTask( googlecloudlogserialport_contract.LogFilterTaskID, googlecloudlogserialport_contract.FieldSetReadTaskID.Ref(), func(ctx context.Context, l *log.Log) bool { return log.MustGetFieldSet(l, &googlecloudlogserialport_contract.GCESerialPortLogFieldSet{}).Message != "" }, )
LogFilterTask removes logs with empty message. This message is mostly just contained escape sequences and stripped by ANSIEscapeSequenceStripper.
View Source
var LogGrouperTask = inspectiontaskbase.NewLogGrouperTask( googlecloudlogserialport_contract.LogGrouperTaskID, googlecloudlogserialport_contract.LogFilterTaskID.Ref(), func(ctx context.Context, l *log.Log) string { serialFS := log.MustGetFieldSet(l, &googlecloudlogserialport_contract.GCESerialPortLogFieldSet{}) return fmt.Sprintf("%s#%s", serialFS.NodeName, serialFS.Port) }, )
LogGrouperTask is the grouper task for GCE serial port logs. It groups logs by the node name and port name.
View Source
var LogIngesterTask = inspectiontaskbase.NewLogIngesterTaskV2( googlecloudlogserialport_contract.LogIngesterTaskID, &serialPortLogIngester{}, )
LogIngesterTask is the V2 log ingester task.
View Source
var LogQueryTask = googlecloudcommon_contract.NewListLogEntriesTask(&serialPortLoggingFilterTaskSetting{})
View Source
var LogToTimelineMapperTask = inspectiontaskbase.NewLogToTimelineMapperTaskV2( googlecloudlogserialport_contract.LogToTimelineMapperTaskID, &serialportLogToTimelineMapper{}, inspectioncore_contract.FeatureTaskLabelV2( "GCE Node Serial Port Logs", `Gather serial port logs from GCE instances to troubleshoot VM bootstrapping and OS initialization issues.`, 10000, false, ), )
LogToTimelineMapperTask is the V2 timeline mapper task.
Functions ¶
func GenerateSerialPortQuery ¶
func GenerateSerialPortQuery(taskMode inspectioncore_contract.InspectionTaskModeType, foundNodeNames []string, nodeNameSubstrings []string) []string
func Register ¶
func Register(registry coreinspection.InspectionTaskRegistry) error
Register registers all googlecloudlogserialport inspection tasks to the registry.
flowchart TD
LogQueryTask LogFilterTask FieldSetReadTask LogIngesterTask LogGrouperTask LogToTimelineMapperTask LogQueryTask --> FieldSetReadTask FieldSetReadTask --> LogFilterTask LogFilterTask --> LogIngesterTask LogFilterTask --> LogGrouperTask LogGrouperTask --> LogToTimelineMapperTask LogIngesterTask --> LogToTimelineMapperTask
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.