{
  "version": 1,
  "templates": [
    {
      "name": "Service log",
      "type": "command",
      "content": "journalctl -u {{service}} -n {{lines}} --no-pager",
      "note": "The last lines of one systemd unit's journal. Asks for the unit (e.g. nginx) and how many lines.",
      "visibility": "shared",
      "requires_sudo": false,
      "tags": ["logs", "systemd"]
    },
    {
      "name": "Service status",
      "type": "command",
      "content": "systemctl status {{service}} --no-pager",
      "note": "One unit's state, its main PID and its last log lines.",
      "visibility": "shared",
      "requires_sudo": false,
      "tags": ["systemd"]
    },
    {
      "name": "Failed units",
      "type": "command",
      "content": "systemctl --failed",
      "note": "Every systemd unit that is in the failed state.",
      "visibility": "shared",
      "requires_sudo": false,
      "tags": ["systemd"]
    },
    {
      "name": "Disk usage",
      "type": "command",
      "content": "df -h",
      "note": "Free and used space on every mounted filesystem.",
      "visibility": "shared",
      "requires_sudo": false,
      "tags": ["disk"]
    },
    {
      "name": "Listening ports",
      "type": "command",
      "content": "ss -ltnp",
      "note": "TCP ports in LISTEN. The process names show for other users' sockets only when run as root.",
      "visibility": "shared",
      "requires_sudo": false,
      "tags": ["network"]
    },
    {
      "name": "Kernel messages",
      "type": "command",
      "content": "dmesg -T | tail -50",
      "note": "The last 50 kernel messages with readable times. Needs root where kernel.dmesg_restrict is set.",
      "visibility": "shared",
      "requires_sudo": false,
      "tags": ["kernel", "logs"]
    },
    {
      "name": "Time and sync",
      "type": "command",
      "content": "timedatectl",
      "note": "Local and UTC time, the time zone, and whether NTP has synchronised the clock.",
      "visibility": "shared",
      "requires_sudo": false,
      "tags": ["time"]
    },
    {
      "name": "Memory",
      "type": "command",
      "content": "free -h",
      "note": "RAM and swap, used and available.",
      "visibility": "shared",
      "requires_sudo": false,
      "tags": ["memory"]
    },
    {
      "name": "Addresses",
      "type": "command",
      "content": "ip -br a",
      "note": "Every interface with its state and addresses, one line each.",
      "visibility": "shared",
      "requires_sudo": false,
      "tags": ["network"]
    }
  ]
}
