Documentation ¶
Overview ¶
Package agent defines Agent object definitions.
Index ¶
- type Agent
- func (a Agent) GetKind() manifest.Kind
- func (a Agent) GetManifestSource() string
- func (a Agent) GetName() string
- func (a Agent) GetOrganization() string
- func (a Agent) GetProject() string
- func (a Agent) GetValidator() govy.Validator[Agent]
- func (a Agent) GetVersion() manifest.Version
- func (a Agent) SetManifestSource(src string) manifest.Object
- func (a Agent) SetOrganization(org string) manifest.Object
- func (a Agent) SetProject(project string) manifest.Object
- func (a Agent) Validate() error
- type AmazonPrometheusConfig
- type AppDynamicsConfig
- type AzureMonitorConfig
- type AzurePrometheusConfig
- type BigQueryConfig
- type CloudWatchConfig
- type DatadogConfig
- type DynatraceConfig
- type ElasticsearchConfig
- type GCMConfig
- type GenericConfig
- type GrafanaLokiConfig
- type GraphiteConfig
- type HoneycombConfig
- type InfluxDBConfig
- type InstanaConfig
- type LightstepConfig
- type LogicMonitorConfig
- type Metadata
- type NewRelicConfig
- type OpenTSDBConfig
- type PingdomConfig
- type PrometheusConfig
- type RedshiftConfig
- type Spec
- type SplunkConfig
- type SplunkObservabilityConfig
- type Status
- type SumoLogicConfig
- type ThousandEyesConfig
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct { APIVersion manifest.Version `json:"apiVersion"` Kind manifest.Kind `json:"kind"` Metadata Metadata `json:"metadata"` Spec Spec `json:"spec"` Status *Status `json:"status,omitempty"` Organization string `json:"organization,omitempty"` ManifestSource string `json:"manifestSrc,omitempty"` OktaClientID string `json:"oktaClientID,omitempty"` }
Agent struct which mapped one to one with kind: Agent yaml definition
Example ¶
package main import ( "context" "log" "github.com/nobl9/nobl9-go/internal/examples" "github.com/nobl9/nobl9-go/manifest" "github.com/nobl9/nobl9-go/manifest/v1alpha/agent" ) func main() { // Create the object: myAgent := agent.New( agent.Metadata{ Name: "my-agent", DisplayName: "My Agent", Project: "default", }, agent.Spec{ Description: "Example Agent", Prometheus: &agent.PrometheusConfig{ URL: "https://prometheus-service.monitoring:8080", }, }, ) // Verify the object: if err := myAgent.Validate(); err != nil { log.Fatalf("agent validation failed, err: %v", err) } // Apply the object: client := examples.GetOfflineEchoClient() if err := client.Objects().V1().Apply(context.Background(), []manifest.Object{myAgent}); err != nil { log.Fatalf("failed to apply agent, err: %v", err) } }
Output: apiVersion: n9/v1alpha kind: Agent metadata: name: my-agent displayName: My Agent project: default spec: description: Example Agent prometheus: url: https://prometheus-service.monitoring:8080
func (Agent) GetManifestSource ¶
func (Agent) GetOrganization ¶
func (Agent) GetProject ¶
func (Agent) GetVersion ¶
type AmazonPrometheusConfig ¶
AmazonPrometheusConfig represents content of Amazon Managed Service Configuration typical for Agent Object.
type AppDynamicsConfig ¶
type AppDynamicsConfig struct {
URL string `json:"url"`
}
AppDynamicsConfig represents content of AppDynamics Configuration typical for Agent Object.
type AzureMonitorConfig ¶
type AzureMonitorConfig struct {
TenantID string `json:"tenantId"`
}
AzureMonitorConfig represents content of AzureMonitor Configuration typical for Agent Object.
type AzurePrometheusConfig ¶ added in v0.83.0
AzurePrometheusConfig represents content of Azure Monitor managed service for Prometheus typical for Agent Object.
type BigQueryConfig ¶
type BigQueryConfig struct{}
BigQueryConfig represents content of BigQuery configuration.
type CloudWatchConfig ¶
type CloudWatchConfig struct{}
CloudWatchConfig represents content of CloudWatch Configuration typical for Agent Object.
type DatadogConfig ¶
type DatadogConfig struct {
Site string `json:"site"`
}
DatadogConfig represents content of Datadog Configuration typical for Agent Object.
type DynatraceConfig ¶
type DynatraceConfig struct {
URL string `json:"url"`
}
DynatraceConfig represents content of Dynatrace Configuration typical for Agent Object.
type ElasticsearchConfig ¶
type ElasticsearchConfig struct {
URL string `json:"url"`
}
ElasticsearchConfig represents content of Elasticsearch Configuration typical for Agent Object.
type GenericConfig ¶
type GenericConfig struct{}
GenericConfig represents content of Generic Configuration typical for Agent Object.
type GrafanaLokiConfig ¶
type GrafanaLokiConfig struct {
URL string `json:"url"`
}
GrafanaLokiConfig represents content of GrafanaLoki Configuration typical for Agent Object.
type GraphiteConfig ¶
type GraphiteConfig struct {
URL string `json:"url"`
}
GraphiteConfig represents content of Graphite Configuration typical for Agent Object.
type HoneycombConfig ¶
type HoneycombConfig struct{}
HoneycombConfig represents content of Honeycomb Configuration typical for Agent Object.
type InfluxDBConfig ¶
type InfluxDBConfig struct {
URL string `json:"url"`
}
InfluxDBConfig represents content of InfluxDB configuration typical fo Agent Object
type InstanaConfig ¶
type InstanaConfig struct {
URL string `json:"url"`
}
InstanaConfig represents content of Instana configuration typical for Agent Object
type LightstepConfig ¶
type LightstepConfig struct { Organization string `json:"organization"` Project string `json:"project"` URL string `json:"url"` }
LightstepConfig represents content of Lightstep Configuration typical for Agent Object.
type LogicMonitorConfig ¶ added in v0.82.0
type LogicMonitorConfig struct {
Account string `json:"account"`
}
type NewRelicConfig ¶
type NewRelicConfig struct {
AccountID int `json:"accountId"`
}
NewRelicConfig represents content of NewRelic Configuration typical for Agent Object.
type OpenTSDBConfig ¶
type OpenTSDBConfig struct {
URL string `json:"url"`
}
OpenTSDBConfig represents content of OpenTSDBConfig Configuration typical for Agent Object.
type PingdomConfig ¶
type PingdomConfig struct{}
PingdomConfig represents content of Pingdom Configuration typical for Agent Object.
type PrometheusConfig ¶
type PrometheusConfig struct {
URL string `json:"url"`
}
PrometheusConfig represents content of Prometheus Configuration typical for Agent Object.
type RedshiftConfig ¶
type RedshiftConfig struct{}
RedshiftConfig represents content of Redshift configuration typical for Agent Object
type Spec ¶
type Spec struct { Description string `json:"description,omitempty"` ReleaseChannel v1alpha.ReleaseChannel `json:"releaseChannel,omitempty"` Prometheus *PrometheusConfig `json:"prometheus,omitempty"` Datadog *DatadogConfig `json:"datadog,omitempty"` NewRelic *NewRelicConfig `json:"newRelic,omitempty"` AppDynamics *AppDynamicsConfig `json:"appDynamics,omitempty"` Splunk *SplunkConfig `json:"splunk,omitempty"` Lightstep *LightstepConfig `json:"lightstep,omitempty"` SplunkObservability *SplunkObservabilityConfig `json:"splunkObservability,omitempty"` Dynatrace *DynatraceConfig `json:"dynatrace,omitempty"` Elasticsearch *ElasticsearchConfig `json:"elasticsearch,omitempty"` ThousandEyes *ThousandEyesConfig `json:"thousandEyes,omitempty"` Graphite *GraphiteConfig `json:"graphite,omitempty"` BigQuery *BigQueryConfig `json:"bigQuery,omitempty"` OpenTSDB *OpenTSDBConfig `json:"opentsdb,omitempty"` GrafanaLoki *GrafanaLokiConfig `json:"grafanaLoki,omitempty"` CloudWatch *CloudWatchConfig `json:"cloudWatch,omitempty"` Pingdom *PingdomConfig `json:"pingdom,omitempty"` AmazonPrometheus *AmazonPrometheusConfig `json:"amazonPrometheus,omitempty"` Redshift *RedshiftConfig `json:"redshift,omitempty"` SumoLogic *SumoLogicConfig `json:"sumoLogic,omitempty"` Instana *InstanaConfig `json:"instana,omitempty"` InfluxDB *InfluxDBConfig `json:"influxdb,omitempty"` AzureMonitor *AzureMonitorConfig `json:"azureMonitor,omitempty"` GCM *GCMConfig `json:"gcm,omitempty"` Generic *GenericConfig `json:"generic,omitempty"` Honeycomb *HoneycombConfig `json:"honeycomb,omitempty"` LogicMonitor *LogicMonitorConfig `json:"logicMonitor,omitempty"` AzurePrometheus *AzurePrometheusConfig `json:"azurePrometheus,omitempty"` HistoricalDataRetrieval *v1alpha.HistoricalDataRetrieval `json:"historicalDataRetrieval,omitempty"` QueryDelay *v1alpha.QueryDelay `json:"queryDelay,omitempty"` // Interval, Timeout and Jitter are readonly and cannot be set via API Interval *v1alpha.Interval `json:"interval,omitempty"` Timeout *v1alpha.Timeout `json:"timeout,omitempty"` Jitter *v1alpha.Jitter `json:"jitter,omitempty"` }
Spec represents content of Spec typical for Agent Object
type SplunkConfig ¶
type SplunkConfig struct {
URL string `json:"url"`
}
SplunkConfig represents content of Splunk Configuration typical for Agent Object.
type SplunkObservabilityConfig ¶
type SplunkObservabilityConfig struct {
Realm string `json:"realm"`
}
SplunkObservabilityConfig represents content of SplunkObservability Configuration typical for Agent Object.
type Status ¶
type Status struct { AgentType string `json:"agentType"` AgentVersion string `json:"agentVersion,omitempty"` LastConnection string `json:"lastConnection,omitempty"` NewestStableAgentVersion string `json:"newestStableAgentVersion,omitempty"` NewestBetaAgentVersion string `json:"newestBetaAgentVersion,omitempty"` }
Status holds dynamic content which is not part of the static Agent definition.
type SumoLogicConfig ¶
type SumoLogicConfig struct {
URL string `json:"url"`
}
SumoLogicConfig represents content of Sumo Logic configuration typical for Agent Object.
type ThousandEyesConfig ¶
type ThousandEyesConfig struct{}
ThousandEyesConfig represents content of ThousandEyes Configuration typical for Agent Object.