loganalytics

package module
v0.0.0-...-e14ab5c Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: MIT Imports: 13 Imported by: 0

README

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogAnalyticsAdapter

func NewLogAnalyticsAdapter(route *router.Route) (router.LogAdapter, error)

Types

type Adapter

type Adapter struct {
	// contains filtered or unexported fields
}

Adapter defines a logspout adapter for azure log analytics.

func (*Adapter) Stream

func (adapter *Adapter) Stream(logstream chan *router.Message)

Stream waits on a logspout message channel. Upon receiving on it POSTs it to Log Analytics endpoint.

type LogClient

type LogClient struct {
	// contains filtered or unexported fields
}

LogClient is the client for log analytics

func NewLogClient

func NewLogClient(workspaceID, workspaceSecret string) LogClient

NewLogClient creates a log client

func (*LogClient) PostMessage

func (c *LogClient) PostMessage(message *router.Message, timestamp time.Time) error

PostMessage logs an array of messages to log analytics service

type ModuleMessage

type ModuleMessage struct {
	V              int       `json:"version"`
	Time           time.Time `json:"timeEmitted"`
	Level          string    `json:"level"`
	Data           string    `json:"msg"`
	ModuleName     string    `json:"moduleName"`
	ContainerID    string    `json:"containerID"`
	ContainerImage string    `json:"containerImage"`
	Hostname       string    `json:"hostname"`
	IoTHubName     string    `json:"iothubname"`
	IoTHubDeviceID string    `json:"iothubdeviceid"`
}

ModuleMessage defines a log message from an IoT Edge module.

Jump to

Keyboard shortcuts

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