Fleet analyser
Analyser les instantanés créés par fleet monitor
fleet analyze [flags] MONITOR_FILE
Options
--compare Show comparison between snapshots living in different files
--detailed Show detailed analysis with all information
--diff Show changes over time, comparing consecutive snapshot from the same file
--issues Show only resources with issues (useful for quick health checks)
--json Format output as JSON
--no-color Disable color in output
Syntaxe
# Analyze latest snapshot
fleet analyze monitor.json
# Analyze from stdin
fleet monitor | fleet analyze
# Show all snapshots in file
fleet analyze --all monitor.json
# Show changes between consecutive snapshots
fleet analyze --diff monitor.json
fleet analyze --issues monitor.json
# Detailed analysis with controller info and events
fleet analyze --detailed monitor.json
# Compare two specific snapshot files
fleet analyze --compare before.json after.json
# JSON output for programmatic use
fleet analyze --json monitor.json
# Disable colored output
fleet analyze --no-color monitor.json
Modes de sortie
-
Résumé (par défaut) : Vue d’ensemble des ressources et des diagnostics
-
Tous : Résumé de tous les instantanés dans un fichier multi-instantanés
-
Diff : Montre les changements entre les instantanés consécutifs
-
Problèmes : Montre uniquement les ressources avec des problèmes détectés
-
Détaillé : Analyse complète incluant les informations du contrôleur, la cohérence de l’API et les événements
-
JSON : Sortie lisible par machine pour les scripts et l’automatisation
Analyse multi-instantanés
Lorsque votre fichier monitor.json contient plusieurs instantanés (un objet JSON par ligne) :
# Show summary of latest snapshot only
fleet analyze monitor.json
# Show differences between consecutive snapshots
fleet analyze --diff monitor.json
# Show summary of all snapshots
fleet analyze --all monitor.json
# Compare two specific snapshot files
fleet analyze --compare snapshot2.json snapshot1.json