This is a Docker (with docker-compose) environment for Python Logging (AWS Opensearch and CloudWatch)
- First, clone this repository:
$ git clone https://github.com/nietzscheson/python-logging
- Copy the environment vars and set the AWS credentials:
$ cp .env.dist .env
- Init project
$ make
- Show containers:
$ make ps
This results in the following running containers:
> $ docker-compose ps
Name Command State Ports
-----------------------------------------------------------------------------------------------------------------------------------
opensearch ./opensearch-docker-entryp ... Up 0.0.0.0:9200->9200/tcp, 9300/tcp, 0.0.0.0:9600->9600/tcp, 9650/tcp
opensearch-dashboards ./opensearch-dashboards-do ... Up 0.0.0.0:5601->5601/tcp
py python3 Up
-
Before inserting data into Opensearch, make sure it is working by going to https://localhost:5601:
-
To shipping logs in Opensearch (In order to look at the data, you must create an index (with opensearch) and then a dashboard in the Discover tab):
$ make ingest.opensearch
- To shipping logs in AWS CloudWatch:
$ make ingest.cloudwatch