newrelic

package
v0.0.0-...-cc9ec16 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2019 License: BSD-2-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const ChunkSize = 10

Chunk size of metric requests

View Source
const UserAgent = "Prometheus-NewRelic-Exporter/" + Version

User-Agent string

View Source
const Version = "0.4b"

Module version

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Period int
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI(c config.Config) *API

func (*API) GetApplications

func (api *API) GetApplications() ([]Application, error)

func (*API) GetMetricData

func (api *API) GetMetricData(appId int, names []MetricName, from time.Time, to time.Time) ([]MetricData, error)

func (*API) GetMetricNames

func (api *API) GetMetricNames(appID int) ([]MetricName, error)

type Application

type Application struct {
	ID         int
	Name       string
	Health     string             `json:"health_status"`
	AppSummary map[string]float64 `json:"application_summary"`
	UsrSummary map[string]float64 `json:"end_user_summary"`
}

type MetricData

type MetricData struct {
	Name       string
	Timeslices []struct {
		Values map[string]interface{}
	}
}

type MetricName

type MetricName struct {
	Name       string   `json:"name"`
	ValueNames []string `json:"values"`
}

Jump to

Keyboard shortcuts

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