GithubHelp home page GithubHelp logo

aigarskadikis / es-mapping-create Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zabbix-book/es-mapping-create

0.0 1.0 1.0 17 KB

zabbix 4.0 elasticsearch mapping create

License: Apache License 2.0

Shell 95.32% PHP 4.68%

es-mapping-create's Introduction

Create ElasticSearch mapping for zabbix 4.0

This is tested and works with Zabbix 4.0 together with ElasticSearch 6.1.4

Install binaries

yum -y install java-1.8.0-openjdk
curl https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.1.4.rpm -o elasticsearch-6.1.4.rpm
rpm -ivh elasticsearch-6.1.4.rpm

Remove previous configuration

If you previously did not properly configure then these steps must be executed to remove currupted setup:

# check existing setup
curl -X GET http://localhost:9200/_cat/indices?v

# stop zabbix server
systemctl stop zabbix-server

# remove existing mapping
curl -X DELETE http://localhost:9200/uint
curl -X DELETE http://localhost:9200/dbl
curl -X DELETE http://localhost:9200/str
curl -X DELETE http://localhost:9200/log
curl -X DELETE http://localhost:9200/text

# check if no mapping is there
curl -X GET http://localhost:9200/_cat/indices?v

# there may be a case where you need to remove additional dates
curl -X DELETE http://localhost:9200/text-2019-01-23
curl -X DELETE http://localhost:9200/uint-2019-01-23
curl -X DELETE http://localhost:9200/dbl-2019-01-23

# check if no mapping is there
curl -X GET http://localhost:9200/_cat/indices?v
# it should report 'health status index uuid pri rep docs.count docs.deleted store.size pri.store.size'

Create new mapping

cd
curl https://raw.githubusercontent.com/catonrug/es-mapping-create/master/step-1-create_elastic_mapping.sh > step-1-create_elastic_mapping.sh
curl https://raw.githubusercontent.com/catonrug/es-mapping-create/master/step-2-create_elastic_template.sh > step-2-create_elastic_template.sh
curl https://raw.githubusercontent.com/catonrug/es-mapping-create/master/step-3-create_elastic_pipeline.sh > step-3-create_elastic_pipeline.sh
curl https://raw.githubusercontent.com/catonrug/es-mapping-create/master/step-4-configure-zabbix_server.conf.sh > step-4-configure-zabbix_server.conf.sh
chmod +x step*
./step-1-create_elastic_mapping.sh
./step-2-create_elastic_template.sh
./step-3-create_elastic_pipeline.sh
./step-4-configure-zabbix_server.conf.sh

Start Zabbix server

systemctl start zabbix-server

es-mapping-create's People

Contributors

aigarskadikis avatar zhausong avatar

Watchers

 avatar

Forkers

bakmah

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.