{"id":15891426,"url":"https://github.com/dbritto-dev/nd064-c3-observability-project-starter","last_synced_at":"2025-06-28T17:06:57.448Z","repository":{"id":69761721,"uuid":"423603134","full_name":"dbritto-dev/nd064-c3-observability-project-starter","owner":"dbritto-dev","description":null,"archived":false,"fork":false,"pushed_at":"2021-11-09T19:29:18.000Z","size":1702,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T17:29:19.925Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dbritto-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-11-01T20:13:57.000Z","updated_at":"2021-11-09T19:29:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"26923d01-5cd3-45e5-8e0f-b151e4ee409d","html_url":"https://github.com/dbritto-dev/nd064-c3-observability-project-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dbritto-dev/nd064-c3-observability-project-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbritto-dev%2Fnd064-c3-observability-project-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbritto-dev%2Fnd064-c3-observability-project-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbritto-dev%2Fnd064-c3-observability-project-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbritto-dev%2Fnd064-c3-observability-project-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbritto-dev","download_url":"https://codeload.github.com/dbritto-dev/nd064-c3-observability-project-starter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbritto-dev%2Fnd064-c3-observability-project-starter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262465750,"owners_count":23315638,"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":[],"created_at":"2024-10-06T07:22:04.624Z","updated_at":"2025-06-28T17:06:57.432Z","avatar_url":"https://github.com/dbritto-dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"**Note:** For the screenshots, you can store all of your answer images in the `answer-img` directory.\n\n## Verify the monitoring installation\n\n*TODO:* run `kubectl` command to show the running pods and services for all components. Take a screenshot of the output and include it here to verify the installation\n\n**Get all pods and services:**\n\n```sh\nkubectl get po,svc -A\n```\n\n**Answer image:**\n\n![All pods and services](answer-img/all-pods-and-services.png)\n\n## Setup the Jaeger and Prometheus source\n*TODO:* Expose Grafana to the internet and then setup Prometheus and Jaeger as a data source. Provide a screenshot of the home page after logging into Grafana.\n\n**Exposing Grafana to 3000:**\n\n```sh\nkubectl port-forward -n monitoring svc/prometheus-grafana --address 0.0.0.0 3000:80\n```\n\n**Answer image:**\n\n![Prometheus Grafana Home](answer-img/prometheus-grafana-home.png)\n\n## Create a Basic Dashboard\n*TODO:* Create a dashboard in Grafana that shows Prometheus as a source. Take a screenshot and include it here.\n\n**Exposing Grafana to 3000:**\n\n```sh\nkubectl port-forward -n monitoring svc/prometheus-grafana --address 0.0.0.0 3000:80\nkubectl port-forward -n observability svc/simplest-query --address 0.0.0.0 3030:16686\n```\n\n**Answer image:**\n\n![Prometheus Grafana Basic Dashboard](answer-img/prometheus-grafana-basic-dashboard.png)\n\n## Describe SLO/SLI\n*TODO:* Describe, in your own words, what the SLIs are, based on an SLO of *monthly uptime* and *request response time*.\n\nIf a Service-Level Objective (SLO) is a measurable goal like `The average time taken to return a request will be less than 200 ms, during the month of May`, a Service-Level\nIndicator (SLI) is a measurement like `The average time taken to return a request during the month of May was 194 ms`.\n\n## Creating SLI metrics.\n*TODO:* It is important to know why we want to measure certain metrics for our customer. Describe in detail 5 metrics to measure these SLIs. \n\n- `Server/Service uptime` to know if the customer can access to the app anytime.\n- `Latency` to know the amount of time the customer needs to wait until get a response.\n- `Resource consumption` to know what services consume a lot of resources and makes the app slower for the consumer.\n- `Error rate` to know what services are less robust and makes unhappy to customer.\n- `Amount of requests` to know what services needs to be improve to have a better performance to handle the requests from the customer.\n\n\n## Create a Dashboard to measure our SLIs\n*TODO:* Create a dashboard to measure the uptime of the frontend and backend services We will also want to measure to measure 40x and 50x errors. Create a dashboard that show these values over a 24 hour period and take a screenshot.\n\n**Answer image:**\n\n![Prometheus Grafana Uptime and 40x/50x Dashboard](answer-img/prometheus-grafana-uptime-and-40x-50x-dashboard.png)\n\n## Tracing our Flask App\n*TODO:*  We will create a Jaeger span to measure the processes on the backend. Once you fill in the span, provide a screenshot of it here.\n\n**Answer image:**\n\n![Jaeger Tracing Backend Dashboard](answer-img/jaeger-tracing-backend-dashboard.png)\n\n## Jaeger in Dashboards\n*TODO:* Now that the trace is running, let's add the metric to our current Grafana dashboard. Once this is completed, provide a screenshot of it here.\n\n**Answer image:**\n\n![Prometheus Grafana Jaeger Dashboard](answer-img/prometheus-grafana-jaeger-dashboard.png)\n\n## Report Error\n*TODO:* Using the template below, write a trouble ticket for the developers, to explain the errors that you are seeing (400, 500, latency) and to let them know the file that is causing the issue.\n\nTROUBLE TICKET\n\nName: add_star endpoint doesn't work properly returning a 500 http status code\nDate: 2021/09/11\nSubject: MongoDB unreachable\nAffected Area: add_star (POST /star) endpoint in backend app\nSeverity: ERROR\nDescription: Backend app cannot connect to MongoDB\n\n**Answer image:**\n\n![Jaeger Tracing Backend Add Star Span](answer-img/jaeger-tracing-backend-add-star-span.png)\n\n## Creating SLIs and SLOs\n*TODO:* We want to create an SLO guaranteeing that our application has a 99.95% uptime per month. Name three SLIs that you would use to measure the success of this SLO.\n\n- uptime\n- http request rate\n- http request time\n- error rate\n- cpu/memory usage\n\n## Building KPIs for our plan\n*TODO*: Now that we have our SLIs and SLOs, create KPIs to accurately measure these metrics. We will make a dashboard for this, but first write them down here.\n\n**Uptime**\n\nI chose these metrics because I want to know what services are available for customers\n\n- backend service uptime\n- frontend service uptime\n- trial service uptime\n\n**Latency**\n\nI chose these metrics because I want to know what's the time the customer needs to way to get a response\n\n- average of response time \n- median response time\n\n**Resource usage**\n\nI chose these metrics because I want to know what's the resource consumption of each service\n\n- Memory usage\n- CPU usage\n\n## Final Dashboard\n*TODO*: Create a Dashboard containing graphs that capture all the metrics of your KPIs and adequately representing your SLIs and SLOs. Include a screenshot of the dashboard here, and write a text description of what graphs are represented in the dashboard.  \n\n**Answer image:**\n\n![Prometheus Grafana Final Dashboard](answer-img/prometheus-grafana-final-dashboard.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbritto-dev%2Fnd064-c3-observability-project-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbritto-dev%2Fnd064-c3-observability-project-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbritto-dev%2Fnd064-c3-observability-project-starter/lists"}