Skip to content
Snippets Groups Projects
Commit 7c6edb7a authored by nimrod's avatar nimrod
Browse files

Added enough to build the image of curator.

parent 4490ddc0
No related branches found
No related tags found
No related merge requests found
MIT License
Copyright (c) 2017 Adar Nimrod
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# ELK Docker
> A dockerized ELK stack.
## Requirements
- Docker
- Docker Compose
## License
This software is licensed under the MIT license (see `LICENSE.txt`).
## Author Information
Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my [website](
https://www.shore.co.il/). Patches are welcome via [`git send-email`](
http://git-scm.com/book/en/v2/Git-Commands-Email). The repository is located
at: <https://www.shore.co.il/git/>.
*
FROM python:3.6-alpine
RUN pip install --no-cache-dir elasticsearch-curator==5.4.1
CMD /usr/sbin/crond -f
# curator-docker
> A dockerized Elasticsearch Curator.
## Usage
This image contains the Elasticsearch Curator but runs a Cron daemon. To use
this image you need to provide your `crontab` and perhaps `config.yml` and
`actions.yml` for Curator.
An example mounting a `crontab` as a volume (every day at 01:00 delete
`logstash-` indices older than 7 days).
```
docker run -v crontab:/var/spool/cron/crontabs/nobody:ro adarnimrod/curator
```
And the accompanying `crontab`
```
0 1 * * * /usr/local/bin/curator_cli --host elastic delete_indices --filter_list '[{"filtertype": "pattern", "kind": "prefix", "value": "logstash-"}, {"filtertype": "age", "source": "creation_date", "direction": "older", "unit": "days", "unit_count": 7}]'
```
Or you can build your own image, using this one as a base
```
FROM adarnimrod/curator
COPY config.yml /etc/curator.yml
COPY actions.yml /actions.yml
COPY crontab /var/spool/cron/crontabs/nobody
```
## License
This software is licensed under the MIT license (see `LICENSE.txt`).
## Author Information
Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my [website](
https://www.shore.co.il/). Patches are welcome via [`git send-email`](
http://git-scm.com/book/en/v2/Git-Commands-Email). The repository is located
at: <https://www.shore.co.il/git/>.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment