diff --git a/Makefile b/Makefile index 6cce7618..4ac4c030 100644 --- a/Makefile +++ b/Makefile @@ -107,9 +107,9 @@ check/format: $(call _print_check_step,Checking if files are formatted) ./scripts/check-formatting.sh -.PHONY: generate generate/code generate/diagrams +.PHONY: generate generate/code generate/examples generate/plantuml ## Auto generate files. -generate: generate/code generate/plantuml +generate: generate/code generate/examples generate/plantuml ## Generate Golang code. generate/code: @@ -119,6 +119,11 @@ generate/code: go generate ./... ./docs/mock_example ${MAKE} format/go +## Generate examples from code. +generate/examples: + echo "Generating examples..." + go run internal/cmd/examplegen/main.go + PLANTUML_JAR_URL := https://sourceforge.net/projects/plantuml/files/plantuml.jar/download PLANTUML_JAR := $(BIN_DIR)/plantuml.jar DIAGRAMS_PATH ?= . diff --git a/internal/cmd/examplegen/main.go b/internal/cmd/examplegen/main.go index 6af1d398..79f8bc7d 100644 --- a/internal/cmd/examplegen/main.go +++ b/internal/cmd/examplegen/main.go @@ -59,6 +59,8 @@ func getV1alphaExamplesConfigs() []examplesGeneratorConfig { v1alphaExamples.Service(), v1alphaExamples.AlertMethod(), v1alphaExamples.SLO(), + v1alphaExamples.Agent(), + v1alphaExamples.Direct(), } for _, examples := range allExamples { object := examples[0].GetObject().(manifest.Object) @@ -104,11 +106,13 @@ func getV1alphaExamplesConfigs() []examplesGeneratorConfig { configs = append(configs, config) } } - // config = append(config, getV1alphaSLOExamplesConfigs(path)...) return configs } func writeExamples(v any, path string, comments yaml.CommentMap) error { + if err := os.MkdirAll(filepath.Dir(path), 0o700); err != nil { + return err + } file, err := os.Create(path) if err != nil { return err diff --git a/internal/manifest/v1alpha/examples/alert_policy.go b/internal/manifest/v1alpha/examples/alert_policy.go index bd0243d8..6bfcdab2 100644 --- a/internal/manifest/v1alpha/examples/alert_policy.go +++ b/internal/manifest/v1alpha/examples/alert_policy.go @@ -1,3 +1 @@ package v1alphaExamples - - diff --git a/internal/manifest/v1alpha/examples/direct.go b/internal/manifest/v1alpha/examples/direct.go index b1ba2c5e..2f36363f 100644 --- a/internal/manifest/v1alpha/examples/direct.go +++ b/internal/manifest/v1alpha/examples/direct.go @@ -179,7 +179,7 @@ const gcloudServiceAccountKey = `{ "type": "service_account", "project_id": "prod-app", "private_key_id": "669180ba44964eddba9e2f6623721381", - "private_key": "-----BEGIN PRIVATE KEY-----\nKEY_GOES_HERE\n-----END PRIVATE KEY-----\n", + "private_key": "-----BEGIN PRIVATE KEY-----\nSECRET_KEY_GOES_HERE\n-----END PRIVATE KEY-----\n", "client_email": "nobl9@nobl9.iam.gserviceaccount.com", "client_id": "eddba9e2f66237213812", "auth_uri": "https://accounts.google.com/o/oauth2/auth", diff --git a/internal/manifest/v1alpha/examples/direct_test.go b/internal/manifest/v1alpha/examples/direct_test.go index 64566736..7521c599 100644 --- a/internal/manifest/v1alpha/examples/direct_test.go +++ b/internal/manifest/v1alpha/examples/direct_test.go @@ -12,7 +12,7 @@ func TestDirect_SupportsAllDirectTypes(t *testing.T) { variants := Direct() for _, typ := range v1alpha.DataSourceTypeValues() { if !v1alphaDirect.IsValidDirectType(typ) { - continue + continue } if !slices.ContainsFunc(variants, func(e Example) bool { return e.(directExample).typ == typ diff --git a/manifest/v1alpha/agent/examples/amazonprometheus.yaml b/manifest/v1alpha/agent/examples/amazonprometheus.yaml new file mode 100644 index 00000000..81b87bc3 --- /dev/null +++ b/manifest/v1alpha/agent/examples/amazonprometheus.yaml @@ -0,0 +1,23 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: amazonprometheus + displayName: AmazonPrometheus Agent + project: default + spec: + description: Example AmazonPrometheus Agent + releaseChannel: stable + amazonPrometheus: + url: https://aps-workspaces.us-east-1.amazonaws.com/workspaces/ws-f49ecf99-6dfa-4b00-9f94-a50b10a3010b + region: us-east-1 + historicalDataRetrieval: + maxDuration: + value: 30 + unit: Day + defaultDuration: + value: 15 + unit: Day + queryDelay: + duration: + value: 1 + unit: Second diff --git a/manifest/v1alpha/agent/examples/appdynamics.yaml b/manifest/v1alpha/agent/examples/appdynamics.yaml new file mode 100644 index 00000000..d709380d --- /dev/null +++ b/manifest/v1alpha/agent/examples/appdynamics.yaml @@ -0,0 +1,22 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: appdynamics + displayName: AppDynamics Agent + project: default + spec: + description: Example AppDynamics Agent + releaseChannel: stable + appDynamics: + url: https://my-org.saas.appdynamics.com + historicalDataRetrieval: + maxDuration: + value: 30 + unit: Day + defaultDuration: + value: 15 + unit: Day + queryDelay: + duration: + value: 2 + unit: Minute diff --git a/manifest/v1alpha/agent/examples/azuremonitor.yaml b/manifest/v1alpha/agent/examples/azuremonitor.yaml new file mode 100644 index 00000000..e936f84c --- /dev/null +++ b/manifest/v1alpha/agent/examples/azuremonitor.yaml @@ -0,0 +1,22 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: azuremonitor + displayName: AzureMonitor Agent + project: default + spec: + description: Example AzureMonitor Agent + releaseChannel: stable + azureMonitor: + tenantId: 5cdecca3-c2c5-4072-89dd-5555faf05202 + historicalDataRetrieval: + maxDuration: + value: 30 + unit: Day + defaultDuration: + value: 15 + unit: Day + queryDelay: + duration: + value: 6 + unit: Minute diff --git a/manifest/v1alpha/agent/examples/azureprometheus.yaml b/manifest/v1alpha/agent/examples/azureprometheus.yaml new file mode 100644 index 00000000..4625fa1d --- /dev/null +++ b/manifest/v1alpha/agent/examples/azureprometheus.yaml @@ -0,0 +1,23 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: azureprometheus + displayName: AzurePrometheus Agent + project: default + spec: + description: Example AzurePrometheus Agent + releaseChannel: stable + azurePrometheus: + url: https://defaultazuremonitorworkspace-westus2-szxw.westus2.prometheus.monitor.azure.com + tenantId: 41372654-f4b6-4bd1-a3fe-75629c024df1 + historicalDataRetrieval: + maxDuration: + value: 30 + unit: Day + defaultDuration: + value: 15 + unit: Day + queryDelay: + duration: + value: 1 + unit: Second diff --git a/manifest/v1alpha/agent/examples/bigquery.yaml b/manifest/v1alpha/agent/examples/bigquery.yaml new file mode 100644 index 00000000..3405388f --- /dev/null +++ b/manifest/v1alpha/agent/examples/bigquery.yaml @@ -0,0 +1,14 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: bigquery + displayName: BigQuery Agent + project: default + spec: + description: Example BigQuery Agent + releaseChannel: stable + bigQuery: {} + queryDelay: + duration: + value: 1 + unit: Second diff --git a/manifest/v1alpha/agent/examples/cloudwatch.yaml b/manifest/v1alpha/agent/examples/cloudwatch.yaml new file mode 100644 index 00000000..d267aa58 --- /dev/null +++ b/manifest/v1alpha/agent/examples/cloudwatch.yaml @@ -0,0 +1,21 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: cloudwatch + displayName: CloudWatch Agent + project: default + spec: + description: Example CloudWatch Agent + releaseChannel: stable + cloudWatch: {} + historicalDataRetrieval: + maxDuration: + value: 15 + unit: Day + defaultDuration: + value: 7 + unit: Day + queryDelay: + duration: + value: 2 + unit: Minute diff --git a/manifest/v1alpha/agent/examples/datadog.yaml b/manifest/v1alpha/agent/examples/datadog.yaml new file mode 100644 index 00000000..ffe25ab0 --- /dev/null +++ b/manifest/v1alpha/agent/examples/datadog.yaml @@ -0,0 +1,22 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: datadog + displayName: Datadog Agent + project: default + spec: + description: Example Datadog Agent + releaseChannel: stable + datadog: + site: com + historicalDataRetrieval: + maxDuration: + value: 30 + unit: Day + defaultDuration: + value: 15 + unit: Day + queryDelay: + duration: + value: 2 + unit: Minute diff --git a/manifest/v1alpha/agent/examples/dynatrace.yaml b/manifest/v1alpha/agent/examples/dynatrace.yaml new file mode 100644 index 00000000..c8636c4c --- /dev/null +++ b/manifest/v1alpha/agent/examples/dynatrace.yaml @@ -0,0 +1,22 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: dynatrace + displayName: Dynatrace Agent + project: default + spec: + description: Example Dynatrace Agent + releaseChannel: stable + dynatrace: + url: https://zvf10945.live.dynatrace.com/ + historicalDataRetrieval: + maxDuration: + value: 28 + unit: Day + defaultDuration: + value: 14 + unit: Day + queryDelay: + duration: + value: 3 + unit: Minute diff --git a/manifest/v1alpha/agent/examples/elasticsearch.yaml b/manifest/v1alpha/agent/examples/elasticsearch.yaml new file mode 100644 index 00000000..786c435f --- /dev/null +++ b/manifest/v1alpha/agent/examples/elasticsearch.yaml @@ -0,0 +1,15 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: elasticsearch + displayName: Elasticsearch Agent + project: default + spec: + description: Example Elasticsearch Agent + releaseChannel: stable + elasticsearch: + url: http://elasticsearch-main.elasticsearch:9200 + queryDelay: + duration: + value: 2 + unit: Minute diff --git a/manifest/v1alpha/agent/examples/generic.yaml b/manifest/v1alpha/agent/examples/generic.yaml new file mode 100644 index 00000000..69a6590f --- /dev/null +++ b/manifest/v1alpha/agent/examples/generic.yaml @@ -0,0 +1,14 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: generic + displayName: Generic Agent + project: default + spec: + description: Example Generic Agent + releaseChannel: stable + generic: {} + queryDelay: + duration: + value: 1 + unit: Second diff --git a/manifest/v1alpha/agent/examples/googlecloudmonitoring.yaml b/manifest/v1alpha/agent/examples/googlecloudmonitoring.yaml new file mode 100644 index 00000000..9de7a233 --- /dev/null +++ b/manifest/v1alpha/agent/examples/googlecloudmonitoring.yaml @@ -0,0 +1,21 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: googlecloudmonitoring + displayName: GoogleCloudMonitoring Agent + project: default + spec: + description: Example GoogleCloudMonitoring Agent + releaseChannel: stable + gcm: {} + historicalDataRetrieval: + maxDuration: + value: 30 + unit: Day + defaultDuration: + value: 15 + unit: Day + queryDelay: + duration: + value: 3 + unit: Minute diff --git a/manifest/v1alpha/agent/examples/grafanaloki.yaml b/manifest/v1alpha/agent/examples/grafanaloki.yaml new file mode 100644 index 00000000..b9506e71 --- /dev/null +++ b/manifest/v1alpha/agent/examples/grafanaloki.yaml @@ -0,0 +1,15 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: grafanaloki + displayName: GrafanaLoki Agent + project: default + spec: + description: Example GrafanaLoki Agent + releaseChannel: stable + grafanaLoki: + url: http://grafana-loki.loki:3100 + queryDelay: + duration: + value: 2 + unit: Minute diff --git a/manifest/v1alpha/agent/examples/graphite.yaml b/manifest/v1alpha/agent/examples/graphite.yaml new file mode 100644 index 00000000..ee9a6491 --- /dev/null +++ b/manifest/v1alpha/agent/examples/graphite.yaml @@ -0,0 +1,22 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: graphite + displayName: Graphite Agent + project: default + spec: + description: Example Graphite Agent + releaseChannel: stable + graphite: + url: http://graphite.graphite:8080/render + historicalDataRetrieval: + maxDuration: + value: 30 + unit: Day + defaultDuration: + value: 15 + unit: Day + queryDelay: + duration: + value: 2 + unit: Minute diff --git a/manifest/v1alpha/agent/examples/honeycomb.yaml b/manifest/v1alpha/agent/examples/honeycomb.yaml new file mode 100644 index 00000000..047fe0ff --- /dev/null +++ b/manifest/v1alpha/agent/examples/honeycomb.yaml @@ -0,0 +1,21 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: honeycomb + displayName: Honeycomb Agent + project: default + spec: + description: Example Honeycomb Agent + releaseChannel: stable + honeycomb: {} + historicalDataRetrieval: + maxDuration: + value: 7 + unit: Day + defaultDuration: + value: 3 + unit: Day + queryDelay: + duration: + value: 6 + unit: Minute diff --git a/manifest/v1alpha/agent/examples/influxdb.yaml b/manifest/v1alpha/agent/examples/influxdb.yaml new file mode 100644 index 00000000..919ae85e --- /dev/null +++ b/manifest/v1alpha/agent/examples/influxdb.yaml @@ -0,0 +1,15 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: influxdb + displayName: InfluxDB Agent + project: default + spec: + description: Example InfluxDB Agent + releaseChannel: stable + influxdb: + url: https://us-west-2-2.aws.cloud2.influxdata.com + queryDelay: + duration: + value: 2 + unit: Minute diff --git a/manifest/v1alpha/agent/examples/instana.yaml b/manifest/v1alpha/agent/examples/instana.yaml new file mode 100644 index 00000000..fa187e1f --- /dev/null +++ b/manifest/v1alpha/agent/examples/instana.yaml @@ -0,0 +1,15 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: instana + displayName: Instana Agent + project: default + spec: + description: Example Instana Agent + releaseChannel: stable + instana: + url: https://orange-my-org12.instana.io + queryDelay: + duration: + value: 2 + unit: Minute diff --git a/manifest/v1alpha/agent/examples/lightstep.yaml b/manifest/v1alpha/agent/examples/lightstep.yaml new file mode 100644 index 00000000..dc202b00 --- /dev/null +++ b/manifest/v1alpha/agent/examples/lightstep.yaml @@ -0,0 +1,24 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: lightstep + displayName: Lightstep Agent + project: default + spec: + description: Example Lightstep Agent + releaseChannel: stable + lightstep: + organization: MyOrg + project: prod-app + url: https://api.lightstep.com + historicalDataRetrieval: + maxDuration: + value: 30 + unit: Day + defaultDuration: + value: 15 + unit: Day + queryDelay: + duration: + value: 3 + unit: Minute diff --git a/manifest/v1alpha/agent/examples/logicmonitor.yaml b/manifest/v1alpha/agent/examples/logicmonitor.yaml new file mode 100644 index 00000000..6634ec98 --- /dev/null +++ b/manifest/v1alpha/agent/examples/logicmonitor.yaml @@ -0,0 +1,15 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: logicmonitor + displayName: LogicMonitor Agent + project: default + spec: + description: Example LogicMonitor Agent + releaseChannel: stable + logicMonitor: + account: myaccountname + queryDelay: + duration: + value: 3 + unit: Minute diff --git a/manifest/v1alpha/agent/examples/newrelic.yaml b/manifest/v1alpha/agent/examples/newrelic.yaml new file mode 100644 index 00000000..7bc0051d --- /dev/null +++ b/manifest/v1alpha/agent/examples/newrelic.yaml @@ -0,0 +1,22 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: newrelic + displayName: NewRelic Agent + project: default + spec: + description: Example NewRelic Agent + releaseChannel: stable + newRelic: + accountId: 1234567 + historicalDataRetrieval: + maxDuration: + value: 30 + unit: Day + defaultDuration: + value: 15 + unit: Day + queryDelay: + duration: + value: 2 + unit: Minute diff --git a/manifest/v1alpha/agent/examples/opentsdb.yaml b/manifest/v1alpha/agent/examples/opentsdb.yaml new file mode 100644 index 00000000..b4df2955 --- /dev/null +++ b/manifest/v1alpha/agent/examples/opentsdb.yaml @@ -0,0 +1,15 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: opentsdb + displayName: OpenTSDB Agent + project: default + spec: + description: Example OpenTSDB Agent + releaseChannel: stable + opentsdb: + url: http://opentsdb.opentsdb:4242 + queryDelay: + duration: + value: 2 + unit: Minute diff --git a/manifest/v1alpha/agent/examples/pingdom.yaml b/manifest/v1alpha/agent/examples/pingdom.yaml new file mode 100644 index 00000000..06c335bc --- /dev/null +++ b/manifest/v1alpha/agent/examples/pingdom.yaml @@ -0,0 +1,14 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: pingdom + displayName: Pingdom Agent + project: default + spec: + description: Example Pingdom Agent + releaseChannel: stable + pingdom: {} + queryDelay: + duration: + value: 2 + unit: Minute diff --git a/manifest/v1alpha/agent/examples/prometheus.yaml b/manifest/v1alpha/agent/examples/prometheus.yaml new file mode 100644 index 00000000..5f408fe6 --- /dev/null +++ b/manifest/v1alpha/agent/examples/prometheus.yaml @@ -0,0 +1,22 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: prometheus + displayName: Prometheus Agent + project: default + spec: + description: Example Prometheus Agent + releaseChannel: stable + prometheus: + url: http://prometheus.prometheus:9090 + historicalDataRetrieval: + maxDuration: + value: 30 + unit: Day + defaultDuration: + value: 15 + unit: Day + queryDelay: + duration: + value: 1 + unit: Second diff --git a/manifest/v1alpha/agent/examples/redshift.yaml b/manifest/v1alpha/agent/examples/redshift.yaml new file mode 100644 index 00000000..8a2c0e4e --- /dev/null +++ b/manifest/v1alpha/agent/examples/redshift.yaml @@ -0,0 +1,14 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: redshift + displayName: Redshift Agent + project: default + spec: + description: Example Redshift Agent + releaseChannel: stable + redshift: {} + queryDelay: + duration: + value: 31 + unit: Second diff --git a/manifest/v1alpha/agent/examples/splunk.yaml b/manifest/v1alpha/agent/examples/splunk.yaml new file mode 100644 index 00000000..72d07698 --- /dev/null +++ b/manifest/v1alpha/agent/examples/splunk.yaml @@ -0,0 +1,22 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: splunk + displayName: Splunk Agent + project: default + spec: + description: Example Splunk Agent + releaseChannel: stable + splunk: + url: https://splunk.my-org.com/services + historicalDataRetrieval: + maxDuration: + value: 30 + unit: Day + defaultDuration: + value: 15 + unit: Day + queryDelay: + duration: + value: 6 + unit: Minute diff --git a/manifest/v1alpha/agent/examples/splunkobservability.yaml b/manifest/v1alpha/agent/examples/splunkobservability.yaml new file mode 100644 index 00000000..42e4f067 --- /dev/null +++ b/manifest/v1alpha/agent/examples/splunkobservability.yaml @@ -0,0 +1,15 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: splunkobservability + displayName: SplunkObservability Agent + project: default + spec: + description: Example SplunkObservability Agent + releaseChannel: stable + splunkObservability: + realm: us1 + queryDelay: + duration: + value: 6 + unit: Minute diff --git a/manifest/v1alpha/agent/examples/sumologic.yaml b/manifest/v1alpha/agent/examples/sumologic.yaml new file mode 100644 index 00000000..4b7dc16d --- /dev/null +++ b/manifest/v1alpha/agent/examples/sumologic.yaml @@ -0,0 +1,15 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: sumologic + displayName: SumoLogic Agent + project: default + spec: + description: Example SumoLogic Agent + releaseChannel: stable + sumoLogic: + url: https://service.sumologic.com + queryDelay: + duration: + value: 5 + unit: Minute diff --git a/manifest/v1alpha/agent/examples/thousandeyes.yaml b/manifest/v1alpha/agent/examples/thousandeyes.yaml new file mode 100644 index 00000000..e2596cb9 --- /dev/null +++ b/manifest/v1alpha/agent/examples/thousandeyes.yaml @@ -0,0 +1,14 @@ +- apiVersion: n9/v1alpha + kind: Agent + metadata: + name: thousandeyes + displayName: ThousandEyes Agent + project: default + spec: + description: Example ThousandEyes Agent + releaseChannel: stable + thousandEyes: {} + queryDelay: + duration: + value: 2 + unit: Minute diff --git a/manifest/v1alpha/direct/examples/appdynamics.yaml b/manifest/v1alpha/direct/examples/appdynamics.yaml new file mode 100644 index 00000000..ef34df36 --- /dev/null +++ b/manifest/v1alpha/direct/examples/appdynamics.yaml @@ -0,0 +1,26 @@ +- apiVersion: n9/v1alpha + kind: Direct + metadata: + name: appdynamics + displayName: AppDynamics Direct + project: default + spec: + description: Example AppDynamics Direct + releaseChannel: stable + appDynamics: + url: https://my-org.saas.appdynamics.com + clientID: "" + clientName: prod-direct + accountName: my-account + clientSecret: "[secret]" + historicalDataRetrieval: + maxDuration: + value: 30 + unit: Day + defaultDuration: + value: 15 + unit: Day + queryDelay: + duration: + value: 2 + unit: Minute diff --git a/manifest/v1alpha/direct/examples/azuremonitor.yaml b/manifest/v1alpha/direct/examples/azuremonitor.yaml new file mode 100644 index 00000000..bb4ea766 --- /dev/null +++ b/manifest/v1alpha/direct/examples/azuremonitor.yaml @@ -0,0 +1,24 @@ +- apiVersion: n9/v1alpha + kind: Direct + metadata: + name: azuremonitor + displayName: AzureMonitor Direct + project: default + spec: + description: Example AzureMonitor Direct + releaseChannel: stable + azureMonitor: + tenantId: 5cdecca3-c2c5-4072-89dd-5555faf05202 + clientId: 70747025-9367-41a5-98f1-59b18b5793c3 + clientSecret: "[secret]" + historicalDataRetrieval: + maxDuration: + value: 30 + unit: Day + defaultDuration: + value: 15 + unit: Day + queryDelay: + duration: + value: 6 + unit: Minute diff --git a/manifest/v1alpha/direct/examples/bigquery.yaml b/manifest/v1alpha/direct/examples/bigquery.yaml new file mode 100644 index 00000000..3b388a16 --- /dev/null +++ b/manifest/v1alpha/direct/examples/bigquery.yaml @@ -0,0 +1,27 @@ +- apiVersion: n9/v1alpha + kind: Direct + metadata: + name: bigquery + displayName: BigQuery Direct + project: default + spec: + description: Example BigQuery Direct + releaseChannel: stable + bigQuery: + serviceAccountKey: |- + { + "type": "service_account", + "project_id": "prod-app", + "private_key_id": "669180ba44964eddba9e2f6623721381", + "private_key": "-----BEGIN PRIVATE KEY-----\nSECRET_KEY_GOES_HERE\n-----END PRIVATE KEY-----\n", + "client_email": "nobl9@nobl9.iam.gserviceaccount.com", + "client_id": "eddba9e2f66237213812", + "auth_uri": "https://accounts.google.com/o/oauth2/auth", + "token_uri": "https://oauth2.googleapis.com/token", + "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", + "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/nobl9%40nobl9.iam.gserviceaccount.com" + } + queryDelay: + duration: + value: 1 + unit: Second diff --git a/manifest/v1alpha/direct/examples/cloudwatch.yaml b/manifest/v1alpha/direct/examples/cloudwatch.yaml new file mode 100644 index 00000000..da8c5f8a --- /dev/null +++ b/manifest/v1alpha/direct/examples/cloudwatch.yaml @@ -0,0 +1,22 @@ +- apiVersion: n9/v1alpha + kind: Direct + metadata: + name: cloudwatch + displayName: CloudWatch Direct + project: default + spec: + description: Example CloudWatch Direct + releaseChannel: stable + cloudWatch: + roleARN: arn:aws:iam::123456578901:role/awsCrossAccountProdCloudwatch-prod-app + historicalDataRetrieval: + maxDuration: + value: 15 + unit: Day + defaultDuration: + value: 7 + unit: Day + queryDelay: + duration: + value: 2 + unit: Minute diff --git a/manifest/v1alpha/direct/examples/datadog.yaml b/manifest/v1alpha/direct/examples/datadog.yaml new file mode 100644 index 00000000..569523d5 --- /dev/null +++ b/manifest/v1alpha/direct/examples/datadog.yaml @@ -0,0 +1,24 @@ +- apiVersion: n9/v1alpha + kind: Direct + metadata: + name: datadog + displayName: Datadog Direct + project: default + spec: + description: Example Datadog Direct + releaseChannel: stable + datadog: + site: com + apiKey: "[secret]" + applicationKey: "[secret]" + historicalDataRetrieval: + maxDuration: + value: 30 + unit: Day + defaultDuration: + value: 15 + unit: Day + queryDelay: + duration: + value: 2 + unit: Minute diff --git a/manifest/v1alpha/direct/examples/dynatrace.yaml b/manifest/v1alpha/direct/examples/dynatrace.yaml new file mode 100644 index 00000000..a4f735e9 --- /dev/null +++ b/manifest/v1alpha/direct/examples/dynatrace.yaml @@ -0,0 +1,23 @@ +- apiVersion: n9/v1alpha + kind: Direct + metadata: + name: dynatrace + displayName: Dynatrace Direct + project: default + spec: + description: Example Dynatrace Direct + releaseChannel: stable + dynatrace: + url: https://zvf10945.live.dynatrace.com/ + dynatraceToken: "[secret]" + historicalDataRetrieval: + maxDuration: + value: 28 + unit: Day + defaultDuration: + value: 14 + unit: Day + queryDelay: + duration: + value: 3 + unit: Minute diff --git a/manifest/v1alpha/direct/examples/googlecloudmonitoring.yaml b/manifest/v1alpha/direct/examples/googlecloudmonitoring.yaml new file mode 100644 index 00000000..ab1e9490 --- /dev/null +++ b/manifest/v1alpha/direct/examples/googlecloudmonitoring.yaml @@ -0,0 +1,34 @@ +- apiVersion: n9/v1alpha + kind: Direct + metadata: + name: googlecloudmonitoring + displayName: GoogleCloudMonitoring Direct + project: default + spec: + description: Example GoogleCloudMonitoring Direct + releaseChannel: stable + gcm: + serviceAccountKey: |- + { + "type": "service_account", + "project_id": "prod-app", + "private_key_id": "669180ba44964eddba9e2f6623721381", + "private_key": "-----BEGIN PRIVATE KEY-----\nSECRET_KEY_GOES_HERE\n-----END PRIVATE KEY-----\n", + "client_email": "nobl9@nobl9.iam.gserviceaccount.com", + "client_id": "eddba9e2f66237213812", + "auth_uri": "https://accounts.google.com/o/oauth2/auth", + "token_uri": "https://oauth2.googleapis.com/token", + "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", + "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/nobl9%40nobl9.iam.gserviceaccount.com" + } + historicalDataRetrieval: + maxDuration: + value: 30 + unit: Day + defaultDuration: + value: 15 + unit: Day + queryDelay: + duration: + value: 3 + unit: Minute diff --git a/manifest/v1alpha/direct/examples/honeycomb.yaml b/manifest/v1alpha/direct/examples/honeycomb.yaml new file mode 100644 index 00000000..3505db7e --- /dev/null +++ b/manifest/v1alpha/direct/examples/honeycomb.yaml @@ -0,0 +1,22 @@ +- apiVersion: n9/v1alpha + kind: Direct + metadata: + name: honeycomb + displayName: Honeycomb Direct + project: default + spec: + description: Example Honeycomb Direct + releaseChannel: stable + honeycomb: + apiKey: "[secret]" + historicalDataRetrieval: + maxDuration: + value: 7 + unit: Day + defaultDuration: + value: 3 + unit: Day + queryDelay: + duration: + value: 6 + unit: Minute diff --git a/manifest/v1alpha/direct/examples/influxdb.yaml b/manifest/v1alpha/direct/examples/influxdb.yaml new file mode 100644 index 00000000..c2658b0a --- /dev/null +++ b/manifest/v1alpha/direct/examples/influxdb.yaml @@ -0,0 +1,17 @@ +- apiVersion: n9/v1alpha + kind: Direct + metadata: + name: influxdb + displayName: InfluxDB Direct + project: default + spec: + description: Example InfluxDB Direct + releaseChannel: stable + influxdb: + url: https://us-west-2-2.aws.cloud2.influxdata.com + apiToken: "[secret]" + organizationID: my-org + queryDelay: + duration: + value: 2 + unit: Minute diff --git a/manifest/v1alpha/direct/examples/instana.yaml b/manifest/v1alpha/direct/examples/instana.yaml new file mode 100644 index 00000000..d9b764e5 --- /dev/null +++ b/manifest/v1alpha/direct/examples/instana.yaml @@ -0,0 +1,16 @@ +- apiVersion: n9/v1alpha + kind: Direct + metadata: + name: instana + displayName: Instana Direct + project: default + spec: + description: Example Instana Direct + releaseChannel: stable + instana: + apiToken: "[secret]" + url: https://orange-my-org12.instana.io + queryDelay: + duration: + value: 2 + unit: Minute diff --git a/manifest/v1alpha/direct/examples/lightstep.yaml b/manifest/v1alpha/direct/examples/lightstep.yaml new file mode 100644 index 00000000..e9a0e1a6 --- /dev/null +++ b/manifest/v1alpha/direct/examples/lightstep.yaml @@ -0,0 +1,25 @@ +- apiVersion: n9/v1alpha + kind: Direct + metadata: + name: lightstep + displayName: Lightstep Direct + project: default + spec: + description: Example Lightstep Direct + releaseChannel: stable + lightstep: + organization: MyOrg + project: prod-app + appToken: "[secret]" + url: https://api.lightstep.com + historicalDataRetrieval: + maxDuration: + value: 30 + unit: Day + defaultDuration: + value: 15 + unit: Day + queryDelay: + duration: + value: 3 + unit: Minute diff --git a/manifest/v1alpha/direct/examples/logicmonitor.yaml b/manifest/v1alpha/direct/examples/logicmonitor.yaml new file mode 100644 index 00000000..b0a713e8 --- /dev/null +++ b/manifest/v1alpha/direct/examples/logicmonitor.yaml @@ -0,0 +1,17 @@ +- apiVersion: n9/v1alpha + kind: Direct + metadata: + name: logicmonitor + displayName: LogicMonitor Direct + project: default + spec: + description: Example LogicMonitor Direct + releaseChannel: stable + logicMonitor: + account: myaccountname + accessId: 9xA2BssShK21ld9LoOYu + accessKey: "[secret]" + queryDelay: + duration: + value: 3 + unit: Minute diff --git a/manifest/v1alpha/direct/examples/newrelic.yaml b/manifest/v1alpha/direct/examples/newrelic.yaml new file mode 100644 index 00000000..90bb6e2e --- /dev/null +++ b/manifest/v1alpha/direct/examples/newrelic.yaml @@ -0,0 +1,23 @@ +- apiVersion: n9/v1alpha + kind: Direct + metadata: + name: newrelic + displayName: NewRelic Direct + project: default + spec: + description: Example NewRelic Direct + releaseChannel: stable + newRelic: + accountId: 1234567 + insightsQueryKey: NRIQ-2f66237213814496669180ba + historicalDataRetrieval: + maxDuration: + value: 30 + unit: Day + defaultDuration: + value: 15 + unit: Day + queryDelay: + duration: + value: 2 + unit: Minute diff --git a/manifest/v1alpha/direct/examples/pingdom.yaml b/manifest/v1alpha/direct/examples/pingdom.yaml new file mode 100644 index 00000000..2bf84e52 --- /dev/null +++ b/manifest/v1alpha/direct/examples/pingdom.yaml @@ -0,0 +1,15 @@ +- apiVersion: n9/v1alpha + kind: Direct + metadata: + name: pingdom + displayName: Pingdom Direct + project: default + spec: + description: Example Pingdom Direct + releaseChannel: stable + pingdom: + apiToken: "[secret]" + queryDelay: + duration: + value: 2 + unit: Minute diff --git a/manifest/v1alpha/direct/examples/redshift.yaml b/manifest/v1alpha/direct/examples/redshift.yaml new file mode 100644 index 00000000..7e4afd84 --- /dev/null +++ b/manifest/v1alpha/direct/examples/redshift.yaml @@ -0,0 +1,18 @@ +- apiVersion: n9/v1alpha + kind: Direct + metadata: + name: redshift + displayName: Redshift Direct + project: default + spec: + description: Example Redshift Direct + releaseChannel: stable + redshift: + accessKeyID: AKIA4NPYKXO34R341XUX + secretAccessKey: "[secret]" + secretARN: arn:aws:secretsmanager:eu-central-1:123456578901:secret:prod-redshift-db-user + roleARN: arn:aws:iam::123456578901:role/awsCrossAccountProdRedshift-prod-app + queryDelay: + duration: + value: 31 + unit: Second diff --git a/manifest/v1alpha/direct/examples/splunk.yaml b/manifest/v1alpha/direct/examples/splunk.yaml new file mode 100644 index 00000000..279b99f3 --- /dev/null +++ b/manifest/v1alpha/direct/examples/splunk.yaml @@ -0,0 +1,23 @@ +- apiVersion: n9/v1alpha + kind: Direct + metadata: + name: splunk + displayName: Splunk Direct + project: default + spec: + description: Example Splunk Direct + releaseChannel: stable + splunk: + url: https://splunk.my-org.com/services + accessToken: "[secret]" + historicalDataRetrieval: + maxDuration: + value: 30 + unit: Day + defaultDuration: + value: 15 + unit: Day + queryDelay: + duration: + value: 6 + unit: Minute diff --git a/manifest/v1alpha/direct/examples/splunkobservability.yaml b/manifest/v1alpha/direct/examples/splunkobservability.yaml new file mode 100644 index 00000000..e5c2ce44 --- /dev/null +++ b/manifest/v1alpha/direct/examples/splunkobservability.yaml @@ -0,0 +1,16 @@ +- apiVersion: n9/v1alpha + kind: Direct + metadata: + name: splunkobservability + displayName: SplunkObservability Direct + project: default + spec: + description: Example SplunkObservability Direct + releaseChannel: stable + splunkObservability: + realm: us1 + accessToken: "[secret]" + queryDelay: + duration: + value: 6 + unit: Minute diff --git a/manifest/v1alpha/direct/examples/sumologic.yaml b/manifest/v1alpha/direct/examples/sumologic.yaml new file mode 100644 index 00000000..f95e56bc --- /dev/null +++ b/manifest/v1alpha/direct/examples/sumologic.yaml @@ -0,0 +1,17 @@ +- apiVersion: n9/v1alpha + kind: Direct + metadata: + name: sumologic + displayName: SumoLogic Direct + project: default + spec: + description: Example SumoLogic Direct + releaseChannel: stable + sumoLogic: + accessID: wzeulXAULylic8 + accessKey: "[secret]" + url: https://service.sumologic.com + queryDelay: + duration: + value: 5 + unit: Minute diff --git a/manifest/v1alpha/direct/examples/thousandeyes.yaml b/manifest/v1alpha/direct/examples/thousandeyes.yaml new file mode 100644 index 00000000..d5c03a41 --- /dev/null +++ b/manifest/v1alpha/direct/examples/thousandeyes.yaml @@ -0,0 +1,15 @@ +- apiVersion: n9/v1alpha + kind: Direct + metadata: + name: thousandeyes + displayName: ThousandEyes Direct + project: default + spec: + description: Example ThousandEyes Direct + releaseChannel: stable + thousandEyes: + oauthBearerToken: "[secret]" + queryDelay: + duration: + value: 2 + unit: Minute