Authored by jack

Merge branch 'master' of http://git.yoho.cn/ops/monitor-service

package com.monitor.middleware.rabbitmq.component;
import com.monitor.middleware.rabbitmq.model.PointView;
import com.squareup.okhttp.OkHttpClient;
import okhttp3.OkHttpClient;
import org.influxdb.InfluxDB;
import org.influxdb.InfluxDBFactory;
import org.influxdb.dto.Query;
... ... @@ -10,7 +10,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import retrofit.client.OkClient;
import javax.annotation.PostConstruct;
import java.util.concurrent.TimeUnit;
... ... @@ -44,15 +43,12 @@ public class InfluxComp {
@PostConstruct
public void init() {
OkHttpClient okHttpClient = new OkHttpClient();
OkHttpClient.Builder builder = new OkHttpClient.Builder();
builder.connectTimeout(15, TimeUnit.SECONDS);
builder.readTimeout(40, TimeUnit.SECONDS);
builder.writeTimeout(20, TimeUnit.SECONDS);
okHttpClient.setConnectTimeout(15, TimeUnit.SECONDS);
okHttpClient.setReadTimeout(40, TimeUnit.SECONDS);
okHttpClient.setWriteTimeout(20, TimeUnit.SECONDS);
influxDBClient = InfluxDBFactory.connect(this.influxUrl, this.influxUser, this.influxPwd, new OkClient(okHttpClient));
influxDBClient = InfluxDBFactory.connect(this.influxUrl, this.influxUser, this.influxPwd, builder);
}
public void doWriteView(PointView pointView, String DBName) {
... ...
... ... @@ -2,13 +2,11 @@ package com.monitor.middleware.rabbitmq.model;
import com.monitor.middleware.rabbitmq.component.InfluxComp;
import com.monitor.middleware.rabbitmq.constant.InterVar;
import com.squareup.okhttp.OkHttpClient;
import lombok.Data;
import org.influxdb.InfluxDB;
import org.influxdb.InfluxDBFactory;
import org.influxdb.dto.BatchPoints;
import org.influxdb.dto.Point;
import retrofit.client.OkClient;
import java.util.ArrayList;
import java.util.List;
... ...
package com.monitor.nginxsync.nio.service;
import com.monitor.nginxsync.nio.handler.LogMsgHandler;
import com.squareup.okhttp.Call;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelInitializer;
... ...
... ... @@ -19,10 +19,10 @@ datasources:
yohobuy_logs:
servers:
- 192.168.102.219:3306
- 192.168.102.219:3306
username: yh_test
password: 9nm0icOwt6bMHjMusIfMLw==
- yohologs.yohoops.org:3306
- yohologs.yohoops.org:3306
username: yh_vpc_bak
password: +BfhVxZQ4LuPKt+QxSy9naMwEu/zaKV31I9S8xDJIUA=
daos:
- com.monitor.mysql.mapper.SMSLogsMapper
... ...
package com.monitor.zabbix.comp;
import com.monitor.zabbix.constants.Constants;
import com.squareup.okhttp.OkHttpClient;
import okhttp3.OkHttpClient;
import org.influxdb.InfluxDB;
import org.influxdb.InfluxDBFactory;
import org.influxdb.dto.BatchPoints;
... ... @@ -12,7 +12,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import retrofit.client.OkClient;
import javax.annotation.PostConstruct;
import java.util.concurrent.TimeUnit;
... ... @@ -38,15 +37,13 @@ public class InfluxdbComp {
@PostConstruct
public void init() {
OkHttpClient okHttpClient = new OkHttpClient();
OkHttpClient.Builder builder = new OkHttpClient.Builder();
builder.connectTimeout(15, TimeUnit.SECONDS);
builder.readTimeout(40, TimeUnit.SECONDS);
builder.writeTimeout(20, TimeUnit.SECONDS);
okHttpClient.setConnectTimeout(15, TimeUnit.SECONDS);
okHttpClient.setReadTimeout(40, TimeUnit.SECONDS);
okHttpClient.setWriteTimeout(20, TimeUnit.SECONDS);
influxDBClient = InfluxDBFactory.connect(this.influxUrl, this.influxUser, this.influxPwd, new OkClient(okHttpClient));
influxDBClient = InfluxDBFactory.connect(this.influxUrl, this.influxUser, this.influxPwd, builder);
}
... ...