From a9cafb484391ef9e95ba58ef4c8c81c482c00748 Mon Sep 17 00:00:00 2001 From: Nicolas Takashi Date: Sat, 14 Sep 2024 20:41:52 +0200 Subject: [PATCH] [DOCS] improve cmd docs helper Signed-off-by: Nicolas Takashi --- Documentation/commands/analyze/index.md | 4 +--- cmd/analyze.go | 8 +++----- cmd/create.go | 5 ++--- cmd/root.go | 7 ++++--- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/Documentation/commands/analyze/index.md b/Documentation/commands/analyze/index.md index 9d04942..24e686b 100644 --- a/Documentation/commands/analyze/index.md +++ b/Documentation/commands/analyze/index.md @@ -3,9 +3,7 @@ The analyze command is used to examine Prometheus Operator objects to ensure they comply with specific rules. It checks whether the objects meet certain predefined conditions. ```bash mdox-exec="go run main.go analyze --help" mdox-expect-exit-code=0 -Analyzes the given object and runs a set of rules on it to determine if it is compliant with the given rules. - For example: - - Analyze if the service monitor is selecting any service or using the correct service port. +The analyze command in poctl is a powerful tool that assesses the health of Prometheus Operator resources in Kubernetes. It detects misconfigurations, issues, and inefficiencies in Prometheus, Alertmanager, and ServiceMonitor resources. By offering actionable insights and recommendations, it helps administrators quickly resolve problems and optimize their monitoring setup for better performance. Usage: poctl analyze [flags] diff --git a/cmd/analyze.go b/cmd/analyze.go index d808c7b..fcdaac0 100644 --- a/cmd/analyze.go +++ b/cmd/analyze.go @@ -42,11 +42,9 @@ var ( analyzerFlags = AnalyzeFlags{} analyzeCmd = &cobra.Command{ Use: "analyze", - Short: "Analyzes the given object and runs a set of rules on it to determine if it is compliant with the given rules.", - Long: `Analyzes the given object and runs a set of rules on it to determine if it is compliant with the given rules. - For example: - - Analyze if the service monitor is selecting any service or using the correct service port.`, - RunE: run, + Short: "The analyze command performs an in-depth analysis of Prometheus Operator resources, identifying potential issues and misconfigurations in your monitoring setup. It helps ensure your resources are optimized and error-free.", + Long: `The analyze command in poctl is a powerful tool that assesses the health of Prometheus Operator resources in Kubernetes. It detects misconfigurations, issues, and inefficiencies in Prometheus, Alertmanager, and ServiceMonitor resources. By offering actionable insights and recommendations, it helps administrators quickly resolve problems and optimize their monitoring setup for better performance.`, + RunE: run, } ) diff --git a/cmd/create.go b/cmd/create.go index 7bd3e11..4093cc9 100644 --- a/cmd/create.go +++ b/cmd/create.go @@ -21,9 +21,8 @@ import ( // createCmd represents the create command. var createCmd = &cobra.Command{ Use: "create", - Short: "create is used to create Prometheus Operator resources.", - Long: `create is used to create Prometheus Operator resources, - such as Prometheus instances, ServiceMonitors, and more.`, + Short: "The create command generates Prometheus Operator resources like Prometheus, Alertmanager, and ServiceMonitor, simplifying the setup of monitoring configurations in Kubernetes.", + Long: `The create command in poctl streamlines the process of creating Prometheus Operator resources in Kubernetes. It allows users to easily generate configurations for key components such as Prometheus, Alertmanager, and ServiceMonitor. This tool reduces the complexity of manual configuration by automating resource creation, ensuring proper setups while saving time. Ideal for both new deployments and updates, the create command helps administrators efficiently establish or modify their monitoring infrastructure.`, // Run: func(cmd *cobra.Command, args []string) { }, } diff --git a/cmd/root.go b/cmd/root.go index 1a15682..9420a20 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -24,9 +24,10 @@ import ( // rootCmd represents the base command when called without any subcommands. var rootCmd = &cobra.Command{ Use: "poctl", - Short: "poctl is a command line interface for managing Prometheus Operator.", - Long: `poctl is a command line interface for managing Prometheus Operator, allowing you to - create, delete, and manage Prometheus instances, ServiceMonitors, and more.`, + Short: "Command Line Interface (CLI) designed specifically for managing Prometheus Operator resources. It streamlines the processes of deploying, troubleshooting, and validating your monitoring infrastructure within Kubernetes environments.", + Long: `Command Line Interface (CLI) designed specifically for managing Prometheus Operator resources. It streamlines the processes of deploying, troubleshooting, and validating your monitoring infrastructure within Kubernetes environments. + +By providing an intuitive interface, poctl allows users to efficiently manage key resources like Prometheus instances, Alertmanager configurations, and ServiceMonitors. It simplifies complex tasks, reduces manual configuration errors, and offers built-in tools for validation and troubleshooting, helping you maintain a healthy and scalable monitoring setup.`, // Uncomment the following line if your bare application // has an action associated with it: // Run: func(cmd *cobra.Command, args []string) { },