cronhaven

ChatGPT for sysadmins: prompts that actually save time

Five places AI actually pulls weight in day-to-day systems work, with the prompts to do it: log triage, query writing, safe scripts, explaining a one-liner, and the writing nobody trained you for.

Most "AI for sysadmins" advice stops at "ask ChatGPT to explain this error." That works, but it is the shallow end. Here is where AI actually pulls weight in day-to-day systems work, with the prompts to do it.

1. Triage a log dump. When something floods your terminal, you do not need AI to read every line. You need it to rank the patterns. Paste a bounded window, 5 to 15 minutes around the problem, and ask it to list the distinct error patterns most frequent first, with the first and last timestamp for each, and to separate likely root cause from downstream symptom. You get a map in seconds instead of scrolling.

2. Translate intent into a query. You know you want "every 5xx from this service in the last hour grouped by instance." You do not want to remember whether it is stats count by or summarize count() by this week. Tell the AI the query language, the field names you know, and paste one sample log line so it maps fields correctly. Ask for a broader fallback variant in case the first returns nothing.

3. Draft a script that is built to be reviewed. The mistake is asking for a script and then trying to make it safe in review. Put the safety in the prompt: fail fast, a dry-run flag that changes nothing, no destructive action without an explicit confirm flag, a comment on every block explaining why. You still read the whole thing. But you are reading something structured for it.

4. Explain before you run. Someone drops a one-liner in chat and says "just run this." Before you do: ask the AI to explain it line by line, then list anything that changes state, anything irreversible, anything that touches the network, and what a safe test looks like. Tell it explicitly: do not tell me it is fine, tell me what it does.

5. Write the update nobody trained you to write. The incident status note for leadership, the change request with a real backout plan, the handoff at end of shift. Feed the AI the facts you already have and let it produce the structure. This is unglamorous and it is where the time actually goes.

The pattern across all five: be specific about the task, hand over the context you have in your head (what changed, what environment, what you already tried), and tell it how you want the answer shaped.

Get the prompts

Five of these, written out in full with the fill-ins and guardrails already in them, are free on GitHub. No email needed.

A sixth, the postmortem prompt with a complete worked example, comes free by email.

Get the postmortem prompt See the five free prompts

All 42, organized by the job in front of you, are $9: the Cronhaven Ops Prompt Library.