Documentation ¶
Index ¶
- Variables
- type Entities
- func (e *Entities) AddTags(guid string, tags []Tag) error
- func (e *Entities) DeleteTagValues(guid string, tagValues []TagValue) error
- func (e *Entities) DeleteTags(guid string, tagKeys []string) error
- func (e *Entities) GetEntities(guids []string) ([]*Entity, error)
- func (e *Entities) GetEntity(guid string) (*Entity, error)
- func (e *Entities) ListTags(guid string) ([]*Tag, error)
- func (e *Entities) ReplaceTags(guid string, tags []Tag) error
- func (e *Entities) SearchEntities(params SearchEntitiesParams) ([]*Entity, error)
- type Entity
- type EntityAlertSeverityType
- type EntityDomainType
- type EntityType
- type SearchEntitiesParams
- type Tag
- type TagValue
Constants ¶
This section is empty.
Variables ¶
var BaseURLs = region.NerdGraphBaseURLs
BaseURLs represents the base API URLs for the different environments of the New Relic REST API V2.
var ( // EntityAlertSeverities specifies the possible alert severities for a New Relic One entity. EntityAlertSeverities = struct { Critical EntityAlertSeverityType NotAlerting EntityAlertSeverityType NotConfigured EntityAlertSeverityType Warning EntityAlertSeverityType }{ Critical: "APM", NotAlerting: "NOT_ALERTING", NotConfigured: "NOT_CONFIGURED", Warning: "WARNING", } )
var ( // EntityDomains specifies the possible domains for a New Relic One entity. EntityDomains = struct { APM EntityDomainType Browser EntityDomainType Infrastructure EntityDomainType Mobile EntityDomainType Synthetics EntityDomainType }{ APM: "APM", Browser: "BROWSER", Infrastructure: "INFRA", Mobile: "MOBILE", Synthetics: "SYNTH", } )
var ( // EntityTypes specifies the possible types for a New Relic One entity. EntityTypes = struct { Application EntityType Dashboard EntityType Host EntityType Monitor EntityType }{ Application: "APPLICATION", Dashboard: "DASHBOARD", Host: "HOST", Monitor: "MONITOR", } )
Functions ¶
This section is empty.
Types ¶
type Entities ¶
type Entities struct {
// contains filtered or unexported fields
}
Entities is used to communicate with the New Relic Entities product.
func (*Entities) DeleteTagValues ¶
DeleteTagValues deletes specific tag key and value pairs from the entity.
func (*Entities) DeleteTags ¶
DeleteTags deletes specific tag keys from the entity.
func (*Entities) GetEntities ¶
GetEntities retrieves a set of New Relic One entities by their entity guids.
func (*Entities) GetEntity ¶
GetEntity retrieve a set of New Relic One entities by their entity guids.
func (*Entities) ListTags ¶
ListTags returns a collection of tags for a given entity by entity GUID.
func (*Entities) ReplaceTags ¶
ReplaceTags replaces the entity's entire set of tags with the provided tag set.
func (*Entities) SearchEntities ¶
func (e *Entities) SearchEntities(params SearchEntitiesParams) ([]*Entity, error)
SearchEntities searches New Relic One entities based on the provided search parameters.
type Entity ¶
type Entity struct { AccountID int `json:"accountId,omitempty"` Domain EntityDomainType `json:"domain,omitempty"` EntityType EntityType `json:"entityType,omitempty"` GUID string `json:"guid,omitempty"` Name string `json:"name,omitempty"` Permalink string `json:"permalink,omitempty"` Reporting bool `json:"reporting,omitempty"` Type string `json:"type,omitempty"` // Not always returned. Only returned from ApmApplicationEntityOutline ApplicationID *int `json:"applicationId,omitempty"` }
Entity represents a New Relic One entity.
type EntityAlertSeverityType ¶
type EntityAlertSeverityType string
EntityAlertSeverityType represents a New Relic One entity alert severity.
type EntityDomainType ¶
type EntityDomainType string
EntityDomainType represents a New Relic One entity domain.
type SearchEntitiesParams ¶ added in v0.7.1
type SearchEntitiesParams struct { AlertSeverity EntityAlertSeverityType `json:"alertSeverity,omitempty"` Domain EntityDomainType `json:"domain,omitempty"` InfrastructureIntegrationType string `json:"infrastructureIntegrationType,omitempty"` Name string `json:"name,omitempty"` Reporting *bool `json:"reporting,omitempty"` Tags *TagValue `json:"tags,omitempty"` Type EntityType `json:"type,omitempty"` }
SearchEntitiesParams represents a set of search parameters for retrieving New Relic One entities.