easemonitor

package
v2.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package easemonitor provides the common fields and interfaces for EaseMonitor metrics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonFields

type CommonFields struct {
	Timestamp int64  `json:"timestamp"`
	Category  string `json:"category"`
	HostName  string `json:"host_name"`
	HostIpv4  string `json:"host_ipv4"`
	System    string `json:"system"`
	Service   string `json:"service"`
	Type      string `json:"type"`
	Resource  string `json:"resource"`
	URL       string `json:"url,omitempty"`
}

CommonFields is the common fields of all EaseMonitor metrics.

type Metricer

type Metricer interface {
	ToMetrics(service string) []*Metrics
}

Metricer is the interface to convert metrics to EaseMonitor format.

type Metrics

type Metrics struct {
	CommonFields
	OtherFields interface{}
}

Metrics is an EaseMonitor metrics.

func (*Metrics) MarshalJSON

func (m *Metrics) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

Jump to

Keyboard shortcuts

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