Skip to content

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.

Notifications You must be signed in to change notification settings

OldScratchy/elderwebtest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elder Web Test

Elder

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.

Project Structure

  • 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.

Requirements

  • Docker
  • Python 3
  • Pip

Installation

  1. Clone this repository.
  2. Build the Docker image:
docker build -t elder-web-test .

Usage

  1. 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

Configuration

Environment Variables

  • 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).

Fluent Bit

The fluent-bit.conf file configures Fluent Bit to run the script and send the logs to Elasticsearch.

Parsers

The parsers.conf file defines a JSON parser for the logs generated by the script.

Contributions

This is more like an "read and improve it yourself" thing.

License

This project is licensed under the tuvieja License. 👵

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages