Documentation ¶
Overview ¶
Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0 Contains all the bits and pieces we need to parse and manage the external configuration
Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0
Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0
Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0
Shared sampling constants
Index ¶
- Constants
- Variables
- func JitterFrequency(freqInSec time.Duration) time.Duration
- func NormalizeConfig(cfg *Config, cfgMetadata config_loader.YAMLMetadata) (err error)
- func ValidateConfigFrequencySetting(req, min, def int64, disable bool) time.Duration
- type Config
- func (c *Config) DMIngestURL() string
- func (c Config) GenerateInventoryURL() string
- func (c *Config) GetDefaultLogFile() string
- func (c *Config) GetLogFile() string
- func (c *Config) LogInfo()
- func (c *Config) PublicFields() (map[string]string, error)
- func (c *Config) SetBoolValueByYamlAttribute(attribute string, value bool) error
- func (c *Config) SetIntValueByYamlAttribute(attribute string, value int64) error
- type CustomAttributeMap
- type IncludeMetricsMap
- type LogConfig
- func (lc *LogConfig) AttachDefaultFilters()
- func (lc *LogConfig) GetSmartLogLevelLimit() int
- func (lc *LogConfig) HasIncludeFilter(key, value string) bool
- func (lc *LogConfig) IsSmartLogging() bool
- func (lc *LogConfig) IsStdoutEnabled() bool
- func (lc *LogConfig) IsTroubleshootMode() bool
- func (lc *LogConfig) VerboseEnabled() int
- type LogFilters
- type LogForward
- type LogForwardProxy
- type LogRotateConfig
- type NtpConfig
- type Troubleshoot
Constants ¶
const ( // TracesFieldName can be used as a field in the structured log. TracesFieldName = "traces" TracesFieldComponent = "component" SupervisorTrace = "supervisor" HttpTracer = "HttpTracer" FeatureTrace = "feature" ProcessTrace = "process" // LogFilterWildcard will match everything. LogFilterWildcard = "*" ModeUnknown = "" ModeRoot = "root" ModePrivileged = "privileged" ModeUnprivileged = "unprivileged" NonVerboseLogging = 0 VerboseLogging = 1 SmartVerboseLogging = 2 TroubleshootLogging = 3 TraceLogging = 4 TraceTroubleshootLogging = 5 )
const ( // LogLevelSmart keeps a limited cache of debug logs and output them only when an error happens. LogLevelSmart string = "smart" // LogLevelInfo agent will log in info level. LogLevelInfo string = "info" LogLevelWarn string = "warn" LogLevelError string = "error" // LogLevelDebug adds more vorbosity in the logs. LogLevelDebug string = "debug" // LogLevelTrace is the most verbose log level. LogLevelTrace string = "trace" )
const ( // Plain text log format. LogFormatText = "text" // JSON log format. LogFormatJSON = "json" )
const ( FREQ_DISABLE_SAMPLING = -1 // seconds, don't sample FREQ_DEFAULT_SAMPLING = 0 // Use the "default" value for a given sampler type MAX_BACKOFF = 120 // seconds, inventory: if we are in backoff mode this the upper bound interval for non-forced backoff RATE_LIMITED_BACKOFF = 3600 // seconds, inventory: if we are told to backoff, wait a longer period of time FREQ_MINIMUM_FAST_INVENTORY_SAMPLE_RATE = 10 // seconds, used for specific inventory that may change more quickly and isn't too expensive FREQ_MINIMUM_INVENTORY_SAMPLE_RATE = 30 // seconds, this is the default minimum (fastest) inventory sample rate // NOTE: These constants are specified in PLUGIN API, DO NOT CHANGE WITHOUT DISCUSSION FREQ_MINIMUM_EXTERNAL_PLUGIN_INTERVAL = 15 // seconds FREQ_MAXIMUM_EXTERNAL_PLUGIN_INTERVAL = 60 // seconds, frequency at which warning is shown for possible alert problems FREQ_PLUGIN_K8S_INTEGRATION_SAMPLES_UPDATES = 30 // seconds // DefaultWMINamespace is the Namespace where the WMI queries will be executed DefaultWMINamespace = "root/cimv2" )
const ( FREQ_INTERVAL_FLOOR_METRICS = 5 // seconds, absolute fastest any metrics can run FREQ_INTERVAL_FLOOR_SYSTEM_METRICS = 5 // seconds, fastest that metrics can be configured to sample FREQ_INTERVAL_FLOOR_STORAGE_METRICS = 5 // seconds FREQ_INTERVAL_FLOOR_NETWORK_METRICS = 10 // seconds FREQ_INTERVAL_FLOOR_PROCESS_METRICS = 20 // seconds, process time has great impact on our cap planning, ask before changing FREQ_METRICS_SEND_INTERVAL = FREQ_INTERVAL_FLOOR_METRICS // seconds between sending samples for base metrics (System, Process, etc) INITIAL_REAP_MAX_WAIT_SECONDS = 60 // seconds to wait for all plugins to report before reporting data anyway // LINUX PLUGINS FREQ_PLUGIN_SYSCTL_UPDATES = 60 //seconds FREQ_PLUGIN_KERNEL_MODULES_UPDATES = 10 //seconds FREQ_PLUGIN_USERS_UPDATES = 15 //seconds FREQ_PLUGIN_SSHD_CONFIG_UPDATES = 15 //seconds FREQ_PLUGIN_SUPERVISOR_UPDATES = 15 //seconds FREQ_PLUGIN_DAEMONTOOLS_UPDATES = 15 //seconds FREQ_PLUGIN_SYSTEMD_UPDATES = 30 // seconds FREQ_PLUGIN_SYSVINIT_UPDATES = 30 // seconds FREQ_PLUGIN_UPSTART_UPDATES = 30 // seconds FREQ_PLUGIN_FACTER_UPDATES = 30 // seconds -- facter plugin FREQ_PLUGIN_PACKAGE_MGRS_UPDATES = 30 // seconds -- rpm, deb plugins. RPM watches /var/lib/rpm/.rpm.lock, dpkg: /var/lib/dpkg/lock FREQ_PLUGIN_SELINUX_UPDATES = 30 // seconds FREQ_PLUGIN_HOST_ALIASES = 30 // seconds FREQ_PLUGIN_NETWORK_INTERFACE_UPDATES = 60 // seconds FREQ_PLUGIN_CLOUD_SECURITY_UPDATES = 60 // seconds // WINDOWS PLUGINS FREQ_PLUGIN_WINDOWS_SERVICES = 30 // seconds, 0 == off, 30 == minimum otherwise: inventory: running services FREQ_PLUGIN_WINDOWS_UPDATES = 60 // seconds // BOTH FREQ_EXTERNAL_USER_DATA = 10 // seconds between external user data samples (deprecated user json plugin) FREQ_PLUGIN_EXTERNAL_PLUGINS = 30 // seconds )
Variables ¶
var ( // public DefaultContainerCacheMetadataLimit = 60 DefaultDockerApiVersion = "1.24" // minimum supported API by Docker 18.09.0 DefaultHeartBeatFrequencySecs = 60 DefaultDMPeriodSecs = 5 // default telemetry SDK value DefaultMaxMetricsBatchSizeBytes = 1000 * 1000 // Size limit from Vortex collector service (1MB) DefaultMaxMetricBatchEntitiesCount = 300 // Amount limit from Vortex collector service header (8k ~ 300 entities) DefaultMaxMetricBatchEntitiesQueue = 1000 // Limit the amount of queued entities to be processed by Vortex collector service DefaultMetricsNFSSampleRate = 20 DefaultOfflineTimeToReset = "24h" DefaultStorageSamplerRateSecs = 20 DefaultStripCommandLine = true DefaultSmartVerboseModeEntryLimit = 1000 DefaultIntegrationsDir = "newrelic-integrations" DefaultInventoryQueue = 0 )
Default configurable values
Functions ¶
func NormalizeConfig ¶
func NormalizeConfig(cfg *Config, cfgMetadata config_loader.YAMLMetadata) (err error)
func ValidateConfigFrequencySetting ¶
ValidateConfigFrequencySetting returns a valid sampling frequency according to the following rules:
disable && req == FREQ_DEFAULT_SAMPLING -> FREQ_DISABLE_SAMPLING req <= FREQ_DISABLE_SAMPLING -> FREQ_DISABLE_SAMPLING req >= FREQ_DEFAULT_SAMPLING & req < min -> Provided default value `def` req > min -> Requested value `req`
Plugins have to implement the logic in which they disable themselves if their frequency equals FREQ_DISABLE_SAMPLING.
Types ¶
type Config ¶
type Config struct { // Databind provides varaiable (secrets, discovery) replacement capabilities for the configuration. Databind databind.YAMLAgentConfig `yaml:",inline" public:"false"` // License specifies the license key for your New Relic account. The agent uses this key to associate your server's // metrics with your New Relic account. This setting is created as part of the standard installation process. // Default: "" // Public: Yes License string `yaml:"license_key" envconfig:"license_key" public:"obfuscate"` // Fedramp use Fedramp endpoints. See https://docs.newrelic.com/docs/fedramp-endpoint-logs-metrics // Default: true // Public: No Fedramp bool `yaml:"fedramp" envconfig:"fedramp" public:"true"` // Staging is staging environment. // Default: false // Public: No Staging bool `yaml:"staging" envconfig:"staging" public:"false"` // CollectorURL is the base URL for the metrics and inventory ingest endpoints. See metrics and inventory // ingest endpoint configuration option. // Default: https://infra-api.newrelic.com // Public: No CollectorURL string `yaml:"collector_url" envconfig:"collector_url" public:"false"` // IdentityURL defines the base URL for the identity connect. // Default: https://infra-api.newrelic.com // Public: No IdentityURL string `yaml:"identity_url" envconfig:"identity_url" public:"false"` // MetricURL defines the url for the dimensional metric ingest endpoint // Default: https://metric-api.newrelic.com // Public: No MetricURL string `yaml:"metric_url" envconfig:"metric_url" public:"false"` // DMIngestEndpoint defines the API path for the infrastructure dimensional metric ingest endpoint // Default: /metric/v1/infra // Public: No DMIngestEndpoint string `yaml:"dm_endpoint" envconfig:"dm_endpoint" public:"false"` // CommandChannelURL defines the base URL for the command channel. // Default: https://infrastructure-command-api.newrelic.com // Public: No CommandChannelURL string `yaml:"command_channel_url" envconfig:"command_channel_url" public:"false"` // CommandChannelEndpoint is the suffix path for the command channel endpoint. The base URL is defined in the // config option as CommandChannelURL // Default: /agent_commands/v1/commands // Public: No CommandChannelEndpoint string `yaml:"command_channel_endpoint" envconfig:"command_channel_endpoint" public:"false"` // CommandChannelIntervalSec defines the polling interval for the command channel in seconds. // Default: https://infra-api.newrelic.com // Public: No CommandChannelIntervalSec int `yaml:"command_channel_interval_sec" envconfig:"command_channel_interval_sec" public:"false"` // IgnoreSystemProxy makes `HTTPS_PROXY` and `HTTP_PROXY` environment variables to be ignored, in case the Agent // requires to not using an existing system proxy, and connect directly to the New Relic metrics collector. // Default: False // Public: Yes IgnoreSystemProxy bool `yaml:"ignore_system_proxy" envconfig:"ignore_system_proxy"` // Proxy defines a proxy to communicate with New Relic. If so, set the proxy URL in the form // https://user:password@hostname:port. Can be HTTP or HTTPS. // Default: "" // Public: Yes Proxy string `yaml:"proxy" envconfig:"proxy"` // ProxyValidateCerts If set to true, when the proxy is configured to use an HTTPS connection, it will only work // when the HTTPS proxy has certificates from a valid Certificate Authority, or when the ca_bundle_file or // ca_bundle_dir configuration properties contain the HTTPS proxy certificates. // Default: False // Public: Yes ProxyValidateCerts bool `yaml:"proxy_validate_certificates" envconfig:"proxy_validate_certificates"` // ProxyConfigPlugin sends the following proxy configuration information as inventory: // `HTTPS_PROXY` // `HTTP_PROXY` // `proxy` // `ca_bundle_dir` // `ca_bundle_file` // `ignore_system_proxy` // `proxy_validate_certificates` // Default: True // Public: Yes ProxyConfigPlugin bool `yaml:"proxy_config_plugin" envconfig:"proxy_config_plugin"` // IgnoreReclaimable When true, the formulation of the host virtual memory considers SReclaimable as available // memory; otherwise SReclaimable will be considered part of the used memory. // Default: False // Public: Yes IgnoreReclaimable bool `yaml:"ignore_reclaimable" envconfig:"ignore_reclaimable"` // DisplayName overrides the auto-generated hostname for reporting. This is useful when you have multiple hosts // with the same name, since Infrastructure uses the hostname as the unique identifier for each host. // Keep in mind this value is also used for the loopback address replacement on entity names. // To be sure to understand how this entity name resolution works check the following link: // https://docs.newrelic.com/docs/integrations/integrations-sdk/file-specifications/integration-executable-file-specifications#h2-loopback-address-replacement-on-entity-namesç // Default: "" // Public: Yes DisplayName string `yaml:"display_name" envconfig:"display_name"` // DisableInventorySplit By default the agent splits the inventory data into small groups bounded by the value of // the config option MaxInventorySize; if this option is set to true, the inventory won't be splitted and the agent // will try to send it all in a single request. // Default: False // Public: No DisableInventorySplit bool `yaml:"disable_inventory_split" envconfig:"disable_inventory_split" public:"false"` // DnsHostnameResolution When true, the full hostname is resolved by performing a reverse lookup of the hosts // address; otherwise, it will be retrieved with the hostname command on Linux, and from the TCP/IP parameters of // the registry on Windows. // Default: True // Public: Yes DnsHostnameResolution bool `yaml:"dns_hostname_resolution" envconfig:"dns_hostname_resolution"` // DockerApiVersion specifies the Docker API Version to use for the Docker client. // Default: 1.24 // Public: Yes DockerApiVersion string `yaml:"docker_api_version" envconfig:"docker_api_version"` // CustomAttributes is a list of custom attributes to annotate the data from this agent instance. Separate keys and // values with colons :, as in KEY: VALUE, and separate each key-value pair with a line break. Keys can be any // valid YAML except slashes /. Values can be any YAML string, including spaces. // Default: Empty // Public: Yes CustomAttributes CustomAttributeMap `yaml:"custom_attributes" envconfig:"custom_attributes"` // Verbose When verbose is set to 0, verbose logging is off, but the agent still creates logs. Set this to 1 to // create verbose logs to use in troubleshooting the agent. You can set this to 2 to use Smart Verbose Logs. Set to // 3 to forward debug logs to FluentBit. To enable log traces set this to 4, and to 5 to forward traces to FluentBit. // Default: 0 // Public: Yes // Deprecated: use Log.Level instead. Verbose int `yaml:"verbose" envconfig:"verbose"` // The number of entries that will be cached in memory before being flushed (if an error has not been logged // beforehand). // Default: 1000 // Public: Yes // Deprecated: use Log.SmartLevelEntryLimit instead. SmartVerboseModeEntryLimit int `yaml:"smart_verbose_mode_entry_limit" envconfig:"smart_verbose_mode_entry_limit"` // CPUProfile takes the path of a file that will be created and used to store profiling samples related to the CPU // usage of the agent in pprof format. // Default: "" // Public: No CPUProfile string `yaml:"cpu_profile" envconfig:"cpu_profile" public:"false"` // MemProfile takes the path of a file that will be created and used to store profiling samples related to memory consumption // usage of the agent in pprof format. // Default: "" // Public: No MemProfile string `yaml:"mem_profile" envconfig:"mem_profile" public:"false"` // Interval in seconds to create memory profile snapshots, default 300 seconds (5min) // Default: 300 // Public: No MemProfileInterval int `yaml:"mem_profile_interval" envconfig:"mem_profile_interval" public:"false"` // WebProfile enables pprof profiler serving data via HTTP API // Default: false // Public: No WebProfile bool `yaml:"web_profile" envconfig:"web_profile" public:"false"` // StripCommandLine When true, the agent removes the command arguments from the 'commandLine' attribute of the // ProcessSample. This is a security measure to prevent leaking sensitive information. // Default: True // Public: Yes StripCommandLine bool `yaml:"strip_command_line" envconfig:"strip_command_line"` // OverrideHostname When set, this is the value that will be reported for the full hostname; otherwise, // the agent will perform the normal lookup behavior. // Default: "" // Public: Yes OverrideHostname string `yaml:"override_hostname" envconfig:"override_hostname"` // OverrideHostnameShort When set, this is the value that will be reported for the hostname; otherwise, // the agent will perform the normal lookup behavior. // Default: "" // Public: Yes OverrideHostnameShort string `yaml:"override_hostname_short" envconfig:"override_hostname_short"` // OverrideHostProc When set, this will change the base directory used when constructing paths for location // inside /proc/. This allows us to mock the filesystem in order to make tests. // Default: "" // Public: No OverrideHostProc string `yaml:"override_host_proc" envconfig:"override_host_proc" public:"false"` // OverrideHostSys When set, this will change the base directory used when constructing paths for location // inside /sys/. This allows us to mock filesystem in order to make tests. // Default: "" // Public: No OverrideHostSys string `yaml:"override_host_sys" envconfig:"override_host_sys" public:"false"` // OverrideHostEtc When set, this will change the base directory used when constructing paths for location // inside /etc/. This allows us to mock the filesystem in order to make tests. // Default: "" // Public: No OverrideHostEtc string `yaml:"override_host_etc" envconfig:"override_host_etc" public:"false"` // OverrideHostRoot When set, this will be use as a prefix when constructing paths for location inside the // /proc /sys and /etc directory. This allows us to mock the filesystem in order to make tests. // This config parameter is also used when building the Containerized Agent so it can read data from the // underlying host. // Setting this to '/my-root' it will make the agent construct paths like '/my-root/etc/my-file' when constructing // a path to the file 'my-file' stored in '/etc'. This allows us to mock filesystem in order to make tests. // Default: "" // Public: No OverrideHostRoot string `yaml:"overide_host_root" envconfig:"override_host_root" public:"false"` // IsContainerized identifies that the agent is running inside a container. This value is set through the // environment variable from the containerized agent Dockerfile at build time. // Default: False // Public: No IsContainerized bool `yaml:"is_containerized" envconfig:"is_containerized" public:"false"` // IsForwardOnly enables the forwarding mode, in this mode the agent doesn't activate any of its plugins or // samplers, and just forwards data from the integrations. // Default: False // Public: No IsForwardOnly bool `yaml:"is_forward_only" envconfig:"is_forward_only" public:"false"` // IsSecureForwardOnly has the same behaviour as `IsForwardOnly` but with some inventory data and a heartbeat // Default: False // Public: No IsSecureForwardOnly bool `yaml:"is_secure_forward_only" envconfig:"is_secure_forward_only" public:"false"` // K8sIntegration enables the K8sIntegrationSample, this sample returns the names of the integrations that // the agent has configured. // Default: False // Public: No K8sIntegration bool `yaml:"k8s_integration" envconfig:"k8s_integration" public:"false"` // AgentDir is the directory where the agent stores files like cache, inventory, integrations, etc. // Default (Linux): /var/db/newrelic-infra // Default (MacOS): /usr/local/var/db/newrelic-infra/ // Default (Windows): C:\Program Files\NewRelic\newrelic-infra // Public: Yes AgentDir string `yaml:"agent_dir" envconfig:"agent_dir"` // ConfigDir is the main directory where the agent stores configs. // Default (Linux): /etc/newrelic-infra // Default (Windows): C:\Program Files\NewRelic\newrelic-infra // Public: Yes ConfigDir string `yaml:"config_dir" envconfig:"config_dir"` // Limits any length of the string metrics to 4095 characters. // Default: true // Public: yes TruncTextValues bool `yaml:"trunc_text_values" envconfig:"trunc_text_values"` // Change the log format. Current supported formats: json, common. // Default: text // Public: Yes // Deprecated: use Log.Format instead. LogFormat string `yaml:"log_format" envconfig:"log_format"` // LogFile defines the file path for the logs. // The agent standard installation creates a default log directory and it sets this filepath value in the // log_file configuration option for you. // Default (Linux): /var/log/newrelic-infra/newrelic-infra.log // Default (Windows): C:\Program Files\New Relic\newrelic-infra\newrelic-infra.log // Public: Yes // Deprecated: use Log.File instead. LogFile string `yaml:"log_file" envconfig:"log_file"` // Log is a map of custom logging configurations. Separate keys and values with colons :, as in KEY: VALUE, and // separate each key-value pair with a line break. Key-value can be any of the following: // "file: path/to/file.log" defines the log file path // "format: json" logging format (json, text) // "level: debug" logrus log level (error, warning, info, smart, debug, trace) // "forward: true" boolean to send logs to New Relic platform // "stdout: true" boolean to print logs to stdout // "smart_level_entry_limit: 50" number of entries that will be cached before being flushed (default: 1000) // "include_filters: " map entry to include the log entries with the defined fields (default: all log fields) // "exclude_filters: " map entry to exclude the log entries with the defined fields (default: none) // Default: none // Public: Yes Log LogConfig `yaml:"log" envconfig:"log"` // PidFile contains the location on Linux where the pid file of the agent process is created. It is used at startup // to ensure that no other instances of the agent are running. // Default: /var/run/newrelic-infra/newrelic-infra.pid // Public: Yes PidFile string `yaml:"pid_file" envconfig:"pid_file" os:"linux"` // MaxInventorySize sets the maximum size allowed for inventory data. If a plugin's inventory data exceeds this // value it will be dropped. Inventory deltas will be grouped in batches bounded by this value before being sent // to the NewRelic platform. // Default: 1000000 (1MB) // Public: No MaxInventorySize int `yaml:"max_inventory_size" envconfig:"max_inventory_size" public:"false"` // MaxProcs specifies the number of logical processors available to the agent. Increasing this value can help to // distribute the load between different cores. Default value is 1. If value is set to -1 then it will try to read // the environment variable GOMAXPROCS. If that variable is not set then the default value will be the total // number of cores available in the host. // Default: 1 // Public: Yes MaxProcs int `yaml:"max_procs" envconfig:"max_procs"` // MetricsSystemSampleRate Sample rate of System Samples in seconds. Minimum value is 5. If value is -1 then // the sampler is disabled. // Default: 5 // Public: Yes MetricsSystemSampleRate int `yaml:"metrics_system_sample_rate" envconfig:"metrics_system_sample_rate"` // MetricsStorageSampleRate Sample rate of Storage Samples in seconds. Minimum value is 5. If value is -1 then // the sampler is disabled. // Default: 20 // Public: Yes MetricsStorageSampleRate int `yaml:"metrics_storage_sample_rate" envconfig:"metrics_storage_sample_rate"` // MetricsNetworkSampleRate Sample rate of Network Samples in seconds. Minimum value is 10. If value is -1 then // the sampler is disabled. // Default: 5 // Public: Yes MetricsNetworkSampleRate int `yaml:"metrics_network_sample_rate" envconfig:"metrics_network_sample_rate"` // MetricsProcessSampleRate Sample rate of System Samples in seconds. Minimum value is 20. If value is -1 then // the sampler is disabled. // Default: 20 // Public: Yes MetricsProcessSampleRate int `yaml:"metrics_process_sample_rate" envconfig:"metrics_process_sample_rate"` // HeartBeatSampleRate Interval in seconds for sending the HeartBeatSample. // Default: False // Public: No HeartBeatSampleRate int `yaml:"heart_beat_sample_rate" envconfig:"heart_beat_sample_rate" public:"false"` // DMSubmissionPeriod interval in seconds for triggering dimensional metrics submissions. // Default: False // Public: No DMSubmissionPeriod int `yaml:"dm_submission_period" envconfig:"dm_submission_period" public:"false"` // CustomSupportedFileSystems List of filesystems types the agent supports. This value should be a subset of the // default list, items that are not in the default list will be discarded. // Default: Empty // Public: Yes CustomSupportedFileSystems []string `yaml:"custom_supported_file_systems" envconfig:"custom_supported_filesystems"` // FileDevicesBlacklist List of storage devices to be ignored by the agent when gathering StorageSamples. // Default: Empty // Public: No // Deprecated: use FileDevicesIgnored instead. FileDevicesBlacklist []string `yaml:"file_devices_blacklist" envconfig:"file_devices_blacklist"` // FileDevicesIgnored List of storage devices to be ignored by the agent when gathering StorageSamples. // Default: Empty // Public: Yes FileDevicesIgnored []string `yaml:"file_devices_ignored" envconfig:"file_devices_ignored"` // NetworkInterfaceFilters You can use the network interface filters configuration to hide unused or uninteresting // network interfaces from the Infrastructure agent. This helps reduce resource usage, work, and noise in your data. // Default: Empty // Public: Yes NetworkInterfaceFilters map[string][]string `yaml:"network_interface_filters" envconfig:"network_interface_filters"` // IpData When true, IP addresses and MAC addresses will be fetched and added to the agent's connect fingerprint. // Default: True // Public: No IpData bool `yaml:"ip_data" envconfig:"ip_data" public:"false"` // CABundleFile If your https_proxy option references to a proxy with self-signed certificates, this option allows // you specify your proxy certificate file. // Default: "" // Public: Yes CABundleFile string `yaml:"ca_bundle_file" envconfig:"ca_bundle_file"` // CABundleDir If your https_proxy option references to a proxy with self-signed certificates, this option allows // you specify the directory where the proxy certificate is available. // The certificates in the directory must end with the .pem extension. // Default: "" // Public: Yes CABundleDir string `yaml:"ca_bundle_dir" envconfig:"ca_bundle_dir"` // SupervisorRpcSocket Location of the supervisor (http://supervisord.org/) socket. // Default: /var/run/supervisor.sock // Public: Yes SupervisorRpcSocket string `yaml:"supervisor_rpc_sock" envconfig:"supervisor_rpc_sock"` // SupervisorRefreshSec Sampling period / interval in seconds for Supervisor plugin // set as value -1 for disabling it, otherwise 10 is the minimum value // Default: 15 // Public: Yes SupervisorRefreshSec int64 `yaml:"supervisor_interval_sec" envconfig:"supervisor_interval_sec"` // RpmRefreshSec Sampling period / interval in seconds for Rpm plugin. Set as value -1 for disabling it. 30 is // the minimum value. Only activated in root or privileged modes and on distros: RedHat, RedHat AWS and SUSE // Default: 30 // Public: Yes RpmRefreshSec int64 `yaml:"rpm_interval_sec" envconfig:"rpm_interval_sec"` // DpkgRefreshSec Sampling period / interval in seconds for Dpkg plugin. Set as value -1 for disabling it. // 30 is the minimum value. Only activated in root or privileged modes and on debian based distros. // Default: 30 // Public: Yes DpkgRefreshSec int64 `yaml:"dpkg_interval_sec" envconfig:"dpkg_interval_sec"` // DaemontoolsRefreshSec Sampling period / interval in seconds for Daemontools plugin. Set as value -1 for // disabling it. 10 is the minimum value // Default: 15 // Public: Yes DaemontoolsRefreshSec int64 `yaml:"daemontools_interval_sec" envconfig:"daemontools_interval_sec"` // FacterIntervalSec Sampling period / interval in seconds for Facter plugin. Set as value -1 for disabling it, // otherwise 30 is the minimum value // Default: 30 // Public: Yes FacterIntervalSec int64 `yaml:"facter_interval_sec" envconfig:"facter_interval_sec"` // FacterHomeDir sets the HOME environment variable for Facter (https://puppet.com/docs/facter). If unset, // it defaults to the current user's home directory. // Default: "" // Public: Yes FacterHomeDir string `yaml:"facter_home_dir" envconfig:"facter_home_dir"` // SelinuxIntervalSec Sampling period / interval in seconds for SELinux plugin. Set as value -1 for disabling it, // otherwise 30 is the minimum value. SELinux plugin is activated only in root mode. // This config option will be ignored if SelinuxEnableSemodule is set to false. // Default: 30 // Public: Yes SelinuxIntervalSec int64 `yaml:"selinux_interval_sec" envconfig:"selinux_interval_sec"` // SelinuxEnableSemodule allows disabling `semodule -l`, which takes 100% CPU on some SELinux distributions // Default: True // Public: Yes SelinuxEnableSemodule bool `yaml:"selinux_enable_semodule" envconfig:"selinux_enable_semodule"` // SysctlFSNotify replaces previous Sysctl plugin using sample polling with FS-notify pub-sub mode. // Default: false // Public: Yes SysctlFSNotify bool `yaml:"sysctl_fs_notify" envconfig:"sysctl_fs_notify"` // SysctlIntervalSec Sampling period / interval in seconds for Sysctl plugin. Set as value -1 for disabling it. // 30 is the minimum value. This plugin can be activated only in root mode or privileged mode. // Default: 60 // Public: Yes SysctlIntervalSec int64 `yaml:"sysctl_interval_sec" envconfig:"sysctl_interval_sec"` // SystemdIntervalSec Sampling period / interval in seconds for Systemd plugin. Set as value -1 for disabling it. // 10 is the minimum value. // Default: 30 // Public: Yes SystemdIntervalSec int64 `yaml:"systemd_interval_sec" envconfig:"systemd_interval_sec"` // SysvInitIntervalSec Sampling period / interval in seconds for SysV plugin. Set as value -1 for disabling it. // 10 is the minimum value. This plugin can be activated only in root mode or privileged mode. // Default: 30 // Public: Yes SysvInitIntervalSec int64 `yaml:"sysvinit_interval_sec" envconfig:"sysvinit_interval_sec"` // UpstartIntervalSec Sampling period / interval in seconds for Upstart plugin. Set as value -1 for disabling it. // 10 is the minimum value. // Default: 30 // Public: Yes UpstartIntervalSec int64 `yaml:"upstart_interval_sec" envconfig:"upstart_interval_sec"` // NetworkInterfaceIntervalSec Sampling period / interval in seconds for NetworkInterface plugin. Set as value -1 // for disabling it. 30 is the minimum value. // Default: 60 // Public: Yes NetworkInterfaceIntervalSec int64 `yaml:"network_interface_interval_sec" envconfig:"network_interface_interval_sec"` // CloudSecurityGroupRefreshSec Sampling period / interval in seconds for CloudSecurityGroups plugin. Set as // value -1 for disabling it. 30 is the minimum value. // Default: 60 // Public: Yes CloudSecurityGroupRefreshSec int64 `yaml:"cloud_security_group_refresh_sec" envconfig:"cloud_security_group_refresh_sec"` // KernelModulesRefreshSec Sampling period / interval in seconds for KernelModules plugin. Set as value -1 // for disabling it. 10 is the minimum value. // Default: 10 // Public: Yes KernelModulesRefreshSec int64 `yaml:"kernel_modules_refresh_sec" envconfig:"kernel_modules_refresh_sec"` // UsersRefreshSec Sampling period / interval in seconds for Users plugin. Set as value -1 // for disabling it. 10 is the minimum value. // Default: 15 // Public: Yes UsersRefreshSec int64 `yaml:"users_refresh_sec" envconfig:"users_refresh_sec"` // SshdConfigRefreshSec Sampling period / interval in seconds for Sshd plugin. Set as value -1 // for disabling it. 10 is the minimum value. // Default: 15 // Public: Yes SshdConfigRefreshSec int64 `yaml:"sshd_config_refresh_sec" envconfig:"sshd_config_refresh_sec"` // WindowsServicesRefreshSec Sampling period / interval in seconds for WindowsServices plugin. Set as value -1 // for disabling it. 10 is the minimum value. // Default: 30 // Public: Yes WindowsServicesRefreshSec int64 `yaml:"windows_services_refresh_sec" envconfig:"windows_services_refresh_sec" os:"windows"` // WindowsUpdatesRefreshSec Sampling period / interval in seconds for WindowsUpdates plugin. Set as value -1 // for disabling it. 10 is the minimum value. // Default: 60 // Public: Yes WindowsUpdatesRefreshSec int64 `yaml:"windows_updates_refresh_sec" envconfig:"windows_updates_refresh_sec" os:"windows"` // LogToStdout By default all logs are displayed in both standard output and a log file. If you want to disable // logs in the standard output you can set this configuration option to FALSE. // Default: True // Public: Yes // Deprecated: use Log.ToStdout instead. LogToStdout bool `yaml:"log_to_stdout" envconfig:"log_to_stdout"` // ContainerMetadataCacheLimit Time duration, in seconds, before expiring the cached containers metadata and // having to fetch it again. // Default: 60 // Public: Yes ContainerMetadataCacheLimit int `yaml:"container_cache_metadata_limit" envconfig:"container_cache_metadata_limit"` // PayloadCompressionLevel sets the gzip compression level of the payload of the requests that the agent sends to // the backend: e.g. samples/deltas connect step info // HuffmanOnly=-2 // NoCompression=0 // BestSpeed=1 // intermediate levels 2-8 // BestCompression=9 // Default: 6 // Public: Yes PayloadCompressionLevel int `yaml:"payload_compression_level" envconfig:"payload_compression_level"` // PartitionsTTL Time duration to expire the cached list of storage partitions. // Default: 60s // Public: No PartitionsTTL string `yaml:"partitions_ttl" envconfig:"partitions_ttl" public:"false"` // StartupConnectionTimeout Time duration to wait before timing-out the request the agents makes at startup to // check the NewRelic platform availability. Used by defining reachability status of backend endpoints. // Default: 10s // Public: Yes StartupConnectionTimeout string `yaml:"startup_connection_timeout" envconfig:"startup_connection_timeout"` // StartupConnectionRetries Number of times the agent will retry the request to check the NewRelic platform // availability on startup before throwing an error. When set to a negative value, the agent will keep checking // the connection until it succeeds. // Default: 6 // Public: Yes StartupConnectionRetries int `yaml:"startup_connection_retries" envconfig:"startup_connection_retries"` // FingerprintUpdateFreqSec Defines the frequency in seconds for the agent to reconnect and update the current // fingerprint with its assigned entity ID for the connect. // Default: 60 // Public: No FingerprintUpdateFreqSec int `yaml:"fingerprint_update_freq" envconfig:"fingerprint_update_freq" public:"false"` // ForceProtocolV2toV3 Agent enables loopback-address replacement on the entity name (and therefor key) // automatically for v3 integration protocol. If you are using v2 for the integration protocol and you want // to have this behaviour then you can enable the entityname_integrations_v2_update option. // Default: False // Public: Yes ForceProtocolV2toV3 bool `yaml:"entityname_integrations_v2_update"envconfig:"entityname_integrations_v2_update"` // DisableAllPlugins disables all the plugins except does that send data required by // the platform team. Can be overridden per plugin by setting the // `<Plugin>IntervalSec` config options to a value greater than // `FREQ_DISABLE_SAMPLING` and different than `FREQ_DEFAULT_SAMPLING`. // Default: False // Public: Yes DisableAllPlugins bool `yaml:"disable_all_plugins" envconfig:"disable_all_plugins"` // EventQueueDepth We use two queues to send the events to metrics digest: (event -> eventQueue -> batch -> // batchQueue -> HTTP post). This config option allow us to increase the eventQueue size before accumulate these // events in batches. Using this approach we minimize the impact of high-latency HTTP calls. If HTTP calls are // slow, we'll still be able to run the event queue receiver and accumulate a reasonable number of batches before // we fill up on batches as well. // Default: 1000 // Public: No EventQueueDepth int `yaml:"event_queue_depth" envconfig:"event_queue_depth" public:"false"` // See event_sender.go // BatchQueueDepth We use two queues to send the events to metrics digest: (event -> eventQueue -> batch -> // batchQueue -> HTTP post). This config option allow us to increase the batchQueue size. // Default: 200 // Public: No BatchQueueDepth int `yaml:"batch_queue_depth" envconfig:"batch_queue_depth" public:"false"` // See event_sender.go // InventoryQueueLen sets the inventory processing queue size. Zero value makes inventory processing synchronous (blocking call). // Default: 0 // Public: Yes InventoryQueueLen int `yaml:"inventory_queue_len" envconfig:"inventory_queue_len" public:"true"` // EnableWinUpdatePlugin enables the windows updates plugin which retrieves the lists of hotfix that are installed // on the host. // Default: False // Public: Yes EnableWinUpdatePlugin bool `yaml:"enable_win_update_plugin" envconfig:"enable_win_update_plugin" os:"windows"` // CompactEnabled When enabled, the delta storage will be compacted after its storage directory surpasses a // certain threshold set by the CompactTreshold options. Compaction works by removing the data of inactive plugins // and the archived deltas of the active plugins; archive deltas are deltas that have already been sent to the // NewRelic platform. // Default: True // Public: No CompactEnabled bool `yaml:"compaction_enabled" envconfig:"compaction_enabled" public:"false"` // CompactThreshold Size in bytes to use as threshold for executing the delta storage compaction when the // CompactEnabled config option is set to true. // Default: 20971520 (20 MB) // Public: No CompactThreshold uint64 `yaml:"compaction_threshold" envconfig:"compaction_threshold" public:"false"` // IgnoredInventoryPaths is not a configurable option. It maps the values from ignored_inventory config option // Default: Empty // Public: No IgnoredInventoryPaths []string `yaml:"ignored_inventory" envconfig:"ignored_inventory" public:"false"` // WhitelistProcessSample only collects process samples for processes we care about, this is a WINDOWS ONLY CONFIG // Default: Empty // Public: No // Deprecated: use AllowedListProcessSample instead. WhitelistProcessSample []string `yaml:"whitelist_process_sample" envconfig:"whitelist_process_sample" public:"false"` // AllowedListProcessSample only collects process samples for processes we care about, this is a WINDOWS ONLY CONFIG // Default: Empty // Public: No // Deprecated: use IncludeMatchingMetrics instead. AllowedListProcessSample []string `yaml:"allowed_list_process_sample" envconfig:"allowed_list_process_sample" public:"false"` // Default: False // Public: No DisableWinSharedWMI bool `yaml:"disable_win_shared_wmi" envconfig:"disable_win_shared_wmi" public:"false"` // DisableZeroRSSFilter Set to true to turn off ProcessSample filtering of 0 RSS processes. May have performance impact. // Default: False // Public: No DisableZeroRSSFilter bool `yaml:"disable_zero_mem_process_filter" envconfig:"disable_zero_mem_process_filter" public:"false"` // EnableElevatedProcessPriv Set to true on Windows to activate SeDebugPrivilege use for Process Info // Default: False // Public: No EnableElevatedProcessPriv bool `yaml:"enable_elevated_process_priv" envconfig:"enable_elevated_process_priv" public:"false"` // OfflineTimeToReset If the cached inventory becomes older than this time (because e.g. the agent is offline), // it is reset // Default: 24h // Public: No OfflineTimeToReset string `yaml:"offline_time_to_reset" envconfig:"offline_time_to_reset" public:"false"` // Features enables features that could also be enabled via command-api FF. // Default: Empty // Public: No Features map[string]bool `yaml:"features" envconfig:"features" public:"false"` // RegisterConcurrency Amount of workers sending parallel requests for entity registration // Default: 4 // Public: No RegisterConcurrency int `yaml:"register_concurrency" envconfig:"register_concurrency" public:"false"` // RegisterBatchSize Amount of remote entities per register request // Default: 100 // Public: No RegisterBatchSize int `yaml:"register_batch" envconfig:"register_batch" public:"false"` // RegisterFrequencySecs Frequency for register request to be sent if batch size is not reached // Default: 15 // Public: No RegisterFrequencySecs int `yaml:"register_freq_secs" envconfig:"register_freq_secs" public:"false"` // CustomPluginInstallationDir Specify a custom path to install integrations. The difference is that with this // allows to install integrations outside the agent_dir. It has the first priority when the agent is looking for // installed integrations. // Default: "" // Public: No CustomPluginInstallationDir string `yaml:"custom_plugin_installation_dir" envconfig:"custom_plugin_installation_dir" public:"false"` // PluginDir Directory containing integrations configuration files of the integrations. Each integration has his // own configuration file, named by default <integration_name>-config.yml, placed in a predefined location from // which the agent will load on initialization. // Default (Linux): /etc/newrelic-infra/integrations.d/ // Default (Windows): C:\Program Files\New Relic\newrelic-infra\integrations.d // Public: Yes PluginDir string `yaml:"plugin_dir" envconfig:"plugin_dir"` // PassthroughEnvironment A list of environment variables that will be passed to all integrations. Regular // expressions can also be provided to match one or multiple environment variables. If an integration already has // an existing configuration option with the same name, then the environment variable // takes precedence. // Default: Empty // Public: Yes PassthroughEnvironment []string `yaml:"passthrough_environment" envconfig:"passthrough_environment"` // PluginConfigFiles This configuration parameter specify the agent to look for newrelic-infra-plugins.yml // Default: Empty // Public: No PluginConfigFiles []string `envconfig:"ignored" public:"false"` // PluginInstanceDirs Internal setting, no documentation // Default: Empty // Public: No PluginInstanceDirs []string `envconfig:"ignored" public:"false"` // LoggingConfigsDir folder containing configuration files for the log forwarder. // Default: /etc/newrelic-infra/logging.d // Public: Yes LoggingConfigsDir string `yaml:"logging_configs_dir" envconfig:"logging_configs_dir" public:"true"` // LoggingBinDir folder containing binaries for the log forwarder. // Default: /var/db/newrelic-infra/newrelic-integrations/logging/ // Public: No LoggingBinDir string `yaml:"logging_bin_dir" envconfig:"logging_bin_dir" public:"false"` // LoggingHomeDir folder containing plugins and other required files for the log forwarder. // Default (Linux): /var/db/newrelic-infra/newrelic-integrations/logging/ // Default (Windows): C:\Program Files\New Relic\newrelic-infra\newrelic-integrations\logging\ // Public: No LoggingHomeDir string `yaml:"logging_home_dir" envconfig:"logging_home_dir" public:"false"` // LoggingRetryLimit determines the value of the Retry_Limit for the New Relic fluent-bit output plugin. // https://github.com/newrelic/newrelic-fluent-bit-output/blob/7cbb4393aa36e48bad783231182f707037ebf217/README.md#retry-logic // Default: "5" // Public: Yes LoggingRetryLimit string `yaml:"logging_retry_limit" envconfig:"logging_retry_limit" public:"true"` // FluentBitExePath is the location from where the agent can execute fluent-bit. // Default (Linux): /opt/td-agent-bit/bin/td-agent-bit // Default (Windows): C:\Program Files\New Relic\newrelic-infra\newrelic-integrations\logging\fluent-bit // Public: No FluentBitExePath string `yaml:"fluent_bit_exe_path" envconfig:"fluent_bit_exe_path" public:"false"` // FluentBitParsersPath is the location where the FluentBit parsers.conf file is placed. It is currently required // by the "syslog" input plugin, specifies several message parsers and comes out-of-the-box with FluentBit. // Default: /var/db/newrelic-infra/newrelic-integrations/logging/parsers.conf // Public: No FluentBitParsersPath string `yaml:"fluent_bit_parsers_path" envconfig:"fluent_bit_parsers_path" public:"false"` // FluentBitNRLibPath is the location from where fluent-bit can load the newrelic fluent-bit library. // Default: /var/db/newrelic-infra/newrelic-integrations/logging/out_newrelic.so // Public: No FluentBitNRLibPath string `yaml:"fluent_bit_nr_lib_path" envconfig:"fluent_bit_nr_lib_path" public:"false"` // HTTPServerEnabled By setting true this configuration parameter (used by statsD integration v1) the agent will // // open HTTP port (by default, 8001) to receive integration payloads via HTTP. // Default: False // Public: Yes HTTPServerEnabled bool `yaml:"http_server_enabled" envconfig:"http_server_enabled"` // HTTPServerHost By setting this value (used only by statsD integration) the agent will start listening on the // HTTPServerPort for receiving data from New Relic statsD backend. // Default: localhost // Public: Yes HTTPServerHost string `yaml:"http_server_host" envconfig:"http_server_host"` // HTTPServerPort Set the port for http server (used by statsD integration) to receive integration payloads. // Default: 8001 // Public: Yes HTTPServerPort int `yaml:"http_server_port" envconfig:"http_server_port"` // HTTPServerCert Path to a PEM-encoded certificate to listen for integration payloads over HTTPs. HTTPServerCert string `yaml:"http_server_cert" envconfig:"http_server_cert"` // HTTPServerCert Path to a PEM-encoded key to listen for integration payloads over HTTPs. HTTPServerKey string `yaml:"http_server_key" envconfig:"http_server_key"` // HTTPServerCert Path to a PEM-encoded CA certificate to enforce client certificate validation for HTTPs requests. HTTPServerCA string `yaml:"http_server_ca" envconfig:"http_server_ca"` // TCPServerEnabled By setting true this configuration parameter (used by statsD integration v1) the agent will // open an TCP port (by default, 8002) to receive integration payloads via TCP. // Default: False // Public: Yes TCPServerEnabled bool `yaml:"tcp_server_enabled" envconfig:"tcp_server_enabled"` // TCPServerPort Set the port for tcp server to receive integration payloads. // Default: 8002 // Public: Yes TCPServerPort int `yaml:"tcp_server_port" envconfig:"tcp_server_port"` // StatusServerEnabled will listen into TCP port (status_server_port) to serve status requests. // Default: False // Public: Yes StatusServerEnabled bool `yaml:"status_server_enabled" envconfig:"status_server_enabled"` // StatusServerPort Set the port for status server. // Default: 8003 // Public: Yes StatusServerPort int `yaml:"status_server_port" envconfig:"status_server_port"` // StatusServerPort Set the port for status server. // Default: IdentityURL, CommandChannelURL, MetricsIngestURL, InventoryIngestURL // Public: Yes StatusEndpoints []string `yaml:"status_endpoints" envconfig:"status_endpoints"` // AppDataDir This option is only for Windows. It defines the path to store data in a different path than the // program files directory. // - %AppDir%/data: used for storing the delta data. // - %AppDir%/user_data: external directory for user-generated json files. // - %AppDir%/newrelic-infra.log: If log file config option is not defined, then we use this directory path // as default. // Default: env(ProgramData)\New Relic\newrelic-infra // Public: Yes AppDataDir string `yaml:"app_data_dir" envconfig:"app_data_dir" os:"windows"` // DisableCloudMetadata disables cloud metadata collection. If the agent is running in a cloud instance, the Agent // will try to detect the cloud type and it will fetch metadata like: instanceID, instanceType, // cloudSource, hostType, etc. // Default: False // Public: Yes DisableCloudMetadata bool `yaml:"disable_cloud_metadata" envconfig:"disable_cloud_metadata"` // DisableCloudInstanceId is similar as DisableCloudMetadata, but DisableCloudInstanceId disables // cloud metadata collection only for host alias plugin // Default: False // Public: Yes DisableCloudInstanceId bool `yaml:"disable_cloud_instance_id" envconfig:"disable_cloud_instance_id"` // CloudMaxRetryCount If the agent is running in a cloud instance, the agent will try to detect the cloud type and // it will fetch metadata like: instanceID, instanceType, cloudSource, hostType. // This configuration parameter sets the number of retries in case that cloud detection failed. If during the agent // initialization the cloud detection fails it will retry after waiting for CloudRetryBackOffSec. // Default: 10 // Public: Yes CloudMaxRetryCount int `yaml:"cloud_max_retry_count" envconfig:"cloud_max_retry_count"` // CloudRetryBackOffSec This configuration parameter set the number of seconds delay between the cloud detection // retries in case that cloud detection failed. If during the agent initialization the cloud detection fails it // will retry for CloudMaxRetryCount times. // Default: 60 // Public: Yes CloudRetryBackOffSec int `yaml:"cloud_retry_backoff_sec" envconfig:"cloud_retry_backoff_sec"` // RegisterMaxRetryBoSecs This configuration parameter set the number of seconds delay between the // retries in case that entity registration fails. // Default: 60 // Public: Yes RegisterMaxRetryBoSecs int `yaml:"register_max_retry_backoff_sec" envconfig:"register_max_retry_backoff_sec"` // CloudMetadataExpiryInSec If the agent is running in a cloud instance, the agent will try to detect the cloud // type and it will fetch metadata like: instanceID, instanceType, cloudSource, hostType. This configuration // parameter sets the interval of time on which the metadata should be expired and re-fetched. // Default: 300 // Public: Yes CloudMetadataExpiryInSec int `yaml:"cloud_metadata_expiry_sec" envconfig:"cloud_metadata_expiry_sec"` // CloudMetadataDisableKeepAlive If the agent is running in a cloud instance, the agent will try to detect the cloud // type and it will fetch metadata like: instanceID, instanceType, cloudSource, hostType. This configuration // parameter sets HTTP Connection header to close when querying the Cloud provider metadata. // Default: true // Public: Yes CloudMetadataDisableKeepAlive bool `yaml:"cloud_metadata_disable_keep_alive" envconfig:"cloud_metadata_disable_keep_alive"` // RemoveEntitiesPeriod Defines the frequency to engage the process of deleting entities that haven't been reported // information during the frequency interval. Valid time units are: "s" (seconds), "m" (minutes), "h" (hour). // Default: 48h // Public: Yes RemoveEntitiesPeriod string `yaml:"remove_entities_period" envconfig:"remove_entities_period"` // MetricsIngestEndpoint is the path for metrics ingest endpoint. The base URL is defined in the config option // collector URL. // Default: /infra/v2/metrics // Public: No MetricsIngestEndpoint string `yaml:"metrics_ingest_endpoint" envconfig:"metrics_ingest_endpoint" public:"false"` // InventoryIngestEndpoint This is the path for inventory ingest endpoint. The base URL is defined in the config // option collector URL. // Default: /inventory // Public: No InventoryIngestEndpoint string `yaml:"inventory_ingest_endpoint" envconfig:"inventory_ingest_endpoint" public:"false"` // IdentityIngestEndpoint This is the suffix path for identity connect endpoint. The base URL is defined in the // config option as identity url. // Default: /identity/v1 // Public: No IdentityIngestEndpoint string `yaml:"identity_ingest_endpoint" envconfig:"identity_ingest_endpoint" public:"false"` // MaxMetricsBatchSizeBytes Defined Batch size in bytes for the events sent to metric-ingest. See batch_queue_depth // for more information. // Default: 1000000 // Public: No MaxMetricsBatchSizeBytes int `yaml:"max_metrics_batch_size_bytes" envconfig:"max_metrics_batch_size_bytes" public:"false"` // MaxMetricBatchEntitiesCount Defined a max amount of entities to be submitted in a single metric-ingest request. Used to avoid reach max size in req Header. // Default: 300 // Public: No MaxMetricBatchEntitiesCount int `yaml:"max_metrics_batch_entities_count" envconfig:"max_metrics_batch_entities_count" public:"false"` // MaxMetricBatchEntitiesQueue Defined a max amount of queued entities to be submited. Used to avoid memory consumption if metrics could not be submitted. // Default: 1000 // Public: No MaxMetricBatchEntitiesQueue int `yaml:"max_metrics_batch_entities_queue" envconfig:"max_metrics_batch_entities_queue" public:"false"` // ConnectEnabled It enables or disables the connect for the agent ID resolution given the agent fingerprint. // If the config option is enabled it also reconnects to update the fingerprint with the given agent ID. // In case this config is enabled then it adds the resolved agent ID in the header as X-NRI-Agent-Entity-Id. // Default: False // Public: No ConnectEnabled bool `yaml:"connect_enabled" envconfig:"connect_enabled" public:"false"` // RegisterEnabled If it's enabled the register sends the entities returned by the integrations and it assigns // these entities with an assigned entity ID. // Default: False // Public: No RegisterEnabled bool `yaml:"register_enabled" envconfig:"register_enabled" public:"false"` // FilesConfigOn enables or disables the configuration file monitoring. Disabled by default. We just keep this // configuration value for backwards compatibilities, but any new agent should enable this value. // Default: False // Public: No FilesConfigOn bool `yaml:"files_config_enabled" envconfig:"files_config_enabled" public:"false"` // DebugLogSec Value in seconds. It defines the frequency we report the memory stats // Default: 600 // Public: No DebugLogSec int `yaml:"debug_log_sec" envconfig:"debug_log_sec" public:"false"` // OfflineLoggingMode If it's enabled deltas from the plugins won't be sent. // Environment: INFRASTRUCTURE_OFFLINE_MODE (instead of boolean uses value 1 for enabling offline logging mode) // Default: False // Public: No OfflineLoggingMode bool `envconfig:"ignored" public:"false"` // WinProcessPriorityClass Only for windows: This configuration option allows increasing the newrelic-infra.exe // process priority to any of the following values: Normal, Idle, High, RealTime, BelowNormal, AboveNormal // Default: "" // Public: Yes WinProcessPriorityClass string `yaml:"win_process_priority_class" envconfig:"win_process_priority_class" os:"windows"` // WinRemovableDrives enables the Windows Agent to report drives `A:` and `B:` when they are mapped to removable // drives. // Default: True // Public: Yes WinRemovableDrives bool `yaml:"win_removable_drives" envconfig:"win_removable_drives" os:"windows"` // enables removable drives in storage sampler // LegacyStorageSampler Setting this value to true will force the agent to use windows WMI (the legacy method of // the Agent to grab metrics for Windows: e.g StorageSampler) and disable the new method which is using PDH library // Default (amd64): False // Default (386): True // Public: Yes LegacyStorageSampler bool `yaml:"legacy_storage_sampler" envconfig:"legacy_storage_sampler" os:"windows"` // RunMode It can be one of `root`, `privileged` or `unprivileged`. The value cannot be manually set, it's taken // from the runtime environment following the next heuristic: // - If the user running the agent is the `root` user, then the mode is `root`. This is the only available mode for the agent when running on Windows. // - If the user is other than `root` and the agent binary contains the following capabilities `cap_dac_read_search` and `cap_sys_ptrace` then the mode is `privileged`. // - If the user is other than `root` but the capabilities don't match the ones in the previous rule, then the mode is `unprivileged`. // Default: Runtime value // Public: No RunMode string // AgentUser The name of the user that's executing the agent process. This value is taken from the runtime // environment and cannot be manually set. The default Linux installation uses by default the `root` account to run // the agent, this can be changed using the `privileged` and `unprivileged` runmodes. In Windows the // `NT AUTHORITY\SYSTEM` account is used when the service is created by the MSI installer. // Default: Runtime value // Public: No AgentUser string // ExecutablePath The executable path of the agent process, this value is taken from the runtime environment and // cannot be manually set. // Default: Runtime value // Public: No ExecutablePath string // FirstReapInterval Defines how much do we have to wait for the first reap. // Default: 1s // Public: No FirstReapInterval time.Duration // ReapInterval Defines the frequency for the reaping process. In the reaping process we update the inventory // cached. // Default: 10s // Public: No ReapInterval time.Duration // SendInterval Defines the frequency to send the deltas. In case there is an error we use an exponential // backoff retry // Default: 10s // Public: No SendInterval time.Duration // IgnoredInventoryPathsMap It's not a configurable option. It maps the values from ignored_inventory config option // Default: Runtime value // Public: No IgnoredInventoryPathsMap map[string]struct{} // K8sIntegrationSamplesIntervalSec Interval for emitting samples defining which integrations are running for the // current pod when running inside a sidecar. // Default: 30 // Public: No K8sIntegrationSamplesIntervalSec int64 `yaml:"k8s_integration_samples_interval_sec" envconfig:"k8s_integration_samples_interval_sec" public:"false"` // MetricsNFSSampleRate Sample rate of NFS Storage Samples in seconds. Minimum value is 5. If value is -1 then // the sampler is disabled. // Default: 20 // Public: Yes MetricsNFSSampleRate int `yaml:"metrics_nfs_sample_rate" envconfig:"metrics_nfs_sample_rate"` // DetailedNFS when true will provide a complete list of NFS metrics. // Default: False // Public: Yes DetailedNFS bool `yaml:"detailed_nfs" envconfig:"detailed_nfs"` // this is the default "persister" folder that the SDK uses. right now we don't allow configuration but we could at some point // send this to the integrations for them to use for persisting data. DefaultIntegrationsTempDir string // EnableProcessMetrics enables/disables process metrics, it does not enforce when not set. // Default: empty // Public: Yes EnableProcessMetrics *bool `yaml:"enable_process_metrics" envconfig:"enable_process_metrics"` // IncludeMetricsMatchers Configuration of the metrics matchers that determine which metric data should the agent // send to the New Relic backend. // If no configuration is defined, the previous behaviour is maintained, i.e., every metric data captured is sent. // If a configuration is defined, then only metric data matching the configuration is sent. // Note that ALL DATA NOT MATCHED WILL BE DROPPED. // Also note that at present it ONLY APPLIES to metric data related to processes. All other metric data is still being sent as usual. // Default: none // Public: Yes IncludeMetricsMatchers IncludeMetricsMap `yaml:"include_matching_metrics" envconfig:"include_matching_metrics"` // AgentMetricsEndpoint Set the endpoint (host:port) for the HTTP server the agent will use to server OpenMetrics // if empty the server will be not spawned // Default: empty // Public: Yes AgentMetricsEndpoint string `yaml:"agent_metrics_endpoint" envconfig:"agent_metrics_endpoint"` // SelfInstrumentation Set the agent self instrumentation to be used. Valid values: newrelic // if empty the agent will not be self instrumented // Default: empty // Public: No SelfInstrumentation string `yaml:"self_instrumentation" envconfig:"self_instrumentation"` // SelfInstrumentationApmHost defines the url for APM collector host // Default: collector.newrelic.com // Public: No SelfInstrumentationApmHost string `yaml:"self_instrumentation_apm_host" envconfig:"self_instrumentation_apm_host"` // SelfInstrumentationTelemetryEndpoint OpenTelemetry endpoint for self instrumentation // Default: empty // Public: No SelfInstrumentationTelemetryEndpoint string `yaml:"self_instrumentation_telemetry_endpoint" envconfig:"self_instrumentation_telemetry_endpoint"` // Ntp is a map for ntp configuration. It is disabled by default. // Separate keys and values with colons :, as in KEY: VALUE, and separate each key-value pair with a line break. // Key-value can be any of the following: // "enabled: boolean" flag to enable/disable the ntp values (Default: false) // "pool: []string" list of ntp servers (Default: []) // "interval: int" interval in minutes to check ntp servers (Default: 15) // "timeout: int" ntp request timeout value in seconds (Default: 10) // Default: none // Public: Yes Ntp NtpConfig `yaml:"ntp_sample" envconfig:"ntp_sample"` // contains filtered or unexported fields }
IMPORTANT NOTE: If you add new config fields, consider checking the ignore list in the plugins/agent_config.go plugin to not send undesired fields as inventory
Configuration structs Use the 'public' annotation to specify the visibility of the config option: false/obfuscate [default: true]
func LoadConfig ¶
func NewTestWithDeltas ¶
NewTestWithDeltas creates a default testing Config submitting deltas.
func (*Config) DMIngestURL ¶
func (Config) GenerateInventoryURL ¶
GenerateInventoryURL will use the agent configuration to generate the url required for inventory endpoint.
func (*Config) GetDefaultLogFile ¶
GetDefaultLogFile sets log file to defined app data dir or default.
func (*Config) GetLogFile ¶
GetLogFile provides configured log file.
func (*Config) LogInfo ¶
func (c *Config) LogInfo()
LogInfo will log the configuration. It obfuscates sensitive information and hide private configs.
func (*Config) PublicFields ¶
PublicFields returns public config fields values indexed by YAML name. It obfuscates sensitive info.
func (*Config) SetBoolValueByYamlAttribute ¶
type CustomAttributeMap ¶
type CustomAttributeMap map[string]interface{}
func (*CustomAttributeMap) DataMap ¶
func (c *CustomAttributeMap) DataMap() (d data.Map)
DataMap returns the CustomAttributeMap as a data.Map
func (*CustomAttributeMap) Decode ¶
func (c *CustomAttributeMap) Decode(value string) error
type IncludeMetricsMap ¶
IncludeMetricsMap configuration type to Map include_matching_metrics setting env var
func (*IncludeMetricsMap) Decode ¶
func (i *IncludeMetricsMap) Decode(value string) error
type LogConfig ¶
type LogConfig struct { File string `yaml:"file" envconfig:"file"` Level string `yaml:"level" envconfig:"level"` Format string `yaml:"format" envconfig:"format"` Forward *bool `yaml:"forward,omitempty" envconfig:"forward"` ToStdout *bool `yaml:"stdout,omitempty" envconfig:"stdout"` SmartLevelEntryLimit *int `yaml:"smart_level_entry_limit,omitempty" envconfig:"smart_level_entry_limit"` IncludeFilters LogFilters `yaml:"include_filters" envconfig:"include_filters"` ExcludeFilters LogFilters `yaml:"exclude_filters" envconfig:"exclude_filters"` Rotate LogRotateConfig `yaml:"rotate" envconfig:"rotate"` }
LogConfig map all logging configuration options
func NewLogConfig ¶
func NewLogConfig() *LogConfig
func (*LogConfig) AttachDefaultFilters ¶
func (lc *LogConfig) AttachDefaultFilters()
func (*LogConfig) GetSmartLogLevelLimit ¶
GetSmartLogLevelLimit returns the defined smart log level limit.
func (*LogConfig) HasIncludeFilter ¶
HasIncludeFilter returns true if key-value pair are included in the filtering configuration.
func (*LogConfig) IsSmartLogging ¶
IsSmartLogging returns if smart level is enabled.
func (*LogConfig) IsStdoutEnabled ¶
IsStdoutEnabled returns if logs should be logged to stdout.
func (*LogConfig) IsTroubleshootMode ¶
IsTroubleshootMode triggers FluentBit log forwarder to submit agent log. If agent is not running under systemd service this mode enables agent logging to a log file (if not present already).
func (*LogConfig) VerboseEnabled ¶
VerboseEnabled return 1 if debug or higher log level is enabled. The primary purpose is for backwards compatibility with Verbose int attribute.
type LogFilters ¶
type LogFilters map[string][]interface{}
LogFilters configuration specifies which log entries should be included/excluded.
func (*LogFilters) Decode ¶
func (i *LogFilters) Decode(value string) error
type LogForward ¶
type LogForward struct { Troubleshoot Troubleshoot ConfigsDir string HomeDir string License string IsFedramp bool IsStaging bool ProxyCfg LogForwardProxy RetryLimit string }
LogForward log forwarder config values.
func NewLogForward ¶
func NewLogForward(config *Config, troubleshoot Troubleshoot) LogForward
NewLogForward creates a valid log forwarder config.
type LogForwardProxy ¶
type LogRotateConfig ¶
type LogRotateConfig struct { MaxSizeMb int `yaml:"max_size_mb" envconfig:"max_size_mb"` MaxFiles int `yaml:"max_files" envconfig:"max_files"` CompressionEnabled bool `yaml:"compression_enabled" envconfig:"compression_enabled"` FilePattern string `yaml:"file_pattern" envconfig:"file_pattern"` }
LogRotateConfig map all log rotator configuration options
func (*LogRotateConfig) IsEnabled ¶
func (l *LogRotateConfig) IsEnabled() bool
IsEnabled checks if log rotation is enabled.
type NtpConfig ¶ added in v0.1.0
type NtpConfig struct { Pool []string `yaml:"pool" envconfig:"pool"` Enabled bool `yaml:"enabled" envconfig:"enabled"` Interval uint `yaml:"interval" envconfig:"interval"` Timeout uint `yaml:"timeout" envconfig:"timeout"` }
NtpConfig map all ntp configuration options.
func NewNtpConfig ¶ added in v0.1.0
func NewNtpConfig() NtpConfig
type Troubleshoot ¶
Troubleshoot trobleshoot mode configuration.
func NewTroubleshootCfg ¶
func NewTroubleshootCfg(isTroubleshootMode, agentLogsToFile bool, agentLogFile string) Troubleshoot
NewTroubleshootCfg creates a troubleshooting mode config.