Grafana、elasticsearch、kafka、logstash和pinpoint結合

1、Grafanajava

1)下載安裝node

wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.2.0-1.x86_64.rpm 
sudo yum localinstall grafana-4.2.0-1.x86_64.rpm bootstrap

2)啓動elasticsearch

service grafana-server startui

3)訪問this

地址 http://localhost:3000 就能夠訪問了。localhost爲主機ip。用戶名和密碼都爲admin日誌

4)配置server

 

 

2、elasticsearchip

1)下載安裝(注意elasticsearsh不容許使用root用戶啓動)rem

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.3.tar.gz

tar -zxvf elasticsearch-5.3.0.tar.gz

2)修改配置

配置文件:elasticsearch-5.3.0/config/elasticsearch.yml

需修改的配置

cluster.name: my-elasticsearch

node.name: node-1

discovery.zen.ping.unicast.hosts: ["10.30.218.186"]

discovery.zen.ping.unicast.hosts: ["10.30.218.186:9200"]

discovery.zen.minimum_master_nodes: 1

3)啓動

elasticsearch-5.3.0/bin/elasticsearch &

4)報錯處理

a)Elasticsearch requires at least Java 8 but your Java version from /usr/bin/java does not meet this requirement

java版本不對,能夠添加JAVA_HOME變量。

elasticsearch-5.3.0/bin/elasticsearch文件添加下面一行,將java引入。

JAVA_HOME=/var/elk/jdk1.8.0_111

b)ERROR: bootstrap checks failed
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

修改/etc/sysctl.conf

再最後一行加上

vm.max_map_count=655360

並執行

sysctl -p

從新啓動elasticsearch

 

3、kafka

一、解壓
tar -zxvf kafka_2.12-0.10.2.0.tar.gz

二、引入jdk1.8版本
vi kafka_2.12-0.10.2.0/bin/kafka-run-class.sh

增長以下配置項,添加jdk1.8
JAVA_HOME=/var/elk/jdk1.8.0_111

三、修改配置項
vi kafka_2.12-0.10.2.0/config/server.properties

#在集羣中的節點,和其餘兩個節點區分開便可
broker.id=2

(效果同以前的版本的host.name及port):注意綁定host.name,不然可能出現莫名其妙的錯誤如consumer找不到broker。這個host.name是Kafka的server的機器名字,會註冊到Zookeeper中
listeners=PLAINTEXT://10.21.1.248:9092

advertised.listeners=PLAINTEXT://10.21.1.248:9092
#日誌目錄
log.dirs=/var/elk/kafka_2.12-0.10.2.0/logs
#zookeeper配置項(zookeeper另外搭建的集羣)
zookeeper.connect=10.21.xx.83:2181,10.21.xx.249:2181,10.21.xx.248:2181

四、啓動: nohup /var/elk/kafka_2.12-0.10.2.0/bin/kafka-server-start.sh /var/elk/kafka_2.12-0.10.2.0/config/server.properties &

相關文章
相關標籤/搜索