중요
Agent Control currently only supports Kubernetes. The configurations and examples provided in this document are specific to this environment.
Agent Control provides two methods for managing agent configurations:
Local configuration: A comprehensive
values.yaml
file used during the initial Helm installation.Remote configuration: A centralized, YAML-based configuration you create in New Relic Control that is remotely deployed to your entire fleet.
Remote configuration is the recommended method for day-to-day management. It ensures consistent agent behavior across your environment, simplifies change management, and enables you to scale without manually updating local YAML files on each host.
팁
The values-newrelic.yaml
file, which traditionally defined New Relic agent settings, now also includes configuration for Agent Control. The parameters you define in this file determine how both Agent Control and its managed agents operate. This file is referred to as the local configuration.
Understanding the two layers of configuration
Agent Control's configuration is structured in two layers:
Agent Control's core configuration: These are the top-level settings that control how Agent Control operates, such as its connection to New Relic, its identity, and fleet management details.
Managed agents' configurations: These are the individual
chart_values
for each subagent (e.g., Infrastructure Agent, Fluent Bit) that Agent Control deploys and manages.
When a local and remote configuration are both present, Agent Control applies the following logic:
- Remote configuration takes precedence. Any settings defined in a remote configuration from New Relic Control will override the corresponding settings in the local
values.yaml
file. - To intentionally override remote settings with your local configuration, you can deploy an empty remote configuration via New Relic Control. This change will apply to all clusters in the selected fleet.
Kubernetes configuration
These instructions and examples apply to Agent Control running on a Kubernetes cluster.
Local values.yaml
configuration for Kubernetes
The local configuration file for Kubernetes, used during installation, contains all the settings for Agent Control and its managed agents.
This example shows the two layers of configuration within a single file.
이 샘플은 두 가지 관리 에이전트( Kubernetes 에이전트 에이전트 및 포워딩용 Fluent Bit 와 함께 에이전트 제어를 구성하는 방법을 보여줍니다. 예를 들어 Fluent Bit 로그 수집기에 대한 상태 지표를 보내지 않으려면 설치 명령을 실행하기 전에 YAML 파일에서 sendMetrics: false
설정하기만 하면 됩니다.
Remote configuration for Kubernetes
원격 설정을 사용하면 환경 전반에서 일관된 에이전트 동작이 보장되고, 변경 관리가 간소화되며, 로컬 YAML 파일을 수동으로 관리하지 않고도 옵저버빌리티를 확장할 수 있습니다.
클러스터 전체에 구성을 중앙에서 배포하려면 Fleet Control의 Configurations [구성] 섹션에서 동일한 YAML 콘텐츠를 정의합니다.그런 다음 원격 구현, 배포의 일부로 클러스터의 전체 집합에 설정을 적용할 수 있습니다. 이것을 원격 설정 파일이라고 합니다.
callout.warning
When you define a configuration in the New Relic Control UI, the YAML structure is different. You only provide the YAML that corresponds to the content
block for a single agent.
Sample configurations: Agent Control on Kubernetes
다음 예는 다양한 에이전트 세트를 관리하기 위해 에이전트 제어를 구성하는 방법을 보여줍니다. 이 설정은 초기 설치 중이나 플릿위험의 원격 설정의 일부로 사용될 수 있습니다.
사용 가능한 모든 구성 설정을 살펴보려면 values-newrelic.yaml
을 참조하세요.
The following examples show how to configure Agent Control with a set of subagents using the local values.yaml
file.
Agent Control with New Relic infrastructure and Fluent Bit
이 예시에서는 배포하다 에이전트 제어를 부하 모니터링 및 Fluent Bit 통해 생성 수집에 사용합니다.
Agent Control with OpenTelemetry and custom collector settings
이 예제는 OpenTelemetry (NRDOT) 수집기의 뉴렐릭 분포를 사용하여 배포하다 에이전트 제어를 수행하고 관리되는 nr-k8s-otel-collector
Helm 차트 에서 filelog
수신기를 비활성화합니다.
중요
Security Best Practice: Do not store sensitive values like your license key directly in the configuration. We recommend using a Kubernetes secret. Agent Control can then securely pull these values from the secret at runtime.
Sample configurations: Remote Agent Configurations on Kubernetes
The following examples show how to configure individual agents remotely from the New Relic Control UI.
원격 설정: 뉴렐릭 인프라
이 예에서는 플릿 위험을 사용하여 Kubernetes 용 뉴렐릭 인프라 에이전트를 원격으로 구성하는 방법을 보여줍니다. enableProcessMetrics: true
설정하여 프로세스 메트릭 수집을 활성화합니다.
원격 설정: Fluent Bit
이 예에서는 플로릿 위험을 통해 원격으로 Fluent Bit 구성했습니다. sendMetrics: true
설정하여 로그 수집기에서 상태 지표 보고를 활성화합니다.
원격 설정: Prometheus
이 예에서는 플릿위험을 사용하여 원격으로 Prometheus 에이전트를 구성합니다. low-data mode
사용하여 Telmetri 볼륨을 줄이고 기본 통합을 비활성화할 수 있습니다.
원격 설정: OpenTelemetry
This example configures the New Relic OpenTelemetry collector and enable lowDataMode
as a valid option.
중요
Security Best Practice: Do not store sensitive values like your license key directly in the configuration. We recommend using a Kubernetes secret. Agent Control can then securely pull these values from the secret at runtime.
Proxy configuration for Kubernetes
Agent Control supports proxy configuration to route traffic through corporate proxies. Proxy settings can be set through environment variables or directly in the configuration file.
프록시 우선순위
에이전트 제어는 다음 우선순위에 따라 프록시 설정을 사용합니다.
proxy
에이전트 Control 설정의 설정 필드HTTP_PROXY
환경 변수HTTPS_PROXY
환경 변수
중요
프록시 설정은 현재 서명 검증을 위한 인증서 가져오기와 호환되지 않습니다. 프록시를 설정해야 하는 경우 다음 옵션을 사용할 수 있습니다.
- 해당 EndPoint에 대한 requests 프록시를 건너뛸 수 있도록
https://newrelic.com
에 예외를 추가합니다(권장). fleet_control.signature_validation.certificate_pem_file_path
통해 로컬 인증서를 사용합니다(인증서 순환은 수동으로 처리해야 함)fleet_control.signature_validation.enabled: false
설정하여 서명 유효성 검사를 비활성화합니다(보안상의 이유로 권장하지 않음)
자체 서명 인증서를 사용한 프록시 설정
자체 서명 인증서를 사용하여 HTTPS 인증을 사용하는 프록시 설정의 경우 CA 인증서 번들을 제공하고 프록시 인증을 구성해야 합니다.
관리형 에이전트에 대한 프록시 설정
주의
에이전트 제어에서 프록시를 구성하면 관리하는 에이전트에 대해 동일한 프록시 설정이 자동으로 구성되지 않습니다 . 각 에이전트에는 해당 에이전트의 특정 설정 형식 및 요구 사항에 따라 별도로 설정해야 하는 자체 프록시 설정이 있습니다.
프록시를 사용하는 경우 각 관리 에이전트에 대한 프록시 설정도 개별적으로 구성해야 합니다. 프록시 설정 옵션은 각 에이전트의 특정 문서를 참조하세요.
비밀 관리
에이전트 Control은 전담 비밀 공급자로부터 비밀번호 및 API 키와 같은 민감한 데이터를 검색하여 관리하는 강력한 메커니즘을 제공합니다. 이렇게 하면 민감한 정보가 설정 파일에 직접 하드코딩되지 않습니다. 현재 이 시스템은 다음과 같은 비밀 공급자를 지원합니다.
- HashiCorp Vault: 설정에서
nr-vault
으로 참조됨. - Kubernetes 비밀: 설정에서
nr-kubesec
이라고 합니다.
설정에서 비밀 정의
비밀을 활용하려면 다음 단계에 따라 에이전트-컨트롤 설정 YAML 파일에서 비밀을 정의하세요.
secrets_providers
섹션 정의: 이 섹션에서 중앙에서 비밀 공급자를 구성합니다. 각 항목이 지원되는 공급자에 해당하는지 확인하세요.- 비밀 소스 구성: 각 공급자에 대해 하나 이상의 소스를 지정합니다. 소스에는 에이전트 제어가 비밀 그룹에 연결하고 검색하는 데 필요한 설정 세부 정보(예: URL, 권한)가 포함됩니다.
- 에이전트 설정에서 플레이스홀더 사용: 실제 민감한 데이터 대신 에이전트 설정 내에서 플레이스홀더 문자열을 사용하세요. 에이전트 제어는 렌더링 프로세스 중에 이러한 플레이스홀더를 검색된 비밀로 자동으로 바꿉니다.
중요
에이전트 제어가 비밀 검색에 실패하면 설정 렌더링이 실패하고 에이전트가 실행되지 않습니다. 에이전트가 불완전하거나 잘못된 설정으로 실행되는 것을 방지하는 중요한 보안 기능입니다.
다음 에이전트 제어 설정 예제는 secrets_providers
섹션 내에서 두 개의 Vault 소스에서 비밀을 검색하도록 구성하는 방법을 보여줍니다.
secrets_providers: vault: sources: local-instance: url: http://localhost:8200/v1/ token: root engine: kv2 remote: url: http://my-remote-server:8200/v1/ token: root engine: kv1
fleet_control: ...
agents: ...
에이전트 설정에서 비밀 사용
소스가 정의된 후 에이전트 설정에서 올바른 경로와 함께 특정 플레이스홀더 구문을 사용하여 볼트를 참조할 수 있습니다. 에이전트 제어는 비밀을 검색하고 이를 사용하여 에이전트가 사용할 최종 설정 파일을 렌더링합니다.
Vault 플레이스홀더를 사용한 에이전트 설정의 예:
config_agent: |+ enable_process_metrics: true custom_attributes: username: "${nr-vault:local-instance:secret:my_secret:username}" organization: "${nr-vault:remote:my_mount:my_path:organization}"
이 예에서:
플레이스홀더 ${nr-vault:local-instance:secret:my_secret:username}
는 로컬 인스턴스 볼트 소스를 사용하여 경로 secret/my_secret
의 비밀에서 키 사용자 이름과 연관된 값을 검색하도록 에이전트 제어에 지시합니다. 플레이스홀더 ${nr-vault:remote:my_mount:my_path:organization}
마찬가지로 원격 소스에서 조직 키 값을 검색합니다.
성공적으로 검색한 후, 에이전트 제어는 지정된 소스와 경로에서 이러한 비밀을 렌더링하고, 해당 에이전트에서 사용할 수 있도록 K8s 비밀 또는 개인 구성 파일에 결과를 저장합니다.
금고 비밀
다음 설정으로 볼트 소스를 설정하세요.
YAML 키 | 설명 |
---|---|
| 데이터를 요청할 URL |
| 엔드포인트에 대한 인증에 사용됩니다. |
|
|
구성 파일에서 Vault에 저장된 각 비밀은 다음과 같은 플레이스홀더를 설정하여 액세스할 수 있습니다.
- source_name:
secrets_providers
에 정의된 Vault 소스의 이름입니다. - mount [마운트]: 시크릿 엔진 마운트의 이름입니다.
- path [경로]: 비밀에 대한 구체적인 경로입니다.
- specific key [특정 키]: 검색할 비밀 내의 특정 키입니다.
전체 플레이스홀더 형식의 예:
"${nr-vault:source_name:my_mount:my_path:my_value}"
Kubernetes 비밀
에이전트 제어 파드에 서비스 계정 및 역할 기반 액세스 제어(RBAC) 등을 통해 필요한 비밀에 액세스할 수 있는 권한이 있는 경우, 에이전트 제어는 별도의 소스를 설정하지 않고도 Kubernetes API 에서 비밀에 직접 액세스할 수 있습니다.
에이전트 설정 파일에서 다음을 지정하는 플레이스홀더를 사용하여 각 비밀 값을 검색합니다.
- namespace [네임스페이스]: 비밀이 있는 Kubernetes 네임스페이스입니다.
- name: Kubernetes 비밀 객체의 이름입니다.
- specific key [특정 키]: 비밀 내에서 값을 검색할 특정 키입니다.
예를 들어, 다음 플레이스홀더 형식을 사용합니다.
"${nr-kubesec:my_namespace:my_secret:my_value}"
비공개 설정
Agent Control은 Agent Control 자체와 관리 에이전트 모두에 구현, 배포에 대한 개인 Helm 렌즈 구성을 지원합니다. 이를 통해 Helm 차트에 직접 접근할 수 있습니다.
주의
개인 Helm 저장소를 사용하는 경우 차트가 호환되어야 하며 차트 내에서 참조된 이미지에 접근할 수 있어야 합니다. 그렇지 않으면 에이전트가 예상대로 작동하지 않습니다.
1. 에이전트에 대한 개인 저장소 활성화
보안상의 이유로, 원격 설정에서는 명시적으로 활성화된만 허용됩니다. 특정 이온을 활성화하려면 에이전트 제어 설정을 업데이트해야 합니다:
그런 다음 허용된 클럽 설정을 뉴렐릭 Control 내의 원격 설정에서 사용할 수 있습니다. 예:
chart_version: "1.2.3"chart_repository: url: "https://my-private-repository-1" name: "my-chart-name" # Optional: use only if the chart name doesn't match New Relic's chart name
또한 agent-control
차트 자체가 비공개 위치에 있는 경우 비공개 위치를 사용하도록 에이전트 제어의 Helm 설치를 구성해야 합니다. 이는 관리 에이전트의 설정과는 별개입니다. installationJob
섹션을 설정하려면 agent-control
Helm 차트 값.yaml 을 참조하세요. 구체적으로:
chartRepositoryUrl
저장소 URL이 포함되어 있습니다name
다른 차트 이름을 사용하는 경우repositorySecretReferenceName
인증을 위한repositoryCertificateSecretReferenceName
(자세한 내용은 아래 인증 섹션 참조)
2. 개인 저장소에 대한 인증 설정
개인 저장소에 액세스하기 위한 인증을 활성화하려면 추가 리소스를 설정해야 합니다.