Class AbstractAgent

  • Direct Known Subclasses:
    PushAgent

    public abstract class AbstractAgent
    extends Object
    Agent that runs remotely on a server collecting metrics.
    Author:
    Clement Pang ([email protected])
    • Field Detail

      • logger

        protected static final Logger logger
      • prefix

        protected String prefix
      • token

        protected String token
      • pushValidationLevel

        protected String pushValidationLevel
      • server

        protected String server
      • retryThreads

        protected Integer retryThreads
      • flushThreads

        protected Integer flushThreads
      • pushFlushIntervalInitialValue

        protected int pushFlushIntervalInitialValue
      • pushFlushMaxPointsInitialValue

        protected int pushFlushMaxPointsInitialValue
      • pushRateLimit

        protected Integer pushRateLimit
      • pushRateLimitMaxBurstSeconds

        protected Integer pushRateLimitMaxBurstSeconds
      • pushMemoryBufferLimit

        protected AtomicInteger pushMemoryBufferLimit
      • pushBlockedSamples

        protected Integer pushBlockedSamples
      • pushListenerPorts

        protected String pushListenerPorts
      • pushListenerMaxReceivedLength

        protected Integer pushListenerMaxReceivedLength
      • pushListenerHttpBufferSize

        protected Integer pushListenerHttpBufferSize
      • traceListenerMaxReceivedLength

        protected Integer traceListenerMaxReceivedLength
      • traceListenerHttpBufferSize

        protected Integer traceListenerHttpBufferSize
      • listenerIdleConnectionTimeout

        protected int listenerIdleConnectionTimeout
      • memGuardFlushThreshold

        protected int memGuardFlushThreshold
      • histogramStateDirectory

        protected String histogramStateDirectory
      • histogramAccumulatorResolveInterval

        protected Long histogramAccumulatorResolveInterval
      • histogramAccumulatorFlushInterval

        protected Long histogramAccumulatorFlushInterval
      • histogramAccumulatorFlushMaxBatchSize

        protected Integer histogramAccumulatorFlushMaxBatchSize
      • histogramReceiveBufferFlushInterval

        @Deprecated
        protected Integer histogramReceiveBufferFlushInterval
        Deprecated.
      • histogramProcessingQueueScanInterval

        @Deprecated
        protected Integer histogramProcessingQueueScanInterval
        Deprecated.
      • histogramMaxReceivedLength

        protected Integer histogramMaxReceivedLength
      • histogramHttpBufferSize

        protected Integer histogramHttpBufferSize
      • histogramMinuteListenerPorts

        protected String histogramMinuteListenerPorts
      • histogramMinuteAccumulators

        @Deprecated
        protected Integer histogramMinuteAccumulators
        Deprecated.
      • histogramMinuteFlushSecs

        protected Integer histogramMinuteFlushSecs
      • histogramMinuteCompression

        protected Short histogramMinuteCompression
      • histogramMinuteAvgKeyBytes

        protected Integer histogramMinuteAvgKeyBytes
      • histogramMinuteAvgDigestBytes

        protected Integer histogramMinuteAvgDigestBytes
      • histogramMinuteAccumulatorSize

        protected Long histogramMinuteAccumulatorSize
      • histogramMinuteMemoryCache

        protected boolean histogramMinuteMemoryCache
      • histogramHourListenerPorts

        protected String histogramHourListenerPorts
      • histogramHourAccumulators

        @Deprecated
        protected Integer histogramHourAccumulators
        Deprecated.
      • histogramHourFlushSecs

        protected Integer histogramHourFlushSecs
      • histogramHourCompression

        protected Short histogramHourCompression
      • histogramHourAvgKeyBytes

        protected Integer histogramHourAvgKeyBytes
      • histogramHourAvgDigestBytes

        protected Integer histogramHourAvgDigestBytes
      • histogramHourAccumulatorSize

        protected Long histogramHourAccumulatorSize
      • histogramHourMemoryCache

        protected boolean histogramHourMemoryCache
      • histogramDayListenerPorts

        protected String histogramDayListenerPorts
      • histogramDayAccumulators

        @Deprecated
        protected Integer histogramDayAccumulators
        Deprecated.
      • histogramDayFlushSecs

        protected Integer histogramDayFlushSecs
      • histogramDayCompression

        protected Short histogramDayCompression
      • histogramDayAvgKeyBytes

        protected Integer histogramDayAvgKeyBytes
      • histogramDayAvgDigestBytes

        protected Integer histogramDayAvgDigestBytes
      • histogramDayAccumulatorSize

        protected Long histogramDayAccumulatorSize
      • histogramDayMemoryCache

        protected boolean histogramDayMemoryCache
      • histogramDistListenerPorts

        protected String histogramDistListenerPorts
      • histogramDistAccumulators

        @Deprecated
        protected Integer histogramDistAccumulators
        Deprecated.
      • histogramDistFlushSecs

        protected Integer histogramDistFlushSecs
      • histogramDistCompression

        protected Short histogramDistCompression
      • histogramDistAvgKeyBytes

        protected Integer histogramDistAvgKeyBytes
      • histogramDistAvgDigestBytes

        protected Integer histogramDistAvgDigestBytes
      • histogramDistAccumulatorSize

        protected Long histogramDistAccumulatorSize
      • histogramDistMemoryCache

        protected boolean histogramDistMemoryCache
      • histogramAccumulatorSize

        protected Long histogramAccumulatorSize
      • avgHistogramKeyBytes

        protected Integer avgHistogramKeyBytes
      • avgHistogramDigestBytes

        protected Integer avgHistogramDigestBytes
      • persistMessages

        @Deprecated
        protected boolean persistMessages
        Deprecated.
      • persistMessagesCompression

        @Deprecated
        protected boolean persistMessagesCompression
        Deprecated.
      • persistAccumulator

        protected boolean persistAccumulator
      • histogramCompression

        @Deprecated
        protected Short histogramCompression
        Deprecated.
      • graphitePorts

        protected String graphitePorts
      • graphiteFormat

        protected String graphiteFormat
      • graphiteDelimiters

        protected String graphiteDelimiters
      • graphiteFieldsToRemove

        protected String graphiteFieldsToRemove
      • jsonListenerPorts

        protected String jsonListenerPorts
      • dataDogJsonPorts

        protected String dataDogJsonPorts
      • dataDogRequestRelayTarget

        protected String dataDogRequestRelayTarget
      • dataDogProcessSystemMetrics

        protected boolean dataDogProcessSystemMetrics
      • dataDogProcessServiceChecks

        protected boolean dataDogProcessServiceChecks
      • writeHttpJsonListenerPorts

        protected String writeHttpJsonListenerPorts
      • filebeatPort

        protected Integer filebeatPort
      • rawLogsPort

        protected Integer rawLogsPort
      • rawLogsMaxReceivedLength

        protected Integer rawLogsMaxReceivedLength
      • rawLogsHttpBufferSize

        protected Integer rawLogsHttpBufferSize
      • logsIngestionConfigFile

        protected String logsIngestionConfigFile
      • hostname

        protected String hostname
      • idFile

        protected String idFile
      • graphiteWhitelistRegex

        protected String graphiteWhitelistRegex
      • graphiteBlacklistRegex

        protected String graphiteBlacklistRegex
      • whitelistRegex

        protected String whitelistRegex
      • blacklistRegex

        protected String blacklistRegex
      • opentsdbPorts

        protected String opentsdbPorts
      • opentsdbWhitelistRegex

        protected String opentsdbWhitelistRegex
      • opentsdbBlacklistRegex

        protected String opentsdbBlacklistRegex
      • picklePorts

        protected String picklePorts
      • traceListenerPorts

        protected String traceListenerPorts
      • traceJaegerListenerPorts

        protected String traceJaegerListenerPorts
      • traceJaegerApplicationName

        protected String traceJaegerApplicationName
      • traceZipkinListenerPorts

        protected String traceZipkinListenerPorts
      • traceZipkinApplicationName

        protected String traceZipkinApplicationName
      • traceSamplingRate

        protected double traceSamplingRate
      • traceSamplingDuration

        protected Integer traceSamplingDuration
      • traceDerivedCustomTagKeysProperty

        protected String traceDerivedCustomTagKeysProperty
      • traceAlwaysSampleErrors

        protected boolean traceAlwaysSampleErrors
      • pushRelayListenerPorts

        protected String pushRelayListenerPorts
      • splitPushWhenRateLimited

        protected boolean splitPushWhenRateLimited
      • retryBackoffBaseSeconds

        protected com.google.common.util.concurrent.AtomicDouble retryBackoffBaseSeconds
      • retryBackoffBaseSecondsInitialValue

        protected double retryBackoffBaseSecondsInitialValue
      • customSourceTagsProperty

        protected String customSourceTagsProperty
      • agentMetricsPointTags

        protected String agentMetricsPointTags
      • ephemeral

        protected boolean ephemeral
      • disableRdnsLookup

        protected boolean disableRdnsLookup
      • javaNetConnection

        @Deprecated
        protected boolean javaNetConnection
        Deprecated.
      • gzipCompression

        protected boolean gzipCompression
      • soLingerTime

        protected Integer soLingerTime
      • proxyHost

        protected String proxyHost
      • proxyPort

        protected Integer proxyPort
      • proxyUser

        protected String proxyUser
      • proxyPassword

        protected String proxyPassword
      • httpUserAgent

        protected String httpUserAgent
      • httpConnectTimeout

        protected Integer httpConnectTimeout
      • httpRequestTimeout

        protected Integer httpRequestTimeout
      • httpMaxConnTotal

        protected Integer httpMaxConnTotal
      • httpMaxConnPerRoute

        protected Integer httpMaxConnPerRoute
      • httpAutoRetries

        protected Integer httpAutoRetries
      • preprocessorConfigFile

        protected String preprocessorConfigFile
      • dataBackfillCutoffHours

        protected Integer dataBackfillCutoffHours
      • dataPrefillCutoffHours

        protected Integer dataPrefillCutoffHours
      • authTokenIntrospectionServiceUrl

        protected String authTokenIntrospectionServiceUrl
      • authTokenIntrospectionAuthorizationHeader

        protected String authTokenIntrospectionAuthorizationHeader
      • authResponseRefreshInterval

        protected int authResponseRefreshInterval
      • authResponseMaxTtl

        protected int authResponseMaxTtl
      • authStaticToken

        protected String authStaticToken
      • adminApiListenerPort

        protected Integer adminApiListenerPort
      • adminApiRemoteIpWhitelistRegex

        protected String adminApiRemoteIpWhitelistRegex
      • httpHealthCheckPorts

        protected String httpHealthCheckPorts
      • httpHealthCheckAllPorts

        protected boolean httpHealthCheckAllPorts
      • httpHealthCheckPath

        protected String httpHealthCheckPath
      • httpHealthCheckResponseContentType

        protected String httpHealthCheckResponseContentType
      • httpHealthCheckPassStatusCode

        protected int httpHealthCheckPassStatusCode
      • httpHealthCheckPassResponseBody

        protected String httpHealthCheckPassResponseBody
      • httpHealthCheckFailStatusCode

        protected int httpHealthCheckFailStatusCode
      • httpHealthCheckFailResponseBody

        protected String httpHealthCheckFailResponseBody
      • unparsed_params

        protected List<String> unparsed_params
      • deltaCountersAggregationIntervalSeconds

        protected long deltaCountersAggregationIntervalSeconds
      • deltaCountersAggregationListenerPorts

        protected String deltaCountersAggregationListenerPorts
      • PARAMETERS_TO_HIDE

        protected static final Set<String> PARAMETERS_TO_HIDE
        A set of commandline parameters to hide when echoing command line arguments
      • bufferSpaceLeft

        protected final AtomicLong bufferSpaceLeft
      • customSourceTags

        protected List<String> customSourceTags
      • traceDerivedCustomTagKeys

        protected final Set<String> traceDerivedCustomTagKeys
      • shutdownTasks

        protected final List<Runnable> shutdownTasks
      • validationConfiguration

        protected com.wavefront.api.agent.ValidationConfiguration validationConfiguration
      • pushRateLimiter

        protected com.google.common.util.concurrent.RecyclableRateLimiter pushRateLimiter
      • agentMetrics

        protected com.fasterxml.jackson.databind.JsonNode agentMetrics
      • agentMetricsCaptureTs

        protected long agentMetricsCaptureTs
      • hadSuccessfulCheckin

        protected volatile boolean hadSuccessfulCheckin
      • retryCheckin

        protected volatile boolean retryCheckin
      • serverEndpointUrl

        protected String serverEndpointUrl
      • processId

        protected final String processId
        A unique process ID value (PID, when available, or a random hexadecimal string), assigned at proxy start-up, to be reported with all ~proxy metrics as a "processId" point tag to prevent potential ~proxy metrics collisions caused by users spinning up multiple proxies with duplicate names.
      • localAgent

        protected final boolean localAgent
      • pushAgent

        protected final boolean pushAgent
      • histogramDisabled

        protected final AtomicBoolean histogramDisabled
      • spanLogsDisabled

        protected final AtomicBoolean spanLogsDisabled
      • agentId

        protected UUID agentId
    • Constructor Detail

      • AbstractAgent

        public AbstractAgent()
      • AbstractAgent

        public AbstractAgent​(boolean localAgent,
                             boolean pushAgent)
    • Method Detail

      • startListeners

        protected abstract void startListeners()
      • stopListeners

        protected abstract void stopListeners()
      • start

        public void start​(String[] args)
                   throws IOException
        Entry-point for the application.
        Parameters:
        args - Command-line parameters passed on to JCommander to configure the daemon.
        Throws:
        IOException
      • configureTokenAuthenticator

        protected void configureTokenAuthenticator()
      • createAgentService

        protected WavefrontV2API createAgentService​(String serverEndpointUrl)
        Create RESTeasy proxies for remote calls via HTTP.
      • setupQueueing

        protected void setupQueueing​(WavefrontV2API service)
      • startQueueingService

        protected void startQueueingService()
      • processConfiguration

        protected void processConfiguration​(com.wavefront.api.agent.AgentConfiguration config)
        Actual agents can do additional configuration.
        Parameters:
        config - The configuration to process.
      • setupCheckins

        protected void setupCheckins()
      • shutdown

        public void shutdown()