Skip to content

Commit

Permalink
Merge pull request #38 from prometheus-operator/refactory/cmd-docs
Browse files Browse the repository at this point in the history
[DOCS] improve cmd docs helper
  • Loading branch information
nicolastakashi authored Sep 14, 2024
2 parents 21702a4 + a9cafb4 commit 2091d3b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
4 changes: 1 addition & 3 deletions Documentation/commands/analyze/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
8 changes: 3 additions & 5 deletions cmd/analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
)

Expand Down
5 changes: 2 additions & 3 deletions cmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) { },
}

Expand Down
7 changes: 4 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) { },
Expand Down

0 comments on commit 2091d3b

Please sign in to comment.