serialport_impl

package
v0.59.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const MaxNodesPerQuery = 30

Variables

View Source
var LogFilterTask = inspectiontaskbase.NewLogFilterTask(
	serialport.LogFilterTaskID,
	serialport.LogQueryTaskID.Ref(),
	func(ctx context.Context, l *log.Log) bool {
		msg, err := serialport.ExtractGCESerialPortMessage(l.NodeReader)
		if err != nil {
			return false
		}
		return msg != ""
	},
)

LogFilterTask removes logs with empty message. This message is mostly just contained escape sequences and stripped by ANSIEscapeSequenceStripper.

View Source
var LogGrouperTask = inspectiontaskbase.NewLogGrouperTask(
	serialport.LogGrouperTaskID,
	serialport.LogFilterTaskID.Ref(),
	func(ctx context.Context, l *log.Log) string {
		serialFS, err := serialport.ExtractGCESerialPortLog(l.NodeReader)
		if err != nil {
			return ""
		}
		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.NewLogIngesterTask(
	serialport.LogIngesterTaskID,
	&serialPortLogIngester{},
)

LogIngesterTask is the log ingester task.

View Source
var LogQueryTask = gcpcommon.NewStructuredListLogEntriesTask(&serialPortLoggingFilterTaskSetting{})
View Source
var LogToTimelineMapperTask = inspectiontaskbase.NewLogToTimelineMapperTask(
	serialport.LogToTimelineMapperTaskID,
	&serialportLogToTimelineMapper{},
	inspectioncore.FeatureTaskLabel(
		"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 timeline mapper task.

Functions

func GenerateSerialPortStructuredQuery

func GenerateSerialPortStructuredQuery(taskMode inspectioncore.InspectionTaskModeType, foundNodeNames []string, nodeNameSubstrings []string) []*logestimator.StructuredLogQuery

GenerateSerialPortStructuredQuery generates structured log queries for serial port logs.

func Register

func Register(registry coreinspection.InspectionTaskRegistry) error

Register registers all googlecloudlogserialport inspection tasks to the registry.

flowchart TD

LogQueryTask
LogFilterTask
LogIngesterTask
LogGrouperTask
LogToTimelineMapperTask

LogQueryTask --> LogFilterTask
LogFilterTask --> LogIngesterTask
LogFilterTask --> LogGrouperTask
LogGrouperTask --> LogToTimelineMapperTask
LogIngesterTask --> LogToTimelineMapperTask

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL