Most servers fail quietly: disk space creeps upward, a service restarts at 3 a.m., a certificate expires unnoticed, and nobody reads the logs until a user complains. An AI daily server report fixes this by collecting your server’s health signals every morning, asking a local language model to summarize them in plain language, and emailing you a short digest you can actually read with your coffee. In this guide, you will build exactly that: a cron job that gathers system metrics, sends them to a self-hosted LLM, and delivers a readable AI daily server report every morning — with no data leaving your server.

How an AI Daily Server Report Works
The pipeline has four simple stages. First, a collection script gathers facts: CPU and memory usage, disk and inode usage, failed systemd services, recent authentication failures, pending updates, and certificate expiry dates. Second, those facts are formatted as a compact text summary. Third, a local LLM — running on the server itself through a tool like Ollama — reads that summary and writes a human-readable report: what is healthy, what needs attention, and what to do next. Fourth, the report is emailed to you. Because the model runs locally, your logs and hostnames never go to a third-party API, which matters if your servers hold client or internal data.
The model is not monitoring: it does not replace thresholds and alerts. Its job is interpretation. Raw numbers like “disk 87%” become “the backup volume will fill in about nine days at the current growth rate — clean up old snapshots this week.” That translation is what turns a wall of metrics into a morning habit you will actually follow.
Prerequisites
- A Linux server (Ubuntu 22.04 or later, or any systemd-based distribution) with at least 8 GB of RAM if you plan to run a small local model on the same host; otherwise any server plus a separate machine running the model.
- Ollama installed for local LLM inference, or access to an LLM API you trust with your metrics.
- A working mail setup on the server (
msmtp,postfixas a send-only relay, or any SMTP client) so the report can be emailed. - Root or sudo access to install packages and edit cron jobs.
Step 1: Install Ollama and Pull a Small Model
Ollama packages local model serving into a single service. Install it from the official installer, then pull a small, capable model — a 7 to 8 billion parameter model is plenty for summarization and runs comfortably on a server with 8 to 16 GB of RAM:
curl -fsSL https://ollama.com/install.sh -o /tmp/ollama-install.sh
sh /tmp/ollama-install.sh
ollama pull llama3.1:8b
Verify the model answers before going further:
ollama run llama3.1:8b "Summarize in one sentence: CPU 12 percent, memory 61 percent, disk 44 percent."
If you prefer a different model, any instruction-tuned model of similar size works the same way — the rest of this guide only depends on Ollama’s API, not on a specific model. See the official Ollama documentation for model options and hardware guidance.
Step 2: Write the Metrics Collection Script
Create a script that gathers the facts the model needs. Keep the output compact: the model summarizes better from a short, structured list than from pages of raw command output. Save this as /usr/local/bin/collect-health.sh:
#!/bin/bash
echo "=== SYSTEM LOAD ==="
uptime
free -h | head -2
echo "=== DISK USAGE ==="
df -h --output=target,pcent,avail | grep -v tmpfs
echo "=== FAILED SERVICES ==="
systemctl --failed --no-legend
echo "=== RECENT AUTH FAILURES ==="
grep "Failed password" /var/log/auth.log 2>/dev/null | tail -20 | wc -l
echo "=== PENDING UPDATES ==="
apt list --upgradable 2>/dev/null | tail -n +2 | wc -l
echo "=== REBOOT REQUIRED ==="
test -f /var/run/reboot-required && echo "YES" || echo "NO"
echo "=== TOP PROCESSES ==="
ps -eo pid,pcpu,pmem,comm --sort=-pcpu | head -6
Make it executable and run it once to confirm the output looks clean:
chmod +x /usr/local/bin/collect-health.sh
/usr/local/bin/collect-health.sh
Extend this script with anything your servers care about: SSL expiry checks with openssl s_client, Docker container status with docker ps, or the output of your existing monitoring agent. The rule is simple: if a human would want to know it before starting work, collect it.
Step 3: Build the AI Daily Server Report Generator
Next, write the script that feeds the metrics to the model and emails the result. Save it as /usr/local/bin/daily-report.sh:
#!/bin/bash
METRICS=$(/usr/local/bin/collect-health.sh)
PROMPT="You are a senior Linux system administrator. Summarize the server health metrics below into a short morning report for the server owner. Use three sections: Healthy, Needs Attention, and Recommended Actions. Be specific, mention exact numbers, and do not invent problems that are not in the data. Keep the whole report under 300 words.
METRICS:
$METRICS"
REPORT=$(curl -s http://localhost:11434/api/generate -d "{
\"model\": \"llama3.1:8b\",
\"prompt\": \"$(echo "$PROMPT" | sed 's/\"/\\"/g' | tr '\n' ' ')\",
\"stream\": false
}" | python3 -c "import sys, json; print(json.load(sys.stdin)['response'])")
{
echo "Daily Server Health Report - $(date +%F)"
echo ""
echo "$REPORT"
echo ""
echo "--- Raw metrics attached for reference ---"
echo "$METRICS"
} | mail -s "Daily Server Report $(date +%F)" [email protected]
Two design choices here are deliberate. First, the prompt constrains the model: fixed sections, exact numbers only, and a word limit keep the output consistent day to day. Second, the raw metrics are appended below the summary, so you can verify any claim the model makes without logging in. Never let an AI summary be the only copy of the data it summarizes.
Replace [email protected] with your own address and test the script manually before scheduling it. The first run also warms up the model, so it may take a minute; later runs are faster.
Step 4: Scheduling Your AI Daily Server Report with Cron
Schedule the report for early morning, before your workday starts. A 7 a.m. run gives the model time to finish and puts your AI daily server report at the top of your inbox:
crontab -e
# Daily AI server health report, every morning at 07:00
0 7 * * * /usr/local/bin/daily-report.sh >> /var/log/daily-report.log 2>&1
On a server with limited RAM, avoid running the report at the same time as backups or other heavy cron jobs — model inference competes for memory, and a slow report is a report you stop reading. If the server also runs production workloads, consider running Ollama on a separate internal host and pointing the script at its API address instead.
For a deeper look at turning raw logs into AI insight, see our guide to AI log analysis on Linux with LLMs, which covers the same local-model pattern applied to log files rather than daily metrics.
Troubleshooting Your AI Daily Server Report
The report email never arrives
Check two things separately: whether the script ran, and whether mail works. Inspect /var/log/daily-report.log for cron errors, then test mail directly with echo "test" | mail -s "test" [email protected]. Most failures are mail configuration, not the model.
The model output is empty or garbled
First confirm Ollama is running with curl http://localhost:11434/api/tags. An empty response usually means the prompt JSON was malformed — often a quote or newline that escaped badly. Simplify the prompt, test the API call by hand, and only then re-enable the cron job.
The summary invents problems that do not exist
This is the classic LLM hallucination failure, and the prompt wording is the fix. Strengthen the instruction to use only numbers present in the metrics, lower the model’s temperature if your API call supports it, and always keep the raw metrics attached so invented claims are visible. If a claim cannot be traced to a metric line, ignore it.
Reports are too long or too vague
Tighten the prompt: a word limit, fixed sections, and an explicit “mention exact numbers” instruction do more than switching models. If reports stay vague, your metrics are probably too thin — add the specific checks you actually care about, such as certificate expiry or backup job status, rather than asking the model to guess.
The server slows down during report generation
Model inference is memory-hungry. Schedule the report outside backup windows, use a smaller model, or move Ollama to a dedicated host. Do not run a large model on a production server that is already memory-constrained — a monitoring tool must never become the outage.
Conclusion
An AI daily server report turns the morning log-checking chore into a two-minute read: collect compact metrics, let a local LLM translate them into plain language, and deliver the result by email with the raw data attached for verification. Once your AI daily server report habit is established, it becomes the cheapest monitoring upgrade you will ever make. Start with the basic metrics in this guide, tune the prompt to your infrastructure, and add checks as you learn which warnings actually save you work. Within a week, you will wonder how you ever started a morning without it — and your servers will fail a little less quietly.