diff --git a/collector/config-k8s/values-oteldemo.yaml b/collector/config-k8s/values-oteldemo.yaml index a610a52..46b9448 100644 --- a/collector/config-k8s/values-oteldemo.yaml +++ b/collector/config-k8s/values-oteldemo.yaml @@ -13,36 +13,70 @@ opentelemetry-collector: config: processors: k8sattributes: + passthrough: false + filter: + node_from_env_var: K8S_NODE_NAME + pod_association: + # Pod assocations are used to extract a pod ID from one or more sources. + # These are used to match up telemetry. + # Each has a maximum of 4 association sources. + - sources: + - from: resource_attribute + name: k8s.pod.uid + - sources: + - from: resource_attribute + name: k8s.pod.name + - from: resource_attribute + name: k8s.namespace.name + - from: resource_attribute + name: k8s.node.name + - sources: + - from: resource_attribute + name: k8s.pod.ip + - sources: + - from: resource_attribute + name: k8s.pod.name + - from: resource_attribute + name: k8s.namespace.name + - sources: + - from: connection extract: + labels: + - tag_name: service.name + key: app.kubernetes.io/name + from: pod + - tag_name: service.name + key: k8s-app + from: pod + - tag_name: k8s.app.instance + key: app.kubernetes.io/instance + from: pod + - tag_name: service.version + key: app.kubernetes.io/version + from: pod + - tag_name: k8s.app.component + key: app.kubernetes.io/component + from: pod metadata: - k8s.namespace.name + - k8s.pod.name + - k8s.pod.uid + - k8s.node.name + - k8s.pod.start_time - k8s.deployment.name - - k8s.deployment.uid - - k8s.statefulset.name - - k8s.statefulset.uid + - k8s.replicaset.name + - k8s.replicaset.uid - k8s.daemonset.name - k8s.daemonset.uid - - k8s.cronjob.name - k8s.job.name - k8s.job.uid - - k8s.node.name - - k8s.pod.name - - k8s.pod.uid - k8s.container.name + - k8s.cronjob.name + - k8s.statefulset.name + - k8s.statefulset.uid - container.image.tag - container.image.name - - k8s.pod.start_time - k8s.cluster.uid - passthrough: false - pod_association: - - sources: - - from: resource_attribute - name: k8s.pod.ip - - sources: - - from: resource_attribute - name: k8s.pod.uid - - sources: - - from: connection exporters: debug: verbosity: normal diff --git a/collector/config/otelcol-docker-hostmetrics.yaml b/collector/config/otelcol-docker-hostmetrics.yaml index 2e2ba49..6d07dbc 100644 --- a/collector/config/otelcol-docker-hostmetrics.yaml +++ b/collector/config/otelcol-docker-hostmetrics.yaml @@ -107,7 +107,7 @@ extensions: health_check: opamp: server: - ws: + http: endpoint: https://opamp.lightstep.com/v1/opamp headers: "Authorization": "Bearer ${LS_OPAMP_API_KEY}" diff --git a/collector/config/otelcol-linux-hostmetrics.yaml b/collector/config/otelcol-linux-hostmetrics.yaml index a768ff0..2722d0d 100644 --- a/collector/config/otelcol-linux-hostmetrics.yaml +++ b/collector/config/otelcol-linux-hostmetrics.yaml @@ -65,7 +65,7 @@ extensions: health_check: opamp: server: - ws: + http: endpoint: https://opamp.lightstep.com/v1/opamp headers: "Authorization": "Bearer ${LS_OPAMP_API_KEY}" diff --git a/collector/config/otelcol-macos-hostmetrics.yaml b/collector/config/otelcol-macos-hostmetrics.yaml index 8740ab6..786b0b9 100644 --- a/collector/config/otelcol-macos-hostmetrics.yaml +++ b/collector/config/otelcol-macos-hostmetrics.yaml @@ -15,8 +15,11 @@ receivers: - 0.0.0.0:8888 hostmetrics: collection_interval: 5s - # cpu and disk not supported by macOS scrapers: + # cpu and disk are only supported if build with CGO_ENABLED=1 + # The ServiceNow collector goreleaser build does this, other builds may not. + cpu: + disk: load: processes: filesystem: diff --git a/collector/config/otelcol-windows-hostmetrics.yaml b/collector/config/otelcol-windows-hostmetrics.yaml index 6106a02..ade8da2 100644 --- a/collector/config/otelcol-windows-hostmetrics.yaml +++ b/collector/config/otelcol-windows-hostmetrics.yaml @@ -65,7 +65,7 @@ extensions: health_check: opamp: server: - ws: + http: endpoint: https://opamp.lightstep.com/v1/opamp headers: "Authorization": "Bearer ${LS_OPAMP_API_KEY}" diff --git a/collector/otelcol-builder.yaml b/collector/otelcol-builder.yaml index 7d71bd6..9437082 100644 --- a/collector/otelcol-builder.yaml +++ b/collector/otelcol-builder.yaml @@ -3,7 +3,7 @@ dist: description: ServiceNow-flavored OpenTelemetry Collector distro output_path: ./otelcol-servicenow otelcol_version: 0.96.0 - version: 0.0.11 + version: 0.0.12 exporters: - gomod: diff --git a/docs/remote-management.md b/docs/remote-management.md new file mode 100644 index 0000000..5948947 --- /dev/null +++ b/docs/remote-management.md @@ -0,0 +1,24 @@ +## Remote Management with the ServiceNow Collector + +Version `0.11.0` and later of the ServiceNow Collector contain the [`opamp` extension](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/opampextension). + +The opAMP extension can be used to connect to an opAMP server for remote management, including Cloud Observability. + +More information about the opAMP remote management protocol is available on the [OpenTelemetry community site](https://opentelemetry.io/docs/specs/opamp/). + +### Connecting to Cloud Observability + +By default, most default configuration files in release packages will be configured for opAMP. A ][special API Key](https://docs.lightstep.com/docs/create-and-manage-api-keys) is needed to connect to Cloud Observability's opAMP service. + +The extension is configured via the `opamp` key under `extensions`. Below is an example: + +```yaml +extensions: + health_check: + opamp: + server: + http: + endpoint: https://opamp.lightstep.com/v1/opamp + headers: + "Authorization": "Bearer ${LS_OPAMP_API_KEY}" +``` \ No newline at end of file