{"id":26096273,"url":"https://github.com/juntossomosmais/python-fluentd-testing","last_synced_at":"2025-07-10T00:02:07.905Z","repository":{"id":52696341,"uuid":"250386067","full_name":"juntossomosmais/python-fluentd-testing","owner":"juntossomosmais","description":"Test your fluentd configuration leaving manual approach aside","archived":false,"fork":false,"pushed_at":"2025-06-16T17:55:49.000Z","size":66,"stargazers_count":11,"open_issues_count":2,"forks_count":1,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-06-16T18:50:59.387Z","etag":null,"topics":["fluentd","kubernetes","pytest","python","testing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juntossomosmais.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-03-26T22:30:47.000Z","updated_at":"2025-06-16T17:55:52.000Z","dependencies_parsed_at":"2023-01-25T21:15:45.480Z","dependency_job_id":"45cb32ee-5851-4529-b6eb-d7a2cfaa33cb","html_url":"https://github.com/juntossomosmais/python-fluentd-testing","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/juntossomosmais/python-fluentd-testing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juntossomosmais%2Fpython-fluentd-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juntossomosmais%2Fpython-fluentd-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juntossomosmais%2Fpython-fluentd-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juntossomosmais%2Fpython-fluentd-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juntossomosmais","download_url":"https://codeload.github.com/juntossomosmais/python-fluentd-testing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juntossomosmais%2Fpython-fluentd-testing/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264505733,"owners_count":23618962,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fluentd","kubernetes","pytest","python","testing"],"created_at":"2025-03-09T14:36:08.876Z","updated_at":"2025-07-10T00:02:07.792Z","avatar_url":"https://github.com/juntossomosmais.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Fluentd Testing\n\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n![Integration tests status](https://github.com/juntossomosmais/python-fluentd-testing/workflows/Integration%20tests/badge.svg)\n\nTired of testing fluentd and wasting lots of your precious time with manual integration tests? How about the lag it causes to your machine?\n\nNow you can easily test your configuration with this project!\n\n## Using remote-interpreter\n\nYou can use `remote-interpreter` Docker Compose service as a remote interpreter. It's important that you use `python3` to execute your code.\n\n## Running Fluentd through Docker\n\nYou can start a Fluentd daemon by running the following command:\n\n    docker-compose run remote-interpreter fluentd -vv -c /fluentd/etc/fluent-dynatrace-1.conf\n\nThen you can enter the container:\n\n    docker exec -it python-fluentd-testing_remote-interpreter_run_ee7625b3648c bash\n\nFinally emit what you want to test, let's say:\n\n```shell\necho '{\"content\": \"Emma Brown\", \"log.source\": \"cockatiel\", \"timestamp\": \"2022-11-21T16:15:40.0000\", \"severity\": \"error\", \"service.name\": \"power-environment-service\", \"service.namespace\": \"dev-762HNW\", \"custom.attribute\": \"Fine artist\", \"audit.action\": \"GB\", \"audit.identity\": \"AHJX83322418325012\", \"audit.result\": \"Gold\", \"service.version\": \"1.0.0\", \"trace_id\": \"07edac7f-887d-498f-ab87-ad97d3b875b2\"}' | fluent-cat -p 24230 jsm.testing\n```\n\n## Run all the tests\n\nSimply execute the following command:\n\n    docker-compose up integration-tests\n\n## Run lint evaluation locally\n\nWe have a service for this as well:\n\n    docker-compose up lint\n\n## Updating pipenv dependencies\n\nIf you update Pipfile, you can issue the following command to refresh your lock file:\n\n    docker-compose run remote-interpreter pipenv update\n\n## Testing with your K8S\n\nAfter you test your configuration, you can proceed to apply your setup to your production environment. Now if you are in a phase where you would like to see if your configuration run in your real environment, like K8S, then you need to do a full manual process.\n\nWe did in the past and [here](/tests/resources/k8s-lab/README.md) you can see our tutorial.\n\n## Useful links\n\n- [How to test Fluentd config in Ruby](https://knplabs.com/en/blog/how2tips-how-to-test-fluentd-config)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuntossomosmais%2Fpython-fluentd-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuntossomosmais%2Fpython-fluentd-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuntossomosmais%2Fpython-fluentd-testing/lists"}