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:

  1. Metrics collection — CPU, memory, disk, network (see prometheus-basics.md). Set alert thresholds before the first incident, not during it.
  2. Log shipping — central collection per log-management.md with retention policy enforced.
  3. Uptime monitoring — external check (see uptime-kuma-setup.md) plus internal health endpoints where applicable.
  4. 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:

  1. Asset inventory — the inventory above. You cannot patch what you don't know exists.
  2. Vulnerability scan — automated scan of every host and container. New vulnerabilities surface daily; track them in a ticketing system.
  3. 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
  4. 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

Automation and Scheduling

Every recurring task belongs in a scheduler, not a human's calendar. Use the patterns in scheduler-patterns.md:

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:

  1. system-admin-basics.md (this entry) — operational responsibilities.
  2. log-management.md — observability evidence and forensics.
  3. secrets.md — credential lifecycle and rotation.
  4. scheduler-patterns.md — automation patterns.
  5. 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:

  1. Detect — alert fires or anomaly surfaces in dashboards.
  2. Triage — assess severity (P0/P1/P2/P3) and assign owner.
  3. Contain — stop the bleeding (rollback, isolate host, revoke secret).
  4. Eradicate — patch the root cause, not the symptom.
  5. Recover — restore service, verify health, communicate status.
  6. 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

Sources & Related Articles

External references consulted:

Related knowledge-base articles:

Change Log

2026-01-30 03:06 AM — Initial KB-formatted entry

2026-08-26 — Expanded to production format (Task 7 refresh)

Choose Theme

Your selection is saved locally.

Neural Cacophony
Aperture v2
Flux v1
Mosaic Chaos
Nexus v1
Nexus Zest
Prism v2
Synapse