|
| 1 | +apiVersion: troubleshoot.sh/v1beta2 |
| 2 | +kind: SupportBundle |
| 3 | +metadata: |
| 4 | + name: default |
| 5 | +spec: |
| 6 | + hostCollectors: |
| 7 | + - cpu: {} |
| 8 | + - hostOS: {} |
| 9 | + - memory: {} |
| 10 | + - blockDevices: {} |
| 11 | + - hostServices: {} |
| 12 | + - ipv4Interfaces: {} |
| 13 | + - time: {} |
| 14 | + - diskUsage: |
| 15 | + collectorName: root-disk-usage |
| 16 | + path: / |
| 17 | + - diskUsage: |
| 18 | + collectorName: openebs-disk-usage |
| 19 | + path: /var/openebs/local |
| 20 | + - run: |
| 21 | + collectorName: k0s-status |
| 22 | + command: k0s |
| 23 | + args: [ "status" ] |
| 24 | + - run: |
| 25 | + collectorName: k0s-issue-template |
| 26 | + command: sh |
| 27 | + args: [ "-c", "uname -srvmo; cat /etc/os-release || lsb_release -a" ] |
| 28 | + - run: |
| 29 | + collectorName: k0s-sysinfo |
| 30 | + command: k0s |
| 31 | + args: [ "sysinfo" ] |
| 32 | + - copy: |
| 33 | + collectorName: installer-logs |
| 34 | + path: /var/lib/embedded-cluster/logs/*.log |
| 35 | + - run: |
| 36 | + collectorName: k8s-api-healthz-6443 |
| 37 | + command: "curl" |
| 38 | + args: ["-k", "https://localhost:6443/healthz?verbose"] |
| 39 | + - run: |
| 40 | + collectorName: "free" |
| 41 | + command: "free" |
| 42 | + args: ["-m"] |
| 43 | + - run: |
| 44 | + collectorName: "top" |
| 45 | + command: "top" |
| 46 | + args: ["-b", "-n", "1"] |
| 47 | + - run: |
| 48 | + collectorName: "uptime" |
| 49 | + command: "uptime" |
| 50 | + args: [] |
| 51 | + - run: |
| 52 | + collectorName: "uname" |
| 53 | + command: "uname" |
| 54 | + args: ["-a"] |
| 55 | + - run: |
| 56 | + collectorName: "df" |
| 57 | + command: "df" |
| 58 | + args: ["-h"] |
| 59 | + - run: |
| 60 | + collectorName: "iostat" |
| 61 | + command: "iostat" |
| 62 | + args: ["-x"] |
| 63 | + - run: |
| 64 | + collectorName: "sestatus" |
| 65 | + command: "sestatus" |
| 66 | + args: [] |
| 67 | + - run: |
| 68 | + collectorName: "apparmor-status" |
| 69 | + command: "apparmor_status" |
| 70 | + args: [] |
| 71 | + - run: |
| 72 | + collectorName: "iptables" |
| 73 | + command: "iptables" |
| 74 | + args: ["-L", "-v"] |
| 75 | + - run: |
| 76 | + collectorName: "iptables-version" |
| 77 | + command: "iptables" |
| 78 | + args: ["-V"] |
| 79 | + - run: |
| 80 | + collectorName: "nftables-list" |
| 81 | + command: "nft" |
| 82 | + args: ["list", "table", "filter"] |
| 83 | + - run: |
| 84 | + collectorName: "ipvsadm" |
| 85 | + command: "ipvsadm" |
| 86 | + args: ["-l", "-n"] |
| 87 | + - run: |
| 88 | + collectorName: "lsblk" |
| 89 | + command: "lsblk" |
| 90 | + args: ["--fs"] |
| 91 | + - run: |
| 92 | + collectorName: "netstat-ports" |
| 93 | + command: "netstat" |
| 94 | + args: ["-t", "-u", "-l", "-p", "-n"] |
| 95 | + - run: |
| 96 | + collectorName: "netstat-route-table" |
| 97 | + command: "netstat" |
| 98 | + args: ["-r", "-n"] |
| 99 | + - run: |
| 100 | + collectorName: "resolvectl-status" |
| 101 | + command: "resolvectl" |
| 102 | + args: ["status"] |
| 103 | + - run: |
| 104 | + collectorName: "resolv-conf" |
| 105 | + command: "cat" |
| 106 | + args: ["/etc/resolv.conf"] |
| 107 | + - run: |
| 108 | + collectorName: "systemd-resolved-conf" |
| 109 | + command: "cat" |
| 110 | + args: ["/etc/systemd/resolved.conf"] |
| 111 | + - run: |
| 112 | + collectorName: "nsswitch-conf" |
| 113 | + command: "cat" |
| 114 | + args: ["/etc/nsswitch.conf"] |
| 115 | + - run: |
| 116 | + collectorName: "hosts" |
| 117 | + command: "cat" |
| 118 | + args: ["/etc/hosts"] |
| 119 | + - run: |
| 120 | + collectorName: "ip-route-table" |
| 121 | + command: "ip" |
| 122 | + args: ["route"] |
| 123 | + - run: |
| 124 | + collectorName: "sysctl" |
| 125 | + command: "sysctl" |
| 126 | + args: ["-a"] |
| 127 | + # Gathering hostname info to help troubleshoot scenarios where the hostname mismatch |
| 128 | + - run: |
| 129 | + collectorName: "hostnames" |
| 130 | + command: "sh" |
| 131 | + args: |
| 132 | + - -c |
| 133 | + - | |
| 134 | + echo "hostname = $(hostname)" |
| 135 | + echo "/proc/sys/kernel/hostname = $(cat /proc/sys/kernel/hostname)" |
| 136 | + echo "uname -n = $(uname -n)" |
| 137 | + - http: |
| 138 | + collectorName: curl-api-replicated-com |
| 139 | + get: |
| 140 | + url: https://api.replicated.com/healthz |
| 141 | + - http: |
| 142 | + collectorName: curl-get-replicated-com |
| 143 | + get: |
| 144 | + url: https://get.replicated.com/healthz |
| 145 | + - http: |
| 146 | + collectorName: curl-registry-replicated-com |
| 147 | + get: |
| 148 | + url: https://registry.replicated.com/healthz |
| 149 | + - http: |
| 150 | + collectorName: curl-proxy-replicated-com |
| 151 | + get: |
| 152 | + url: https://proxy.replicated.com/healthz |
| 153 | + - http: |
| 154 | + collectorName: curl-replicated-app |
| 155 | + get: |
| 156 | + url: https://replicated.app/healthz |
| 157 | + - run: |
| 158 | + collectorName: "du-root" |
| 159 | + command: "sh" |
| 160 | + args: ["-c", "du -Shax / --exclude /proc | sort -rh | head -20"] |
| 161 | + - run: |
| 162 | + collectorName: "mount" |
| 163 | + command: "mount" |
| 164 | + args: ["-l"] |
| 165 | + - run: |
| 166 | + collectorName: "vmstat" |
| 167 | + command: "vmstat" |
| 168 | + args: ["-w"] |
| 169 | + - run: |
| 170 | + collectorName: "ps-high-load" |
| 171 | + command: "sh" |
| 172 | + args: ["-c", "ps -eo s,user,cmd | grep ^[RD] | sort | uniq -c | sort -nbr | head -20"] |
| 173 | + - run: |
| 174 | + collectorName: "ps-detect-antivirus-and-security-tools" |
| 175 | + command: "sh" |
| 176 | + args: [-c, "ps -ef | grep -E 'clamav|sophos|esets_daemon|fsav|symantec|mfend|ds_agent|kav|bdagent|s1agent|falcon|illumio|xagt' | grep -v grep"] |
| 177 | + hostAnalyzers: |
| 178 | + - memory: |
| 179 | + checkName: Amount of Memory |
| 180 | + outcomes: |
| 181 | + - warn: |
| 182 | + when: "< 2G" |
| 183 | + message: At least 2G of memory is recommended |
| 184 | + - pass: |
| 185 | + message: The system has at least 2G of memory |
| 186 | + - diskUsage: |
| 187 | + checkName: Root disk usage |
| 188 | + collectorName: root-disk-usage |
| 189 | + outcomes: |
| 190 | + - fail: |
| 191 | + when: "total < 40Gi" |
| 192 | + message: The disk containing directory / has less than 40Gi of total space |
| 193 | + - warn: |
| 194 | + when: "used/total > 80%" |
| 195 | + message: The disk containing directory / is more than 80% full |
| 196 | + - warn: |
| 197 | + when: "available < 10Gi" |
| 198 | + message: The disk containing directory / has less than 10Gi of disk space available |
| 199 | + - pass: |
| 200 | + message: The disk containing directory / has sufficient space |
| 201 | + - diskUsage: |
| 202 | + checkName: OpenEBS disk usage |
| 203 | + collectorName: openebs-disk-usage |
| 204 | + outcomes: |
| 205 | + - fail: |
| 206 | + when: "total < 40Gi" |
| 207 | + message: The disk containing OpenEBS volumes has less than 40Gi of space |
| 208 | + - warn: |
| 209 | + when: "used/total > 80%" |
| 210 | + message: The disk containing OpenEBS volumes is more than 80% full |
| 211 | + - warn: |
| 212 | + when: "available < 10Gi" |
| 213 | + message: The disk containing OpenEBS volumes has less than 10Gi of disk space available |
| 214 | + - pass: |
| 215 | + message: The disk containing directory OpenEBS volumes has sufficient space |
| 216 | + - textAnalyze: |
| 217 | + checkName: Kubernetes API probing |
| 218 | + fileName: host-collectors/run-host/k0s-status.txt |
| 219 | + regex: 'Kube-api probing successful: true' |
| 220 | + outcomes: |
| 221 | + - fail: |
| 222 | + when: "false" |
| 223 | + message: Kubernetes API probing is reporting a failure |
| 224 | + - pass: |
| 225 | + when: "true" |
| 226 | + message: Kubernetes API probing is reporting success |
| 227 | + - time: |
| 228 | + checkName: "ntp-status" |
| 229 | + outcomes: |
| 230 | + - fail: |
| 231 | + when: "ntp == unsynchronized+inactive" |
| 232 | + message: "System clock is not synchronized" |
| 233 | + - warn: |
| 234 | + when: "ntp == unsynchronized+active" |
| 235 | + message: System clock not yet synchronized |
| 236 | + - pass: |
| 237 | + when: "ntp == synchronized+active" |
| 238 | + message: "System clock is synchronized" |
| 239 | + - warn: |
| 240 | + when: "timezone != UTC" |
| 241 | + message: "Non UTC timezone can interfere with system function" |
| 242 | + - pass: |
| 243 | + when: "timezone == UTC" |
| 244 | + message: "Timezone is set to UTC" |
| 245 | + - http: |
| 246 | + checkName: curl-k8s-api-6443 |
| 247 | + collectorName: curl-k8s-api-6443 |
| 248 | + outcomes: |
| 249 | + - warn: |
| 250 | + when: "error" |
| 251 | + message: Unable to curl https://localhost:6443/healthz. Please, run `curl -k https://localhost:6443/healthz` to check further information. |
| 252 | + - pass: |
| 253 | + when: "statusCode == 200" |
| 254 | + message: curl -k https://localhost:6443/healthz returned HTTP CODE response 200. |
| 255 | + - warn: |
| 256 | + message: "Unexpected response. HTTP CODE response is not 200. Please, run `curl -ki https://localhost:6443/healthz` to check further information." |
| 257 | + - http: |
| 258 | + checkName: curl-api-replicated-com |
| 259 | + collectorName: curl-api-replicated-com |
| 260 | + outcomes: |
| 261 | + - warn: |
| 262 | + when: "error" |
| 263 | + message: Error connecting to https://api.replicated.com/healthz |
| 264 | + - pass: |
| 265 | + when: "statusCode == 200" |
| 266 | + message: Connected to https://api.replicated.com/healthz |
| 267 | + - warn: |
| 268 | + message: "Unexpected response" |
| 269 | + - http: |
| 270 | + checkName: curl-get-replicated-com |
| 271 | + collectorName: curl-get-replicated-com |
| 272 | + outcomes: |
| 273 | + - warn: |
| 274 | + when: "error" |
| 275 | + message: Error connecting to https://get.replicated.com/healthz |
| 276 | + - pass: |
| 277 | + when: "statusCode == 200" |
| 278 | + message: Connected to https://get.replicated.com/healthz |
| 279 | + - warn: |
| 280 | + message: "Unexpected response" |
| 281 | + - http: |
| 282 | + checkName: curl-registry-replicated-com |
| 283 | + collectorName: curl-registry-replicated-com |
| 284 | + outcomes: |
| 285 | + - warn: |
| 286 | + when: "error" |
| 287 | + message: Error connecting to https://registry.replicated.com/healthz |
| 288 | + - pass: |
| 289 | + when: "statusCode == 200" |
| 290 | + message: Connected to https://registry.replicated.com/healthz |
| 291 | + - warn: |
| 292 | + message: "Unexpected response" |
| 293 | + - http: |
| 294 | + checkName: curl-proxy-replicated-com |
| 295 | + collectorName: curl-proxy-replicated-com |
| 296 | + outcomes: |
| 297 | + - warn: |
| 298 | + when: "error" |
| 299 | + message: Error connecting to https://proxy.replicated.com/healthz |
| 300 | + - pass: |
| 301 | + when: "statusCode == 200" |
| 302 | + message: Connected to https://proxy.replicated.com/healthz |
| 303 | + - warn: |
| 304 | + message: "Unexpected response" |
| 305 | + - http: |
| 306 | + checkName: curl-replicated-app |
| 307 | + collectorName: curl-replicated-app |
| 308 | + outcomes: |
| 309 | + - warn: |
| 310 | + when: "error" |
| 311 | + message: Error connecting to https://replicated.app/healthz |
| 312 | + - pass: |
| 313 | + when: "statusCode == 200" |
| 314 | + message: Connected to https://replicated.app/healthz |
| 315 | + - warn: |
| 316 | + message: "Unexpected response" |
0 commit comments