eventstometrics

package
v0.31.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EventsToMetricsErrorReasonTypes = struct {
	/* GENERAL - Other errors. */
	GENERAL EventsToMetricsErrorReason
	/* INVALID_INPUT - Indicates some part of your submission was invalid. */
	INVALID_INPUT EventsToMetricsErrorReason
	/* USER_NOT_AUTHORIZED - The user attempting to submit this rule is not authorized to do so. */
	USER_NOT_AUTHORIZED EventsToMetricsErrorReason
}{
	GENERAL:             "GENERAL",
	INVALID_INPUT:       "INVALID_INPUT",
	USER_NOT_AUTHORIZED: "USER_NOT_AUTHORIZED",
}

Functions

This section is empty.

Types

type DateTime

type DateTime string

DateTime - The `DateTime` scalar represents a date and time. The `DateTime` appears as an ISO8601 formatted string.

type EventsToMetrics

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

EventsToMetrics is used to communicate with New Relic EventsToMetrics.

func New

func New(config config.Config) EventsToMetrics

New is used to create a new EventsToMetrics client instance.

func (*EventsToMetrics) CreateRules

func (e *EventsToMetrics) CreateRules(createInput []EventsToMetricsCreateRuleInput) ([]EventsToMetricsRule, error)

CreateRules creates one or more New Relic events to metrics rules.

func (*EventsToMetrics) DeleteRules

func (e *EventsToMetrics) DeleteRules(deleteInput []EventsToMetricsDeleteRuleInput) ([]EventsToMetricsRule, error)

DeleteRules deletes one or more New Relic events to metrics rules.

func (*EventsToMetrics) GetRule

func (e *EventsToMetrics) GetRule(accountID int, ruleID string) (*EventsToMetricsRule, error)

GetRule retrieves one or more New Relic events to metrics rules by their IDs.

func (*EventsToMetrics) GetRules

func (e *EventsToMetrics) GetRules(accountID int, ruleIDs []string) ([]EventsToMetricsRule, error)

GetRules retrieves one or more New Relic events to metrics rules by their IDs.

func (*EventsToMetrics) ListRules

func (e *EventsToMetrics) ListRules(accountID int) ([]EventsToMetricsRule, error)

ListRules retrieves a set of New Relic events to metrics rules by their account ID.

func (*EventsToMetrics) UpdateRules

func (e *EventsToMetrics) UpdateRules(updateInput []EventsToMetricsUpdateRuleInput) ([]EventsToMetricsRule, error)

UpdateRules updates one or more New Relic events to metrics rules.

type EventsToMetricsAccountStitchedFields

type EventsToMetricsAccountStitchedFields struct {
	/* AllRules - List all rules for your account. */
	AllRules EventsToMetricsListRuleResult `json:"allRules"`
	/* RulesById - List rules for your account by id. */
	RulesById EventsToMetricsListRuleResult `json:"rulesById"`
}

EventsToMetricsAccountStitchedFields - Account stitched fields to enable autostitching in NerdGraph

type EventsToMetricsCreateRuleFailure

type EventsToMetricsCreateRuleFailure struct {
	/* Errors - Information about why the create failed. */
	Errors []EventsToMetricsError `json:"errors"`
	/* Submitted - Input information about a submitted rule that was unable to be created. */
	Submitted EventsToMetricsCreateRuleSubmission `json:"submitted"`
}

EventsToMetricsCreateRuleFailure - Error details about the events to metrics rule that failed to be created and why.

func (EventsToMetricsCreateRuleFailure) String

type EventsToMetricsCreateRuleInput

type EventsToMetricsCreateRuleInput struct {
	/* AccountID - The account where the events exist and the metrics will be put. */
	AccountID int `json:"accountId"`
	/* Description - Provides additional information about the rule. */
	Description string `json:"description"`
	/* Name - The name of the rule. This must be unique within a given account. */
	Name string `json:"name"`
	/* Nrql - Explains how to create one or more metrics from events. */
	Nrql string `json:"nrql"`
}

EventsToMetricsCreateRuleInput - Details needed to create an events to metrics conversion rule.

type EventsToMetricsCreateRuleResult

type EventsToMetricsCreateRuleResult struct {
	/* Failures - Rules that were not created and why. */
	Failures []EventsToMetricsCreateRuleFailure `json:"failures"`
	/* Successes - Rules that were successfully created. */
	Successes []EventsToMetricsRule `json:"successes"`
}

EventsToMetricsCreateRuleResult - The result of which submitted events to metrics rules were successfully and unsuccessfully created

func (EventsToMetricsCreateRuleResult) Errors

type EventsToMetricsCreateRuleSubmission

type EventsToMetricsCreateRuleSubmission struct {
	/* AccountID - The account where the events exist and the metrics will be put. */
	AccountID int `json:"accountId"`
	/* Description - Provides additional information about the rule. */
	Description string `json:"description"`
	/* Name - The name of the rule. This must be unique within a given account. */
	Name string `json:"name"`
	/* Nrql - Explains how to create one or more metrics from events. */
	Nrql string `json:"nrql"`
}

EventsToMetricsCreateRuleSubmission - The details that were submitted when creating an events to metrics conversion rule.

type EventsToMetricsDeleteRuleFailure

type EventsToMetricsDeleteRuleFailure struct {
	/* Errors - Information about why the delete failed. */
	Errors []EventsToMetricsError `json:"errors"`
	/* Submitted - Input information about a submitted rule that was unable to be deleted. */
	Submitted EventsToMetricsDeleteRuleSubmission `json:"submitted"`
}

EventsToMetricsDeleteRuleFailure - Error details about the events to metrics rule that failed to be deleted and why.

func (EventsToMetricsDeleteRuleFailure) String

type EventsToMetricsDeleteRuleInput

type EventsToMetricsDeleteRuleInput struct {
	/* AccountID - A submitted account id. */
	AccountID int `json:"accountId"`
	/* RuleId - A submitted rule id. */
	RuleId string `json:"ruleId"`
}

EventsToMetricsDeleteRuleInput - Identifying information about the events to metrics rule you want to delete.

type EventsToMetricsDeleteRuleResult

type EventsToMetricsDeleteRuleResult struct {
	/* Failures - Information about the rules that could not be deleted. */
	Failures []EventsToMetricsDeleteRuleFailure `json:"failures"`
	/* Successes - Rules that were successfully deleted. */
	Successes []EventsToMetricsRule `json:"successes"`
}

EventsToMetricsDeleteRuleResult - The result of which submitted events to metrics rules were successfully and unsuccessfully deleted.

func (EventsToMetricsDeleteRuleResult) Errors

type EventsToMetricsDeleteRuleSubmission

type EventsToMetricsDeleteRuleSubmission struct {
	/* AccountID - A submitted account id. */
	AccountID int `json:"accountId"`
	/* RuleId - A submitted rule id. */
	RuleId string `json:"ruleId"`
}

EventsToMetricsDeleteRuleSubmission - The details that were submitted when deleteing an events to metrics conversion rule.

type EventsToMetricsError

type EventsToMetricsError struct {
	/* Description - A detailed error message. */
	Description string `json:"description"`
	/* Reason - The category of error that occurred. */
	Reason EventsToMetricsErrorReason `json:"reason"`
}

EventsToMetricsError - Error details when processing events to metrics rule requests.

func (EventsToMetricsError) String

func (e EventsToMetricsError) String() string

type EventsToMetricsErrorReason

type EventsToMetricsErrorReason string

EventsToMetricsErrorReason - General error categories.

type EventsToMetricsListRuleResult

type EventsToMetricsListRuleResult struct {
	/* Rules - Event-to-metric rules to be returned. */
	Rules []EventsToMetricsRule `json:"rules"`
}

EventsToMetricsListRuleResult - A list of rule details to be returned.

type EventsToMetricsRule

type EventsToMetricsRule struct {
	/* AccountID - Account with the event and where the metrics will be placed. */
	AccountID int `json:"accountId"`
	/* CreatedAt - The time at which the rule was created */
	CreatedAt DateTime `json:"createdAt"`
	/* Description - Additional information about the rule. */
	Description string `json:"description"`
	/* Enabled - True means this rule is enabled. False means the rule is currently not creating metrics. */
	Enabled bool `json:"enabled"`
	/* ID - The id, uniquely identifying the rule. */
	ID string `json:"id"`
	/* Name - The name of the rule. This must be unique within an account. */
	Name string `json:"name"`
	/* Nrql - Explains how to create metrics from events. */
	Nrql string `json:"nrql"`
	/* UpdatedAt - The time at which the rule was updated */
	UpdatedAt DateTime `json:"updatedAt"`
}

EventsToMetricsRule - Information about an event-to-metric rule which creates metrics from events.

type EventsToMetricsUpdateRuleFailure

type EventsToMetricsUpdateRuleFailure struct {
	/* Errors - Information about why the update failed. */
	Errors []EventsToMetricsError `json:"errors"`
	/* Submitted - Input information about a failed update. */
	Submitted EventsToMetricsUpdateRuleSubmission `json:"submitted"`
}

EventsToMetricsUpdateRuleFailure - Error details about the events to metrics rule that failed to be updated and why.

func (EventsToMetricsUpdateRuleFailure) String

type EventsToMetricsUpdateRuleInput

type EventsToMetricsUpdateRuleInput struct {
	/* AccountID - A submitted account id. */
	AccountID int `json:"accountId"`
	/* Enabled - Changes the state of the rule as being enabled or disabled. */
	Enabled bool `json:"enabled"`
	/* RuleId - A submitted rule id. */
	RuleId string `json:"ruleId"`
}

EventsToMetricsUpdateRuleInput - Identifying information about the events to metrics rule you want to update.

type EventsToMetricsUpdateRuleResult

type EventsToMetricsUpdateRuleResult struct {
	/* Failures - Rules that failed to get updated. */
	Failures []EventsToMetricsUpdateRuleFailure `json:"failures"`
	/* Successes - Rules that were successfully enabled or disabled. */
	Successes []EventsToMetricsRule `json:"successes"`
}

EventsToMetricsUpdateRuleResult - The result of which submitted events to metrics rules were successfully and unsuccessfully update.

func (EventsToMetricsUpdateRuleResult) Errors

type EventsToMetricsUpdateRuleSubmission

type EventsToMetricsUpdateRuleSubmission struct {
	/* AccountID - A submitted account id. */
	AccountID int `json:"accountId"`
	/* Enabled - Changes the state of the rule as being enabled or disabled. */
	Enabled bool `json:"enabled"`
	/* RuleId - A submitted rule id. */
	RuleId string `json:"ruleId"`
}

EventsToMetricsUpdateRuleSubmission - The details that were submitted when updating an events to metrics conversion rule.

Jump to

Keyboard shortcuts

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