This project contains a script to check URLs and log the results. The script runs inside a Docker container and uses Fluent Bit to send the logs to an Elasticsearch service.
assets/
: Directory for additional files.dockerfile
: Dockerfile to build the container image.elder_web_test.py
: Main script to check URLs and log results.fluent-bit.conf
: Fluent Bit configuration.parsers.conf
: Parsers configuration for Fluent Bit.
- Docker
- Python 3
- Pip
- Clone this repository.
- Build the Docker image:
docker build -t elder-web-test .
- Run the Docker container:
docker run -d \
-e POLLING_INTERVAL=<int> \
-e ELASTIC_PROTOCOL=http \
-e ELASTIC_SERVICE=<ElasticSearch-Hostname> \
-e ELASTIC_PORT=9200 \
-e ELASTIC_USERNAME=<ElasticSearch-Username> \
-e ELASTIC_PASSWORD=<ElasticSearch-Password> \
-e ELASTIC_TLS=On \
-e ELASTIC_TLS_VERIFY=Off \
elder-web-test
POLLING_INTERVAL
: Time interval in seconds between each script execution.ELASTIC_PROTOCOL
: Protocol to connect to Elasticsearch (http or https).ELASTIC_SERVICE
: Elasticsearch service.ELASTIC_PORT
: Elasticsearch port.ELASTIC_USERNAME
: Username for Elasticsearch authentication.ELASTIC_PASSWORD
: Password for Elasticsearch authentication.ELASTIC_TLS
: Enable TLS (On or Off).ELASTIC_TLS_VERIFY
: Verify TLS (On or Off).
The fluent-bit.conf
file configures Fluent Bit to run the script and send the logs to Elasticsearch.
The parsers.conf
file defines a JSON parser for the logs generated by the script.
This is more like an "read and improve it yourself" thing.
This project is licensed under the tuvieja License. 👵