Search in sources :

Example 1 with OpenTSDBPortUnificationHandler

use of com.wavefront.agent.listeners.OpenTSDBPortUnificationHandler in project java by wavefrontHQ.

the class PushAgent method startOpenTsdbListener.

protected void startOpenTsdbListener(final String strPort, ReportableEntityHandlerFactory handlerFactory) {
    int port = Integer.parseInt(strPort);
    registerPrefixFilter(strPort);
    registerTimestampFilter(strPort);
    if (proxyConfig.isHttpHealthCheckAllPorts())
        healthCheckManager.enableHealthcheck(port);
    ReportableEntityDecoder<String, ReportPoint> openTSDBDecoder = new ReportPointDecoderWrapper(new OpenTSDBDecoder("unknown", proxyConfig.getCustomSourceTags()));
    ChannelHandler channelHandler = new OpenTSDBPortUnificationHandler(strPort, tokenAuthenticator, healthCheckManager, openTSDBDecoder, handlerFactory, preprocessors.get(strPort), hostnameResolver);
    startAsManagedThread(port, new TcpIngester(createInitializer(channelHandler, port, proxyConfig.getPushListenerMaxReceivedLength(), proxyConfig.getPushListenerHttpBufferSize(), proxyConfig.getListenerIdleConnectionTimeout(), getSslContext(strPort), getCorsConfig(strPort)), port).withChildChannelOptions(childChannelOptions), "listener-plaintext-opentsdb-" + port);
    logger.info("listening on port: " + strPort + " for OpenTSDB metrics");
}
Also used : ReportPointDecoderWrapper(com.wavefront.ingester.ReportPointDecoderWrapper) OpenTSDBPortUnificationHandler(com.wavefront.agent.listeners.OpenTSDBPortUnificationHandler) ChannelHandler(io.netty.channel.ChannelHandler) ReportPoint(wavefront.report.ReportPoint) ReportPoint(wavefront.report.ReportPoint) OpenTSDBDecoder(com.wavefront.ingester.OpenTSDBDecoder) TcpIngester(com.wavefront.ingester.TcpIngester)

Aggregations

OpenTSDBPortUnificationHandler (com.wavefront.agent.listeners.OpenTSDBPortUnificationHandler)1 OpenTSDBDecoder (com.wavefront.ingester.OpenTSDBDecoder)1 ReportPointDecoderWrapper (com.wavefront.ingester.ReportPointDecoderWrapper)1 TcpIngester (com.wavefront.ingester.TcpIngester)1 ChannelHandler (io.netty.channel.ChannelHandler)1 ReportPoint (wavefront.report.ReportPoint)1