溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶(hù)服務(wù)條款》

OpenNMS 事件轉(zhuǎn)儲(chǔ) Elasticsearch

發(fā)布時(shí)間:2020-02-24 13:55:54 來(lái)源:網(wǎng)絡(luò) 閱讀:299 作者:yinbangmin 欄目:網(wǎng)絡(luò)管理

準(zhǔn)備條件

1 軟件及版本

??? CentOS-7-x86_64
??? OpenNMS 25.1.0
??? elasticsearch-7.4.2-linux-x86_64.tar.gz
??? kibana-7.4.2-linux-x86_64.tar.gz

2 服務(wù)器

地址??????? 192.168.1.80??????? 192.168.1.81

安裝??????? opennms??????????? elasticsearch/kibana
Elasticsearch 配置

vi config/elasticsearch.yml
找到并修改如下參數(shù)

??? node.name: node-1
??? network.host: 0.0.0.0
??? cluster.initial_master_nodes: ["node-1"]

設(shè)置用戶(hù)權(quán)限

??? xpack.security.enabled: true
??? xpack.security.transport.ssl.enabled: true
??? xpack.security.transport.ssl.verification_mode: certificate
??? xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
??? xpack.security.transport.ssl.truststore.path: elastic-certificates.p12

問(wèn)題

[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]

解決
vi /etc/security/limits.conf

??? * soft nofile 65536
??? ?
??? * hard nofile 131072
??? ?
??? * soft nproc 2048
??? ?
??? * hard nproc 4096

[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

解決
vi /etc/sysctl.conf

vm.max_map_count=262144

sysctl -p

臨時(shí)設(shè)置

sysctl -w vm.max_map_count=262144

啟動(dòng)

bin/elasticsearch -d

設(shè)置密碼

bin/elasticsearch-setup-passwords interactive

驗(yàn)證

curl http://192.168.1.81:9200 -u elastic:elastic

Kibana 配置

vi config/kibana.yml

修改如下參數(shù)

??? server.host: "192.168.1.81"
??? ?
??? elasticsearch.username: "kibana"
??? elasticsearch.password: "kibana"

訪問(wèn)

??? http://192.168.1.81:5601
??? elastic/elastic

OpenNMS 配置

vi etc/org.opennms.plugin.elasticsearch.rest.forwarder.cfg
添加如下參數(shù)

??? elasticUrl=http://192.168.1.81:9200
??? elasticIndexStrategy=daily
??? globalElasticUser=elastic
??? globalElasticPassword=elastic


啟用 opennms-es-rest
?

??? ssh -p8101 admin@localhost
??? 登錄karaf 密碼:admin
??? ?
??? 執(zhí)行命令
??? feature:install opennms-es-rest

查看數(shù)據(jù)

登錄Kibana,用戶(hù)/密碼:elastic/elastic

進(jìn)入 Dev Tools,在Console 執(zhí)行命令

GET /opennms-events-*/_search

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI