17:57:13,696 INFO Action delete will be performed on the following indices: 17:57:13,696 INFO Pruning Kibana-related indices to prevent accidental deletion. You should see output like below, and if all goes well – success! 17:57:11,655 INFO Job starting: delete indices curator -host 127.0.0.1 delete indices -older-than 30 -time-unit days -timestring '%Y.%m.%d' The following example will cull anything older than 30days and assumes you’re running it from the localhost where elasticsearch resides. What’s important is the last bolded line – necessary Python packages are installed.Įnsure your ELK stack is up and running, or at the last that elasticsearch is accepting API connections. Successfully installed elasticsearch-curator elasticsearch click urllib3 ECLEAR ELASTY INSTALLRunning setup.py install for elasticsearch Installing es_repo_mgr script to /root/elk_cleanup/bin Installing curator script to /root/elk_cleanup/bin Running setup.py install for elasticsearch-curator Installing collected packages: elasticsearch-curator, elasticsearch, click, urllib3 Running setup.py egg_info for package urllib3 Running setup.py egg_info for package clickĭownloading/unpacking urllib3>=1.8,=1.8.0,elasticsearch-curator)ĭownloading urllib3-1.14.tar.gz (161kB): 161kB downloaded Running setup.py egg_info for package elasticsearch-curatorĭownloading/unpacking elasticsearch>=1.8.0,=3.3 (from elasticsearch-curator)ĭownloading click-6.2.tar.gz (281kB): 281kB downloaded Downloading/unpacking elasticsearch-curatorĭownloading elasticsearch-curator-3.4.1.tar.gz (89kB): 89kB downloaded You might see some warnings too but that’s ok – so long as they aren’t fatal. Namely you’ll just need elasticsearch-curator, elasticsearch, click, urllib Python modules. You’ll see a bunch of stuff happen – libraries and dependencies install. Now that we’re safely inside our cozy virtualenv, install curator pip install elasticsearch-curator Now we’re going to activate our Python virtualenv, you should see your shell prompt change. New python executable in elk_cleanup/bin/python virtualenv elk_cleanupĪt this point you should see python setuptools run and complete. Now you’re going to create a virtualenv sandbox from which to install all the necessary Python libraries via pip for running the curator. You almost always want to be using virtualenv when doing anything involving installation of Python libraries which might conflict with the ones shipped by the operating system distribution. Virtualenv is a way of installing Python libraries and running applications in a sandboxed virtual environment, similar to a system chroot. Pip is to Python what CPAN is to Perl, it’s a package manager for Python. We’ll be using the curator tool in a sandbox using pip and virtualenv on a CentOS/EL system. Now we need to remove old indexes manually from an Elasticsearch datastore sorted by age. In a previous post we covered getting started with the ELK stack (Elasticsearch, Logstash, Kibana).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |