OpenNMS事件转储Elasticsearch-创新互联
准备条件
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 服务器
地址 192.168.1.80 192.168.1.81
安装 opennms elasticsearch/kibana
Elasticsearch 配置
vi config/elasticsearch.yml
找到并修改如下参数
node.name: node-1
network.host: 0.0.0.0
cluster.initial_master_nodes: ["node-1"]
设置用户权限
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
问题
[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
临时设置
sysctl -w vm.max_map_count=262144
启动
bin/elasticsearch -d
设置密码
bin/elasticsearch-setup-passwords interactive
验证
curl http://192.168.1.81:9200 -u elastic:elastic
Kibana 配置
vi config/kibana.yml
修改如下参数
server.host: "192.168.1.81"
elasticsearch.username: "kibana"
elasticsearch.password: "kibana"
访问
http://192.168.1.81:5601
elastic/elastic
OpenNMS 配置
vi etc/org.opennms.plugin.elasticsearch.rest.forwarder.cfg
添加如下参数
elasticUrl=http://192.168.1.81:9200
elasticIndexStrategy=daily
globalElasticUser=elastic
globalElasticPassword=elastic
启用 opennms-es-rest
ssh -p8101 admin@localhost
登录karaf 密码:admin
执行命令
feature:install opennms-es-rest
查看数据
登录Kibana,用户/密码:elastic/elastic
进入 Dev Tools,在Console 执行命令
GET /opennms-events-*/_search
另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
分享标题:OpenNMS事件转储Elasticsearch-创新互联
文章出自:http://azwzsj.com/article/copshh.html