ceilometer

package
v0.0.0-...-c3020d8 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ceilometer

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

Ceilometer instance for parsing and handling ceilometer metric messages

func New

func New() *Ceilometer

New Ceilometer constructor

func (*Ceilometer) ParseInputJSON

func (c *Ceilometer) ParseInputJSON(blob []byte) (*Message, error)

ParseInputJSON parse blob into list of metrics

func (*Ceilometer) ParseInputMsgPack

func (c *Ceilometer) ParseInputMsgPack(blob []byte) (*Message, error)

ParseInputMsgPack parse blob into list of metrics

type Message

type Message struct {
	Publisher string   `json:"publisher_id" msgpack:"publisher_id"`
	Payload   []Metric `json:"payload"`
}

Message struct represents an incoming ceilometer metrics message

type Metadata

type Metadata struct {
	Host         string `json:"host" msgpack:"host"`
	Name         string `json:"name" msgpack:"name"`
	DisplayName  string `json:"display_name" msgpack:"display_name"`
	InstanceHost string `json:"instance_host" msgpack:"instance_host"`
}

Metedata represents metadataof a metric from ceilometer

type Metric

type Metric struct {
	Source           string   `json:"source" msgpack:"source"`
	CounterName      string   `json:"counter_name" msgpack:"counter_name"`
	CounterType      string   `json:"counter_type" msgpack:"counter_type"`
	CounterUnit      string   `json:"counter_unit" msgpack:"counter_unit"`
	CounterVolume    float64  `json:"counter_volume" msgpack:"counter_volume"`
	UserID           string   `json:"user_id" msgpack:"user_id"`
	UserName         string   `json:"user_name" msgpack:"user_name"`
	ProjectID        string   `json:"project_id" msgpack:"project_id"`
	ProjectName      string   `json:"project_name" msgpack:"project_name"`
	ResourceID       string   `json:"resource_id" msgpack:"resource_id"`
	Timestamp        string   `json:"timestamp" msgpack:"timestamp"`
	ResourceMetadata Metadata `json:"resource_metadata" msgpack:"resource_metadata"`
}

Metric represents a single metric from ceilometer for unmarshalling

type OsloSchema

type OsloSchema struct {
	Request struct {
		OsloMessage string `json:"oslo.message"`
	}
}

OsloSchema initial OsloSchema

Jump to

Keyboard shortcuts

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