System Administration Basics
Status: Active
Last Updated: 2026-08-26
Category: Sysadmin - Foundation
Prerequisites: log-management, secrets, scheduler-patterns
Tags: infrastructure, monitoring, security, patch-management, inventory, runbooks
Summary
This entry captures the recurring responsibilities every agent must fulfill when stewarding the fogserv.cloud infrastructure: inventory, observability, patch management, security, access control, and documentation discipline. The article is the operational root for the sysadmin section; every other sysadmin article (logs, secrets, scheduling) extends one of these responsibilities.
Context / Why This Matters
System administration is not a single task but a steady cycle of planning, monitoring, and improving. A clear asset inventory reduces firefighting and surfaces single points of failure before they cause incidents. Patch cadence must be routine, not reactive: applying security updates weekly, feature updates monthly, always to staging first, and recording every change in a Forgejo Issue. Without documentation discipline, every agent rebuilds the same mental model from scratch and outages cascade.
This entry complements log-management.md (observability evidence), secrets.md (credential hygiene), and scheduler-patterns.md (automation of repetitive audits). The CISA Logging Reference Architecture (OMB M-26-14, May 2026) provides a federal-grade framework for the observability pieces and is cited in log-management.md.
Implementation / Core Content
Asset Inventory
The inventory is the foundation of every other sysadmin responsibility. A complete inventory covers:
| Class | Examples | Owner | Purpose | Notes |
|---|---|---|---|---|
| Hardware | Physical hosts, VMs | infra agent | Identify which host hosts which service | Spreadsheet or Forgejo database; updated quarterly |
| Services | web, db, mail | service agent | Track service version, uptime, dependencies | Includes containers and bare-metal services |
| Secrets | .env.example variables |
security agent | Rotation cadence, last rotation date | See secrets.md |
| Certificates | TLS certs, internal CAs | security agent | Expiry dates, renewal automation | Critical: cert expiry is the most common cause of avoidable outages |
| Network | DNS records, firewall rules | network agent | Records reflect reality | DNS is a quiet dependency of almost everything |
| Backups | Targets, retention, last restore-test | infra agent | Last successful restore, location, encryption status | An untested backup is a hope, not a backup |
Update the inventory every quarter and after every deployment. The change log (below) records each update. The inventory is the source of truth that log-management.md (observability) and scheduler-patterns.md (audit automation) feed into.
Observability and Monitoring
Every host must have:
- Metrics collection — CPU, memory, disk, network (see prometheus-basics.md). Set alert thresholds before the first incident, not during it.
- Log shipping — central collection per log-management.md with retention policy enforced.
- Uptime monitoring — external check (see uptime-kuma-setup.md) plus internal health endpoints where applicable.
- Alert routing — critical alerts to on-call; informational to a daily digest (see simple-alerts.md).
Follow CISA's "Best Practices for Event Logging and Threat Detection" (August 2024) and the CISA Logging Reference Architecture (OMB M-26-14, May 2026) for federal-grade guidance. CISA's recommendations apply to any production environment, not just federal agencies.
Patch and Change Management
The 2026 patch management model is straightforward: routine, not reactive, with a defined SLA per severity tier. The four components are:
- Asset inventory — the inventory above. You cannot patch what you don't know exists.
- Vulnerability scan — automated scan of every host and container. New vulnerabilities surface daily; track them in a ticketing system.
- Prioritization — SLA per severity:
- Critical (RCE, privilege escalation, known-exploited): patch within 72 hours
- High (data exposure, authentication bypass): patch within 7 days
- Medium (DoS, information disclosure): patch within 30 days
- Low (cosmetic, hardening): next maintenance window
- Verification — confirm the patch was applied; test the service; record in the change log.
Apply changes to staging first, document results in a Forgejo Issue, and only then promote to production. Store patch automation code (Ansible, Salt, shell scripts) in Git so agentic workflows apply them consistently and roll back when needed.
Security and Access Control
- Use least privilege for every service account. A database user does not need file system access; an agent does not need root.
- Rotate credentials through the protocol in secrets.md — never ad-hoc.
- Log every rotation in the change log (below) and in the inventory.
- Segment networks and enforce zero-trust principles (mutual TLS, identity tokens, scoped roles) for agent communications.
- Review access lists quarterly: revoked users, removed keys, expired tokens.
- Pair metrics with alert thresholds, runbooks, and dashboards. Document runbooks inside the KB for quick diagnosis (see log-management.md for evidence collection and secrets.md for credential rotation).
Automation and Scheduling
Every recurring task belongs in a scheduler, not a human's calendar. Use the patterns in scheduler-patterns.md:
- Patch audits (weekly): scan hosts, file tickets, alert on stale hosts.
- Certificate renewals (daily check, 30-day expiry alert).
- Secrets rotation (per cadence in secrets.md).
- Backup verification (weekly restore-test).
- Log vacuums and retention enforcement (daily).
- Inventory sync (quarterly).
When a scheduled job fails, alert immediately and treat the missing heartbeat as a service outage. A scheduled job that silently fails is worse than no job at all.
Documentation and Onboarding
Every checklist (observability, patching, incident response) belongs in the KB. New agents should be able to onboard by reading:
- system-admin-basics.md (this entry) — operational responsibilities.
- log-management.md — observability evidence and forensics.
- secrets.md — credential lifecycle and rotation.
- scheduler-patterns.md — automation patterns.
- dotenvx.md — environment configuration.
When tooling or process changes, add a "what changed" entry describing motivation, testing, and ticket reference. The KB is the institutional memory: an agent leaving should not take operational knowledge with them.
Incident Response
When an incident occurs:
- Detect — alert fires or anomaly surfaces in dashboards.
- Triage — assess severity (P0/P1/P2/P3) and assign owner.
- Contain — stop the bleeding (rollback, isolate host, revoke secret).
- Eradicate — patch the root cause, not the symptom.
- Recover — restore service, verify health, communicate status.
- Document — write up the postmortem in a Forgejo Issue, link to the alerting evidence in log-management.md, and add a runbook entry to prevent recurrence.
Every step in the incident should produce a record: timestamps, commands run, evidence collected. The KB Change Log is the institutional timeline.
Practical Examples
Example 1: Quarterly inventory update
# 1. Pull host list from infrastructure-as-code
terraform output -json host_list > inventory_hosts.json
# 2. Pull service list from Kubernetes / docker / systemd
kubectl get svc -A -o json > inventory_services.json
# 3. Pull secrets from .env.example (names only)
awk -F= '{print $1}' .env.example | grep -v '^#' > inventory_secrets.txt
# 4. Update the inventory document with new hosts, services, secrets
# 5. Append change log entry
Example 2: Weekly patch audit
# 1. Run vulnerability scan
trivy image --severity HIGH,CRITICAL myapp:latest
trivy fs --severity HIGH,CRITICAL /opt/fogserv
# 2. Compare against inventory: which hosts run the affected versions?
# 3. Create Forgejo Issues for each affected host with severity tag
# 4. Apply critical patches within 72h SLA, high within 7d
# 5. Record each patch in the change log
Example 3: Onboard a new agent
# 1. Read system-admin-basics.md
# 2. Read log-management.md, secrets.md, scheduler-patterns.md, dotenvx.md
# 3. Review last 30 days of Forgejo Issues tagged "infra" or "ops"
# 4. Run audit checklist above with senior agent shadowing
# 5. Add new agent to inventory with role and access scope
Common Pitfalls & Troubleshooting
| Problem | Cause | Fix |
|---|---|---|
| Inventory out of date | No automation; manual updates skipped | Schedule quarterly inventory sync; tie to ticket |
| Patches applied to production before staging | No staging environment, or staging skipped | Block production deploy if staging is missing |
| Rotation undocumented | No Forgejo Issue or KB entry | Make rotation entry in KB part of the rotation script's exit criteria |
| Scheduled job silently fails | No heartbeat check | Add timestamp file; alert on stale heartbeat per simple-alerts.md |
| New agent has no onboarding path | KB not consulted on first day | Require KB reading as first task; verify with check-in |
| Incident postmortem skipped | No accountability for documentation | Tie postmortem to incident closure |
Next Steps / Ops Actions
- Run the quarterly inventory update and append a Change Log entry with the date and ticket ID.
- Audit every host against the patch SLA; file Forgejo Issues for any out-of-date critical patches.
- Schedule a monthly secrets rotation check and a weekly backup restore test per secrets.md and scheduler-patterns.md.
- Add runbooks for the top three P0/P1 incident types observed in the last 90 days.
Sources & Related Articles
External references consulted:
- CISA Logging Reference Architecture (OMB M-26-14, May 2026)
- CISA Best Practices for Event Logging and Threat Detection (Aug 2024)
- Build a Patch Management Program: SLA, Process, Tools (2026)
- Patch Management in 2026: 6 Changes Every IT Team Needs to Make
- khasky/sysadmin-operations-playbook (host baselines, access, backups, DNS/TLS/time, identity, patching)
- System Administration Fundamentals for Busy IT Teams
Related knowledge-base articles:
- log-management.md — observability evidence and forensics
- secrets.md — credential lifecycle and rotation
- scheduler-patterns.md — automation patterns
- dotenvx.md — environment configuration
- prometheus-basics.md — metrics collection
- uptime-kuma-setup.md — uptime monitoring
- simple-alerts.md — alert routing
- ../research/sysadmin.md — primary citations
- ../agentic/ai-server-management.md — agentic context
Change Log
2026-01-30 03:06 AM — Initial KB-formatted entry
- Shifted into KB store format and clarified documentation/training expectations.
2026-08-26 — Expanded to production format (Task 7 refresh)
- Expanded to full production format with asset inventory table, observability requirements, patch management SLA tiers, security and access control discipline, automation scheduling, documentation onboarding flow, and incident response steps.
- Added web-research citations: CISA Logging Reference Architecture (OMB M-26-14, May 2026), CISA Best Practices for Event Logging, 2026 patch management guides, and the khasky sysadmin operations playbook.
- Cross-linked to log-management.md, secrets.md, scheduler-patterns.md, dotenvx.md, and the observability section.