Hi,
I having problem with curator set as cron and last think I could think of is there is some check in the binary which don't allow it.
When I run it in shell it work OK, write into the /var/log/curator.log and does its job perfectly.
/opt/elasticsearch-curator/curator /etc/curator/action.yml --config /etc/curator/config.yml
But fun start with the crontab:
SHELL=/bin/bash
* * * * * /opt/elasticsearch-curator/curator /etc/curator/action.yml --config /etc/curator/config.yml
With this setup i says in syslog it START and END, but nothing really happen index are still open which should be deleted and nothing is logged:
Jul 17 13:11:01 elk-1 CRON[2260]: (root) CMD ([2262] /opt/elasticsearch-curator/curator /etc/curator/action.yml --config /etc/curator/config.yml)
Jul 17 13:11:01 elk-1 CRON[2260]: (root) END ([2262] /opt/elasticsearch-curator/curator /etc/curator/action.yml --config /etc/curator/config.yml)
Any ideas where might be the problem?
Versions / Config :
root@elk-1:~# curator --version
curator, version 5.5.4
root@elk-1:/etc/curator# cat config.yml
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"
client:
hosts:
- 127.0.0.1
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']
root@elk-1:/etc/curator# cat action.yml
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"
#
# Also remember that all examples have 'disable_action' set to True. If you
# want to use this action as a template, be sure to set this to False after
# copying it.
actions:
1:
action: delete_indices
description: >-
Delete indices older than 14 days (based on index name), for filebeat- prefixed indices. Ignore the error if the filter does not result in an actionable list of indices (ignore_empty_list) and exit cleanly.
options:
ignore_empty_list: True
timeout_override:
continue_if_exception: False
disable_action: False
filters:
- filtertype: pattern
kind: prefix
value: filebeat-
exclude:
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: 14
exclude:
2:
action: delete_indices
description: >-
Delete indices older than 14 days (based on index name), for winsmtp- prefixed indices. Ignore the error if the filter does not result in an actionable list of indices (ignore_empty_list) and exit cleanly.
options:
ignore_empty_list: True
timeout_override:
continue_if_exception: False
disable_action: False
filters:
- filtertype: pattern
kind: prefix
value: winsmtp-
exclude:
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: 14
exclude: