Skip to content Skip to sidebar Skip to footer

How to Install Curator with Yum For Cleansing Log in Kibana on RHEL 7

Preparation

Download and install the public signing key:

# rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch

Make Repository

# vi /etc/yum.repos.d/curator.repo

[curator-5]
name=CentOS/RHEL 7 repository for Elasticsearch Curator 5.x packages
baseurl=https://packages.elastic.co/curator/5/centos/7
gpgcheck=1
gpgkey=https://packages.elastic.co/GPG-KEY-elasticsearch
enabled=1

Installing

# yum install elasticsearch-curator

This will install the necessary files into /opt/elasticsearch-curator and make a symlink at /usr/bin/curator that points to the curator binary in the aforementioned directory.

Check Index Log

# curator_cli show_indices --verbose
How to Install Curator with Yum For Cleansing Log in Kibana on RHEL 7
How to Install Curator with Yum For Cleansing Log in Kibana on RHEL 7


Configure

Make custom config

# mkdir -p /etc/curator
# vi /etc/curator/config.yml

client:
 hosts: 192.xxx.xx.xxx
 port: 9200
 url_prefix:
 use_ssl: False
 certificate:
 client_cert:
 client_key:
 ssl_no_validate: False
 http_auth:
 timeout: 30
 master_only: False

logging:
 loglevel: INFO
 logfile: /var/log/curator.log
 logformat: default
 blacklist: ['elasticsearch', 'urllib3']

# vi /etc/curator/action.yml

actions:
 1:
  action: delete_indices
  description: Delete indices older than 90 days based on index name
  options:
    ignore_empty_list: True
    timeout_override:
    continue_if_exception: False
    disable_action: False

  filters:
  - filtertype: pattern
    kind: prefix
    value: kitsake-*
  - filtertype: age                   # Filter old age index
    source: name
    direction: older
    timestring: '%Y.%m.%d'
    unit: days
    unit_count: 90

Trying

Manual hit and keep 90 file / day 

# /usr/bin/curator --config /etc/curator/config.yml /etc/curator/action.yml

Automatic hit and keep 90 file / day with cron.d

# vi /etc/cron.d/curator

00 00 * * * root /usr/bin/curator --config /etc/curator/config.yml /etc/curator/action.yml

Post a Comment for "How to Install Curator with Yum For Cleansing Log in Kibana on RHEL 7"