In this repository we will create some examples of observability infrastructure with example systems that provide data to it. These examples are just to test and show how it works! For production some changes must be made on the source code. These changes are related to provided a more reliable infrastrutucture, like creating scalability to visualization and database endpoints or securing how scrappers and system parts communicate each other.
The examples are inside the "./examples" folder and are divided by programming language. In the future, more examples will be added, even with pure infrastructure code will be provided. All these examples are brought as is by Venturus.
The examples will generally be containerized, but some examples will use an IaC tool like Terraform or Cloudformation to be deployed on public clouds. The containerized projects will run on any machine that is running Docker(tested on v20.10) and Docker Compose(tested on v1.25). The tutorial to run the examples are in their respective folder. In most cases, just following the README.md file is enough to put them running.
- Go to directory "./examples/python/fastapi"
- Run:
docker compose run - Check if prometheus, loki, graphana and fastapi containers started well.
- Access Graphana using your browser at:
http://localhost:3000- First time access user and password are:
admin - Set your new admin password!
- First time access user and password are:
- Create a Prometheus data source:
- On the left side panel in Graphana, go to option Data sources
- On the top right corner, select " + add new data source"
- Select "Prometheus"
- Configure in the Conncetion section the "Prometheus server URL" with
http://prometheus:9090 - Save and test!
- Import the dashboard:
- On the left side panel, go to Dashboards
- On the top right corner, select "New -> New dashboard"
- Select "Import a dashboard"
- Upload the "graphana_dashboard.json" file
- Select the Prometheus data source created early.
- Import!
To see the metrics turning into cool graphics we must access the FastAPI application endpoint and then see counters raising in Graphana.
- Call the "hello" endpoint inserting the following URL in your browser:
http://127.0.0.1:8000/hello - Do it more 5 times
- Go to Graphana dashboards and see the counter Fastapi Hello raising
You can contribute in many ways with this project:
To contribute with suggestions, please contact the Venturus team accessing http://www.venturus.org.br . Or you can try to leave an issue for us.
To contribute with code, just fork our project, do your changes and submit a PR to us. We will take a look on changes, and if everything is ok, your code will be merged to our repository.
Did you like our work? If you are a person who works with technology, and would love to work with these kind of things, please come to work with us. Just call our HR through our https://jobs.kenoby.com/venturus/.
If do you represent a company, come to talk with us, we probably have a solution for your problems!