{"id":2224,"date":"2026-04-20T23:23:16","date_gmt":"2026-04-20T23:23:16","guid":{"rendered":"https:\/\/sreschool.com\/blog\/?p=2224"},"modified":"2026-05-05T07:27:33","modified_gmt":"2026-05-05T07:27:33","slug":"project-datadog-starter-observability-lab-for-ubuntu","status":"publish","type":"post","link":"https:\/\/sreschool.com\/blog\/project-datadog-starter-observability-lab-for-ubuntu\/","title":{"rendered":"Project &#8211; Datadog Starter Observability Lab for Ubuntu"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Project name<\/h2>\n\n\n\n<p><strong>Datadog Starter Observability Lab for Ubuntu<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Project idea<\/h2>\n\n\n\n<p>Students deploy a very small web app on <strong>Ubuntu Linux<\/strong> and then connect it to Datadog step by step:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Datadog Agent<\/strong> for host and infra metrics<\/li>\n\n\n\n<li><strong>APM<\/strong> for request tracing<\/li>\n\n\n\n<li><strong>Logs<\/strong> for application logs<\/li>\n\n\n\n<li><strong>Synthetic Monitoring<\/strong> for uptime\/API checks<\/li>\n\n\n\n<li><strong>RUM<\/strong> for browser\/user monitoring<\/li>\n\n\n\n<li><strong>Alerts\/Monitors<\/strong><\/li>\n\n\n\n<li><strong>Dashboard<\/strong><\/li>\n\n\n\n<li><strong>API<\/strong> call to read or create Datadog objects<\/li>\n<\/ul>\n\n\n\n<p>This matches Datadog\u2019s model well: the Agent runs on hosts and sends host telemetry, APM adds traces from the app, log collection can be enabled in the Agent config, Synthetic API tests monitor endpoints, Browser RUM captures page loads\/actions\/errors, monitors alert on thresholds, dashboards visualize the data, and the Datadog API uses API\/Application keys. (<a href=\"https:\/\/docs.datadoghq.com\/agent\/?utm_source=chatgpt.com\">Datadog<\/a>)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why this is good for basic students<\/h2>\n\n\n\n<p>It is small enough for <strong>1\u20132 hours<\/strong>, but still gives them an end-to-end observability experience:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>run an app<\/li>\n\n\n\n<li>generate traffic<\/li>\n\n\n\n<li>see metrics<\/li>\n\n\n\n<li>see traces<\/li>\n\n\n\n<li>see logs<\/li>\n\n\n\n<li>test availability<\/li>\n\n\n\n<li>create alerts<\/li>\n\n\n\n<li>build one dashboard<\/li>\n\n\n\n<li>make one API call<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Recommended app<\/h2>\n\n\n\n<p>Use a very small <strong>Python Flask app<\/strong> on Ubuntu with these endpoints:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>\/<\/code> \u2192 normal page<\/li>\n\n\n\n<li><code>\/health<\/code> \u2192 returns <code>200 OK<\/code><\/li>\n\n\n\n<li><code>\/slow<\/code> \u2192 sleeps 2\u20135 seconds<\/li>\n\n\n\n<li><code>\/error<\/code> \u2192 returns HTTP 500<\/li>\n\n\n\n<li><code>\/api\/items<\/code> \u2192 simple JSON response<\/li>\n<\/ul>\n\n\n\n<p>Also write logs to a file like <code>\/var\/log\/studentapp\/app.log<\/code>, because Datadog\u2019s Python log collection guidance is straightforward with file logging plus Agent tailing. (<a href=\"https:\/\/docs.datadoghq.com\/logs\/log_collection\/python\/?utm_source=chatgpt.com\">Datadog<\/a>)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What students must do<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. About Datadog<\/h3>\n\n\n\n<p>Ask them to explain in 2\u20133 lines:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>What Datadog is<\/li>\n\n\n\n<li>Difference between metrics, logs, traces, synthetics, and RUM<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2. Datadog Agent + Infra Monitoring<\/h3>\n\n\n\n<p>Install the Agent on Ubuntu and confirm the host appears in Datadog. The Agent is Datadog\u2019s host-side collector, and Datadog\u2019s Linux docs note the main config file is <code>\/etc\/datadog-agent\/datadog.yaml<\/code>. (<a href=\"https:\/\/docs.datadoghq.com\/agent\/supported_platforms\/linux\/?utm_source=chatgpt.com\">Datadog<\/a>)<\/p>\n\n\n\n<p><strong>Student task:<\/strong><br>Show these host metrics on screen:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>CPU<\/li>\n\n\n\n<li>Memory<\/li>\n\n\n\n<li>Disk<\/li>\n\n\n\n<li>Network<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3. APM Monitoring<\/h3>\n\n\n\n<p>Instrument the Flask app with Datadog tracing so requests to <code>\/<\/code>, <code>\/slow<\/code>, and <code>\/error<\/code> show up as traces. Datadog\u2019s APM docs describe instrumentation as adding code\/SDK support so the app sends traces, metrics, and related telemetry. (<a href=\"https:\/\/docs.datadoghq.com\/getting_started\/tracing\/?utm_source=chatgpt.com\">Datadog<\/a>)<\/p>\n\n\n\n<p><strong>Student task:<\/strong><br>Generate traffic and identify:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>which endpoint is slowest<\/li>\n\n\n\n<li>which endpoint throws errors<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">4. Log Monitoring<\/h3>\n\n\n\n<p>Enable log collection in the Agent by turning on <code>logs_enabled<\/code> in <code>datadog.yaml<\/code>, then configure the Agent to tail the application log file. Datadog\u2019s log collection docs describe exactly this flow. (<a href=\"https:\/\/docs.datadoghq.com\/logs\/log_collection\/?utm_source=chatgpt.com\">Datadog<\/a>)<\/p>\n\n\n\n<p><strong>Student task:<\/strong><br>Search logs and find:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>all error logs<\/li>\n\n\n\n<li>logs from <code>\/slow<\/code><\/li>\n\n\n\n<li>one specific user request<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">5. Synthetic Monitoring<\/h3>\n\n\n\n<p>Create <strong>one API Synthetic test<\/strong> for <code>\/health<\/code>. Datadog\u2019s Synthetic docs say API tests proactively monitor important services and can check things like expected status code and latency. (<a href=\"https:\/\/docs.datadoghq.com\/synthetics\/api_tests\/?utm_source=chatgpt.com\">Datadog<\/a>)<\/p>\n\n\n\n<p><strong>Student task:<\/strong><br>Create a test that fails when:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>status code is not 200<\/li>\n\n\n\n<li>response time is too high<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">6. RUM Monitoring<\/h3>\n\n\n\n<p>Add Datadog Browser RUM to the home page. Datadog\u2019s Browser SDK docs say RUM can capture page loads, user actions, resource loading, and application errors in real time. (<a href=\"https:\/\/docs.datadoghq.com\/real_user_monitoring\/application_monitoring\/browser\/setup\/client\/?utm_source=chatgpt.com\">Datadog<\/a>)<\/p>\n\n\n\n<p><strong>Student task:<\/strong><br>Open the page in a browser a few times and confirm they can see:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>page views<\/li>\n\n\n\n<li>page load performance<\/li>\n\n\n\n<li>a frontend click or user action<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">7. Alerts \/ Monitors<\/h3>\n\n\n\n<p>Create <strong>two simple monitors<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>CPU high on the Ubuntu host<\/li>\n\n\n\n<li>error count or failed Synthetic test<\/li>\n<\/ul>\n\n\n\n<p>Datadog\u2019s monitor docs say metric monitors alert when a metric crosses a threshold over a period of time. (<a href=\"https:\/\/docs.datadoghq.com\/monitors\/types\/metric\/?utm_source=chatgpt.com\">Datadog<\/a>)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">8. Dashboard<\/h3>\n\n\n\n<p>Create one dashboard called <strong>Student App Observability<\/strong> with:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>CPU timeseries<\/li>\n\n\n\n<li>Memory timeseries<\/li>\n\n\n\n<li>request count<\/li>\n\n\n\n<li>latency<\/li>\n\n\n\n<li>error count<\/li>\n\n\n\n<li>log stream\/list widget<\/li>\n\n\n\n<li>Synthetic status<\/li>\n<\/ul>\n\n\n\n<p>Datadog\u2019s dashboard docs recommend organizing larger dashboards with tabs, but for this lab one simple dashboard is enough. (<a href=\"https:\/\/docs.datadoghq.com\/getting_started\/dashboards\/?utm_source=chatgpt.com\">Datadog<\/a>)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">9. API<\/h3>\n\n\n\n<p>Use one simple Datadog API call:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>list dashboards, or<\/li>\n\n\n\n<li>create a dashboard\/monitor<\/li>\n<\/ul>\n\n\n\n<p>Datadog\u2019s API docs say the API is REST\/JSON and uses <code>DD-API-KEY<\/code>; some endpoints also require <code>DD-APPLICATION-KEY<\/code>. Datadog also notes API keys are required for the Agent to submit data. (<a href=\"https:\/\/docs.datadoghq.com\/api\/latest\/?utm_source=chatgpt.com\">Datadog<\/a>)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Best 1\u20132 hour execution plan<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">First 20 minutes<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>run Flask app<\/li>\n\n\n\n<li>install Datadog Agent<\/li>\n\n\n\n<li>verify host metrics<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Next 20 minutes<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>enable APM<\/li>\n\n\n\n<li>hit <code>\/<\/code>, <code>\/slow<\/code>, <code>\/error<\/code><\/li>\n\n\n\n<li>inspect traces<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Next 15 minutes<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>enable log collection<\/li>\n\n\n\n<li>view logs in Datadog<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Next 15 minutes<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>create one Synthetic API test<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Next 15 minutes<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>add Browser RUM to homepage<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Last 15 minutes<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>create 2 monitors<\/li>\n\n\n\n<li>build 1 dashboard<\/li>\n\n\n\n<li>run 1 Datadog API call<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Expected deliverables from students<\/h2>\n\n\n\n<p>Each team should submit:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>screenshot of Infrastructure host page<\/li>\n\n\n\n<li>screenshot of APM traces<\/li>\n\n\n\n<li>screenshot of Logs search<\/li>\n\n\n\n<li>screenshot of Synthetic test result<\/li>\n\n\n\n<li>screenshot of RUM view<\/li>\n\n\n\n<li>screenshot of 2 monitors<\/li>\n\n\n\n<li>screenshot of 1 dashboard<\/li>\n\n\n\n<li>one <code>curl<\/code> command for Datadog API<\/li>\n\n\n\n<li>short note: \u201cWhat issue did we detect fastest with Datadog?\u201d<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Very simple scoring rubric<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Agent + host metrics working<\/li>\n\n\n\n<li>APM visible<\/li>\n\n\n\n<li>logs searchable<\/li>\n\n\n\n<li>Synthetic test working<\/li>\n\n\n\n<li>RUM visible<\/li>\n\n\n\n<li>2 monitors created<\/li>\n\n\n\n<li>1 dashboard created<\/li>\n\n\n\n<li>1 API call successful<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Final project statement you can give students<\/h2>\n\n\n\n<p><strong>Deploy a small Flask web app on Ubuntu and make it fully observable in Datadog using Agent, Infrastructure Monitoring, APM, Logs, Synthetics, RUM, Monitors, Dashboard, and one Datadog API call. Then generate normal, slow, and failing traffic and show how Datadog helps detect each condition.<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">My recommendation<\/h2>\n\n\n\n<p>Keep the project to <strong>one host + one app + one browser page + one synthetic test<\/strong>. <\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>How to download code?<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo wget -O datadog-starter-lab-python-app.zip \\\nhttps:&#47;&#47;projectxxxxxxxx.s3.ap-south-1.amazonaws.com\/datadog-starter-lab-python-app-main.zip\n\nsudo apt install zip\n\nsudo unzip datadog-starter-lab-python-app-main.zip<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Datadog Starter Observability Lab<\/h1>\n\n\n\n<p>This project is a tiny Flask app for beginner Datadog training on Ubuntu.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Files<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>app.py<\/code> &#8211; main web app<\/li>\n\n\n\n<li><code>templates\/index.html<\/code> &#8211; homepage with optional Datadog Browser RUM snippet<\/li>\n\n\n\n<li><code>requirements.txt<\/code> &#8211; Python dependencies<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Quick start<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\nsudo apt install -y python3 python3-venv python3-pip curl\nmkdir -p ~\/datadog-lab\ncd ~\/datadog-lab<\/code><\/pre>\n\n\n\n<p>Copy these project files into the folder, then run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>python3 -m venv venv\nsource venv\/bin\/activate\npip install -r requirements.txt\nsudo mkdir -p \/var\/log\/studentapp\nsudo chown -R $USER:$USER \/var\/log\/studentapp\npython3 app.py<\/code><\/pre>\n\n\n\n<p>Open:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>http:\/\/SERVER_IP:5000\/<\/li>\n\n\n\n<li>http:\/\/SERVER_IP:5000\/health<\/li>\n\n\n\n<li>http:\/\/SERVER_IP:5000\/slow<\/li>\n\n\n\n<li>http:\/\/SERVER_IP:5000\/error<\/li>\n\n\n\n<li>http:\/\/SERVER_IP:5000\/api\/items<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Run with Datadog tracing<\/h2>\n\n\n\n<p>After the Datadog Agent is installed:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>export DD_SERVICE=studentapp\nexport DD_ENV=lab\nexport DD_VERSION=1.0.0\nexport DD_LOGS_INJECTION=true\nexport DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED=true\nexport DD_AGENT_HOST=127.0.0.1\n\nddtrace-run python3 app.py<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Enable Browser RUM<\/h2>\n\n\n\n<p>Set these before starting the app:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>export DD_RUM_ENABLED=true\nexport DD_CLIENT_TOKEN=YOUR_CLIENT_TOKEN\nexport DD_APPLICATION_ID=YOUR_RUM_APPLICATION_ID\nexport DD_SITE=datadoghq.com<\/code><\/pre>\n\n\n\n<p>Then restart the app.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Sample traffic generator<\/h2>\n\n\n\n<p>In another terminal:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>for i in {1..10}; do curl -s http:\/\/127.0.0.1:5000\/ &gt; \/dev\/null; done\nfor i in {1..5}; do curl -s http:\/\/127.0.0.1:5000\/api\/items &gt; \/dev\/null; done\nfor i in {1..3}; do curl -s http:\/\/127.0.0.1:5000\/slow &gt; \/dev\/null; done\nfor i in {1..2}; do curl -s http:\/\/127.0.0.1:5000\/error &gt; \/dev\/null; done<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Note &#8211; You need to do the project without much trainer help.<\/h2>\n\n\n\n<p>I\u2019ve packaged a <strong>ready-to-use beginner lab<\/strong> with working code and a simple README:<br>[Download the starter project ZIP] &#8211; https:\/\/github.com\/devopsschool-assignment-projects\/datadog-starter-lab-python-app<br>[View the README] &#8211; https:\/\/github.com\/devopsschool-assignment-projects\/datadog-starter-lab-python-app<br>[View the Flask app]- https:\/\/github.com\/devopsschool-assignment-projects\/datadog-starter-lab-python-app<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What students will build<\/h2>\n\n\n\n<p>A tiny Ubuntu-hosted web app with:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>\/health<\/code><\/li>\n\n\n\n<li><code>\/api\/items<\/code><\/li>\n\n\n\n<li><code>\/slow<\/code><\/li>\n\n\n\n<li><code>\/error<\/code><\/li>\n\n\n\n<li>one simple HTML page for <strong>RUM<\/strong><\/li>\n<\/ul>\n\n\n\n<p>Then they will connect it to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Datadog Agent<\/li>\n\n\n\n<li>Infra Monitoring<\/li>\n\n\n\n<li>APM<\/li>\n\n\n\n<li>Logs<\/li>\n\n\n\n<li>Synthetic Monitoring<\/li>\n\n\n\n<li>RUM<\/li>\n\n\n\n<li>Alerts<\/li>\n\n\n\n<li>Dashboard<\/li>\n\n\n\n<li>API<\/li>\n<\/ul>\n\n\n\n<p>Datadog\u2019s docs support this exact flow: install the Agent on Linux, enable traces, turn on log collection in <code>datadog.yaml<\/code>, add a custom log file config under <code>conf.d<\/code>, create Browser RUM with a <code>clientToken<\/code> and <code>applicationId<\/code>, add Synthetic API assertions like status code and response time, and use API\/Application keys for API access. ([Datadog][1])<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Exact student steps<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1) Prepare Ubuntu<\/h3>\n\n\n\n<p>Run this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\nsudo apt install -y python3 python3-venv python3-pip curl unzip<\/code><\/pre>\n\n\n\n<p>Flask\u2019s official docs support installing Flask with <code>pip<\/code> inside a virtual environment. ([Flask Documentation][2])<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2) Unzip the project<\/h3>\n\n\n\n<p>Copy <code>datadog-starter-lab.zip<\/code> to the Ubuntu machine, then run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p ~\/datadog-lab\ncd ~\/datadog-lab\nunzip datadog-starter-lab.zip\ncd datadog-starter-lab<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3) Create Python environment and install packages<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>python3 -m venv venv\nsource venv\/bin\/activate\npip install -r requirements.txt<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">4) Prepare app log folder<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mkdir -p \/var\/log\/studentapp\nsudo chown -R $USER:$USER \/var\/log\/studentapp<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">5) Install Datadog Agent on Ubuntu<\/h3>\n\n\n\n<p>For a Linux host, Datadog\u2019s tutorial shows this install pattern; replace the API key and adjust <code>DD_SITE<\/code> if your org is not on <code>datadoghq.com<\/code>. ([Datadog][3])<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DD_AGENT_MAJOR_VERSION=7 DD_API_KEY=YOUR_DATADOG_API_KEY DD_SITE=\"datadoghq.com\" bash -c \"$(curl -L https:\/\/install.datadoghq.com\/scripts\/install_script_agent7.sh)\"<\/code><\/pre>\n\n\n\n<p>Start it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo service datadog-agent start\nsudo datadog-agent status<\/code><\/pre>\n\n\n\n<p>Datadog\u2019s docs say Linux Agent install is done with the generated Linux script, and their tracing tutorial shows <code>sudo service datadog-agent start<\/code> on Linux. ([Datadog][1])<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">6) Enable log collection in the Agent<\/h3>\n\n\n\n<p>Datadog says log collection is <strong>not enabled by default<\/strong> and you must set <code>logs_enabled: true<\/code> in <code>datadog.yaml<\/code>. ([Datadog][4])<\/p>\n\n\n\n<p>Edit:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/etc\/datadog-agent\/datadog.yaml<\/code><\/pre>\n\n\n\n<p>Find this line and change it to:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>logs_enabled: true<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">7) Tell Datadog Agent to read the app log file<\/h3>\n\n\n\n<p>Datadog\u2019s host log docs say to create a new folder under <code>conf.d\/<\/code>, place a <code>conf.yaml<\/code> there, then restart the Agent. ([Datadog][5])<\/p>\n\n\n\n<p>Run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mkdir -p \/etc\/datadog-agent\/conf.d\/studentapp.d\nsudo nano \/etc\/datadog-agent\/conf.d\/studentapp.d\/conf.yaml<\/code><\/pre>\n\n\n\n<p>Paste this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>logs:\n  - type: file\n    path: \/var\/log\/studentapp\/app.log\n    service: studentapp\n    source: python<\/code><\/pre>\n\n\n\n<p>Restart the Agent:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl restart datadog-agent\nsudo datadog-agent status<\/code><\/pre>\n\n\n\n<p>Datadog also notes that on Linux the Agent runs as the <code>datadog-agent<\/code> user, so log file permissions matter. ([Datadog][6])<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">8) Run the app with APM enabled<\/h3>\n\n\n\n<p>Datadog\u2019s Python tracing docs support starting a Python app with <code>ddtrace-run<\/code>, and <code>DD_SERVICE<\/code> \/ <code>DD_VERSION<\/code> are valid config env vars for framework integrations like Flask. ([Datadog][7])<\/p>\n\n\n\n<p>Run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>source venv\/bin\/activate\n\nexport DD_SERVICE=studentapp\nexport DD_ENV=lab\nexport DD_VERSION=1.0.0\nexport DD_LOGS_INJECTION=true\nexport DD_AGENT_HOST=127.0.0.1\n\nddtrace-run python3 app.py<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">9) Open the app<\/h3>\n\n\n\n<p>On the Ubuntu machine:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl http:\/\/127.0.0.1:5000\/health<\/code><\/pre>\n\n\n\n<p>In a browser:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>http:&#47;&#47;YOUR_UBUNTU_IP:5000\/<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">10) Generate traffic for APM and Logs<\/h3>\n\n\n\n<p>Open another terminal and run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>for i in {1..10}; do curl -s http:\/\/127.0.0.1:5000\/ &gt; \/dev\/null; done\nfor i in {1..5}; do curl -s http:\/\/127.0.0.1:5000\/api\/items &gt; \/dev\/null; done\nfor i in {1..3}; do curl -s http:\/\/127.0.0.1:5000\/slow &gt; \/dev\/null; done\nfor i in {1..2}; do curl -s http:\/\/127.0.0.1:5000\/error &gt; \/dev\/null; done<\/code><\/pre>\n\n\n\n<p>Now students should see:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>host metrics from the Agent<\/li>\n\n\n\n<li>traces for the Flask app<\/li>\n\n\n\n<li>logs from <code>\/var\/log\/studentapp\/app.log<\/code><\/li>\n<\/ul>\n\n\n\n<p>Datadog\u2019s APM getting-started flow is: set up tracing, run the app, generate traffic, then explore collected traces. ([Datadog][8])<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Exact RUM setup<\/h2>\n\n\n\n<p>Datadog\u2019s Browser RUM docs say you first create a JS application in Datadog, which generates a <code>clientToken<\/code> and an <code>applicationId<\/code>, then add the SDK snippet to the page. ([Datadog][9])<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">11) Create the RUM app in Datadog<\/h3>\n\n\n\n<p>In Datadog UI:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to <strong>Digital Experience<\/strong><\/li>\n\n\n\n<li>Click <strong>Add an Application<\/strong><\/li>\n\n\n\n<li>Choose <strong>JavaScript (JS)<\/strong><\/li>\n\n\n\n<li>Create the app<\/li>\n\n\n\n<li>Copy:<\/li>\n\n\n\n<li><code>clientToken<\/code><\/li>\n\n\n\n<li><code>applicationId<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">12) Restart the app with RUM enabled<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>source venv\/bin\/activate\n\nexport DD_SERVICE=studentapp\nexport DD_ENV=lab\nexport DD_VERSION=1.0.0\nexport DD_LOGS_INJECTION=true\nexport DD_AGENT_HOST=127.0.0.1\n\nexport DD_RUM_ENABLED=true\nexport DD_CLIENT_TOKEN=YOUR_CLIENT_TOKEN\nexport DD_APPLICATION_ID=YOUR_APPLICATION_ID\nexport DD_SITE=datadoghq.com\n\nddtrace-run python3 app.py<\/code><\/pre>\n\n\n\n<p>The supplied <code>index.html<\/code> already contains the Datadog Browser RUM snippet. After that, page loads, user interactions, and frontend performance data can appear in RUM. ([Datadog][9])<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Exact Synthetic Monitoring step<\/h2>\n\n\n\n<p>Datadog\u2019s HTTP API test docs say API tests can assert things like <strong>status code<\/strong> and <strong>response time<\/strong>. ([Datadog][10])<\/p>\n\n\n\n<p>Create one Synthetic API test:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Type: <strong>HTTP<\/strong><\/li>\n\n\n\n<li>URL: <code>http:\/\/YOUR_UBUNTU_IP:5000\/health<\/code><\/li>\n\n\n\n<li>Assertions:<\/li>\n\n\n\n<li>status code = <code>200<\/code><\/li>\n\n\n\n<li>response time &lt; <code>2000 ms<\/code><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Exact Monitor tasks<\/h2>\n\n\n\n<p>Ask students to create these 2 monitors:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>CPU monitor<\/strong> on the Ubuntu host<\/li>\n\n\n\n<li><strong>Synthetic failure monitor<\/strong> for <code>\/health<\/code><\/li>\n<\/ol>\n\n\n\n<p>Datadog\u2019s monitor docs cover metric threshold monitors, and Synthetics results can also be used operationally for alerting. ([Datadog][11])<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Exact Dashboard tasks<\/h2>\n\n\n\n<p>Ask students to create one dashboard called:<\/p>\n\n\n\n<p><strong>Student App Observability<\/strong><\/p>\n\n\n\n<p>Add widgets for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>CPU<\/li>\n\n\n\n<li>Memory<\/li>\n\n\n\n<li>request count<\/li>\n\n\n\n<li>latency<\/li>\n\n\n\n<li>error count<\/li>\n\n\n\n<li>log stream<\/li>\n\n\n\n<li>Synthetic result<\/li>\n<\/ul>\n\n\n\n<p>Datadog dashboards are intended for combining these telemetry views in one place. ([Datadog][12])<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Exact API task<\/h2>\n\n\n\n<p>Datadog\u2019s API docs say:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>write requests need an API key<\/li>\n\n\n\n<li>read requests also need an Application key<\/li>\n\n\n\n<li>headers are <code>DD-API-KEY<\/code> and <code>DD-APPLICATION-KEY<\/code> ([Datadog][13])<\/li>\n<\/ul>\n\n\n\n<p>Give students this exact example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>export DD_API_KEY=YOUR_API_KEY\nexport DD_APP_KEY=YOUR_APPLICATION_KEY\n\ncurl -X GET \"https:\/\/api.datadoghq.com\/api\/v1\/dashboard\/lists\/manual\" \\\n  -H \"Accept: application\/json\" \\\n  -H \"DD-API-KEY: ${DD_API_KEY}\" \\\n  -H \"DD-APPLICATION-KEY: ${DD_APP_KEY}\"<\/code><\/pre>\n\n\n\n<p>If they use EU instead of US1, use the Datadog EU API host instead. Datadog\u2019s auth docs note that API hosts vary by site. ([Datadog][13])<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What students should submit<\/h2>\n\n\n\n<p>Have each team submit:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>screenshot of <strong>Infrastructure host<\/strong><\/li>\n\n\n\n<li>screenshot of <strong>APM traces<\/strong><\/li>\n\n\n\n<li>screenshot of <strong>Logs Explorer<\/strong><\/li>\n\n\n\n<li>screenshot of <strong>RUM<\/strong><\/li>\n\n\n\n<li>screenshot of <strong>Synthetic test<\/strong><\/li>\n\n\n\n<li>screenshot of <strong>2 monitors<\/strong><\/li>\n\n\n\n<li>screenshot of <strong>dashboard<\/strong><\/li>\n\n\n\n<li>output of the <strong>curl API command<\/strong><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Teacher note<\/h2>\n\n\n\n<p>Send to an email to DevOps@rajeshkumar.xyz<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Project name Datadog Starter Observability Lab for Ubuntu Project idea Students deploy a very small web app on Ubuntu Linux [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2224","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Project - Datadog Starter Observability Lab for Ubuntu - SRE School<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/sreschool.com\/blog\/project-datadog-starter-observability-lab-for-ubuntu\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Project - Datadog Starter Observability Lab for Ubuntu - SRE School\" \/>\n<meta property=\"og:description\" content=\"Project name Datadog Starter Observability Lab for Ubuntu Project idea Students deploy a very small web app on Ubuntu Linux [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/sreschool.com\/blog\/project-datadog-starter-observability-lab-for-ubuntu\/\" \/>\n<meta property=\"og:site_name\" content=\"SRE School\" \/>\n<meta property=\"article:published_time\" content=\"2026-04-20T23:23:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-05T07:27:33+00:00\" \/>\n<meta name=\"author\" content=\"Rajesh Kumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rajesh Kumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/sreschool.com\/blog\/project-datadog-starter-observability-lab-for-ubuntu\/\",\"url\":\"https:\/\/sreschool.com\/blog\/project-datadog-starter-observability-lab-for-ubuntu\/\",\"name\":\"Project - Datadog Starter Observability Lab for Ubuntu - SRE School\",\"isPartOf\":{\"@id\":\"https:\/\/sreschool.com\/blog\/#website\"},\"datePublished\":\"2026-04-20T23:23:16+00:00\",\"dateModified\":\"2026-05-05T07:27:33+00:00\",\"author\":{\"@id\":\"https:\/\/sreschool.com\/blog\/#\/schema\/person\/0ffe446f77bb2589992dbe3a7f417201\"},\"breadcrumb\":{\"@id\":\"https:\/\/sreschool.com\/blog\/project-datadog-starter-observability-lab-for-ubuntu\/#breadcrumb\"},\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/sreschool.com\/blog\/project-datadog-starter-observability-lab-for-ubuntu\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/sreschool.com\/blog\/project-datadog-starter-observability-lab-for-ubuntu\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/sreschool.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Project &#8211; Datadog Starter Observability Lab for Ubuntu\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/sreschool.com\/blog\/#website\",\"url\":\"https:\/\/sreschool.com\/blog\/\",\"name\":\"SRESchool\",\"description\":\"Master SRE. Build Resilient Systems. Lead the Future of Reliability\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/sreschool.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/sreschool.com\/blog\/#\/schema\/person\/0ffe446f77bb2589992dbe3a7f417201\",\"name\":\"Rajesh Kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/sreschool.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f901a4f2929fa034a291a8363d589791d5a3c1f6a051c22e744acb8bfc8e022a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f901a4f2929fa034a291a8363d589791d5a3c1f6a051c22e744acb8bfc8e022a?s=96&d=mm&r=g\",\"caption\":\"Rajesh Kumar\"},\"sameAs\":[\"http:\/\/sreschool.com\/blog\"],\"url\":\"https:\/\/sreschool.com\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Project - Datadog Starter Observability Lab for Ubuntu - SRE School","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/sreschool.com\/blog\/project-datadog-starter-observability-lab-for-ubuntu\/","og_locale":"en_US","og_type":"article","og_title":"Project - Datadog Starter Observability Lab for Ubuntu - SRE School","og_description":"Project name Datadog Starter Observability Lab for Ubuntu Project idea Students deploy a very small web app on Ubuntu Linux [&hellip;]","og_url":"https:\/\/sreschool.com\/blog\/project-datadog-starter-observability-lab-for-ubuntu\/","og_site_name":"SRE School","article_published_time":"2026-04-20T23:23:16+00:00","article_modified_time":"2026-05-05T07:27:33+00:00","author":"Rajesh Kumar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Rajesh Kumar","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/sreschool.com\/blog\/project-datadog-starter-observability-lab-for-ubuntu\/","url":"https:\/\/sreschool.com\/blog\/project-datadog-starter-observability-lab-for-ubuntu\/","name":"Project - Datadog Starter Observability Lab for Ubuntu - SRE School","isPartOf":{"@id":"https:\/\/sreschool.com\/blog\/#website"},"datePublished":"2026-04-20T23:23:16+00:00","dateModified":"2026-05-05T07:27:33+00:00","author":{"@id":"https:\/\/sreschool.com\/blog\/#\/schema\/person\/0ffe446f77bb2589992dbe3a7f417201"},"breadcrumb":{"@id":"https:\/\/sreschool.com\/blog\/project-datadog-starter-observability-lab-for-ubuntu\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/sreschool.com\/blog\/project-datadog-starter-observability-lab-for-ubuntu\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/sreschool.com\/blog\/project-datadog-starter-observability-lab-for-ubuntu\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/sreschool.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Project &#8211; Datadog Starter Observability Lab for Ubuntu"}]},{"@type":"WebSite","@id":"https:\/\/sreschool.com\/blog\/#website","url":"https:\/\/sreschool.com\/blog\/","name":"SRESchool","description":"Master SRE. Build Resilient Systems. Lead the Future of Reliability","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/sreschool.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":"Person","@id":"https:\/\/sreschool.com\/blog\/#\/schema\/person\/0ffe446f77bb2589992dbe3a7f417201","name":"Rajesh Kumar","image":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/sreschool.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f901a4f2929fa034a291a8363d589791d5a3c1f6a051c22e744acb8bfc8e022a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f901a4f2929fa034a291a8363d589791d5a3c1f6a051c22e744acb8bfc8e022a?s=96&d=mm&r=g","caption":"Rajesh Kumar"},"sameAs":["http:\/\/sreschool.com\/blog"],"url":"https:\/\/sreschool.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/sreschool.com\/blog\/wp-json\/wp\/v2\/posts\/2224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sreschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sreschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sreschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sreschool.com\/blog\/wp-json\/wp\/v2\/comments?post=2224"}],"version-history":[{"count":4,"href":"https:\/\/sreschool.com\/blog\/wp-json\/wp\/v2\/posts\/2224\/revisions"}],"predecessor-version":[{"id":2283,"href":"https:\/\/sreschool.com\/blog\/wp-json\/wp\/v2\/posts\/2224\/revisions\/2283"}],"wp:attachment":[{"href":"https:\/\/sreschool.com\/blog\/wp-json\/wp\/v2\/media?parent=2224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sreschool.com\/blog\/wp-json\/wp\/v2\/categories?post=2224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sreschool.com\/blog\/wp-json\/wp\/v2\/tags?post=2224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}