Package com.wavefront.agent
Class AbstractAgent
- java.lang.Object
-
- com.wavefront.agent.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 Summary
Fields Modifier and Type Field Description protected UUID
agentId
protected APIContainer
apiContainer
protected EntityPropertiesFactory
entityProps
protected static Logger
logger
protected List<ExecutorService>
managedExecutors
protected static Set<String>
PARAMETERS_TO_HIDE
A set of commandline parameters to hide when echoing command line argumentsprotected PreprocessorConfigManager
preprocessors
protected ProxyCheckInScheduler
proxyCheckinScheduler
protected ProxyConfig
proxyConfig
protected boolean
secureAllPorts
protected List<Runnable>
shutdownTasks
protected AtomicBoolean
shuttingDown
protected io.netty.handler.ssl.SslContext
sslContext
protected List<String>
tlsPorts
protected com.wavefront.api.agent.ValidationConfiguration
validationConfiguration
-
Constructor Summary
Constructors Constructor Description AbstractAgent()
AbstractAgent(boolean localAgent, boolean pushAgent)
Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected LogsIngestionConfig
loadLogsIngestionConfig()
protected void
processConfiguration(com.wavefront.api.agent.AgentConfiguration config)
Actual agents can do additional configuration.void
shutdown()
Best-effort graceful shutdown.void
start(String[] args)
Entry-point for the application.protected abstract void
startListeners()
Starts all listeners as configured.protected abstract void
stopListener(int port)
Shut down specific listener pipeline.protected abstract void
stopListeners()
Stops all listeners before terminating the process.
-
-
-
Field Detail
-
logger
protected static final Logger logger
-
PARAMETERS_TO_HIDE
protected static final Set<String> PARAMETERS_TO_HIDE
A set of commandline parameters to hide when echoing command line arguments
-
proxyConfig
protected final ProxyConfig proxyConfig
-
apiContainer
protected APIContainer apiContainer
-
managedExecutors
protected final List<ExecutorService> managedExecutors
-
preprocessors
protected final PreprocessorConfigManager preprocessors
-
validationConfiguration
protected final com.wavefront.api.agent.ValidationConfiguration validationConfiguration
-
entityProps
protected final EntityPropertiesFactory entityProps
-
shuttingDown
protected final AtomicBoolean shuttingDown
-
proxyCheckinScheduler
protected ProxyCheckInScheduler proxyCheckinScheduler
-
agentId
protected UUID agentId
-
sslContext
protected io.netty.handler.ssl.SslContext sslContext
-
secureAllPorts
protected boolean secureAllPorts
-
-
Constructor Detail
-
AbstractAgent
@Deprecated public AbstractAgent(boolean localAgent, boolean pushAgent)
Deprecated.
-
AbstractAgent
public AbstractAgent()
-
-
Method Detail
-
loadLogsIngestionConfig
protected LogsIngestionConfig loadLogsIngestionConfig()
-
start
public void start(String[] args)
Entry-point for the application.- Parameters:
args
- Command-line parameters passed on to JCommander to configure the daemon.
-
processConfiguration
protected void processConfiguration(com.wavefront.api.agent.AgentConfiguration config)
Actual agents can do additional configuration.- Parameters:
config
- The configuration to process.
-
shutdown
public void shutdown()
Best-effort graceful shutdown.
-
startListeners
protected abstract void startListeners() throws Exception
Starts all listeners as configured.- Throws:
Exception
-
stopListeners
protected abstract void stopListeners()
Stops all listeners before terminating the process.
-
stopListener
protected abstract void stopListener(int port)
Shut down specific listener pipeline.- Parameters:
port
- port number.
-
-