From eeb722a76681d6e19e5b85d9f73ca2803c7c72f7 Mon Sep 17 00:00:00 2001 From: Nicolas Takashi Date: Fri, 13 Sep 2024 22:57:47 +0200 Subject: [PATCH] [DOCS] update readme Signed-off-by: Nicolas Takashi --- README.md | 107 +++++------------------------------------------------- 1 file changed, 10 insertions(+), 97 deletions(-) diff --git a/README.md b/README.md index 68c69d7..8aa1e8e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ -# Poctl +# poctl -A Command Line Interface for Prometheus-Operator resources to help you manage, troubleshoot and validate your resources. +## Overview + +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. ## Installation @@ -8,101 +12,10 @@ A Command Line Interface for Prometheus-Operator resources to help you manage, t go install github.com/prometheus-operator/poctl ``` -## Usage - -```bash mdox-exec="go run main.go --help" mdox-expect-exit-code=2 -poctl is a command line interface for managing Prometheus Operator, allowing you to - create, delete, and manage Prometheus instances, ServiceMonitors, and more. - -Usage: - poctl [command] - -Available Commands: - analyze Analyzes the given object and runs a set of rules on it to determine if it is compliant with the given rules. - completion Generate the autocompletion script for the specified shell - create create is used to create Prometheus Operator resources. - help Help about any command - -Flags: - -h, --help help for poctl - --kubeconfig string path to the kubeconfig file, defaults to $KUBECONFIG - --log-format string Log format (default "text") - --log-level string Log level (default "DEBUG") - -Use "poctl [command] --help" for more information about a command. -``` - -## Available Commands - -There are a set of commands available in poctl to help you manage, troubleshoot and validate your Prometheus-Operator resources. - -### Create - -The `create` allows you either to create a monitor objects from a given kubernetes object or deploy a complete Prometheus Stack. - -#### Stack - -The `poctl create stack` command allows you to deploy a complete Prometheus Stack containing Prometheus, Alertmanager, node-exporter and kube-state-metrics, with the following flags: - -```bash mdox-exec="go run main.go create stack --help" mdox-expect-exit-code=2 -create a stack of Prometheus Operator resources. - -Usage: - poctl create stack [flags] - -Flags: - -h, --help help for stack - -Global Flags: - --kubeconfig string path to the kubeconfig file, defaults to $KUBECONFIG - --log-format string Log format (default "text") - --log-level string Log level (default "DEBUG") - --version string Prometheus Operator version (default "0.74.0") -``` - -#### Service Monitor - -The `poctl create servicemonitor` command allows you to create a ServiceMonitor object from a given kubernetes object, withe the following flags: +## Project Status -```bash mdox-exec="go run main.go create servicemonitor --help" mdox-expect-exit-code=2 -Create a service monitor object based on user input parameters or taking as source of truth a kubernetes service +This project is currently in active development and fully experimental, so expect breaking changes and rough edges. We encourage you to try it out and provide feedback. -Usage: - poctl create servicemonitor [flags] +## Contributing -Flags: - -h, --help help for servicemonitor - -n, --namespace string Namespace of the service (default "default") - -p, --port string Port of the service - -s, --service string Service name to create the service monitor from - -Global Flags: - --kubeconfig string path to the kubeconfig file, defaults to $KUBECONFIG - --log-format string Log format (default "text") - --log-level string Log level (default "DEBUG") - --version string Prometheus Operator version (default "0.74.0") -``` - -### Analyze - -The analyze command allows you to run a set of rules on a given object to determine if it is compliant with the given rules. - -```bash mdox-exec="go run main.go analyze --help" mdox-expect-exit-code=2 -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. - -Usage: - poctl analyze [flags] - -Flags: - -h, --help help for analyze - -k, --kind string The kind of object to analyze. For example, ServiceMonitor - -n, --name string The name of the object to analyze - -s, --namespace string The namespace of the object to analyze - -Global Flags: - --kubeconfig string path to the kubeconfig file, defaults to $KUBECONFIG - --log-format string Log format (default "text") - --log-level string Log level (default "DEBUG") -``` +See [CONTRIBUTING](https://github.com/prometheus-operator/prometheus-operator/blob/main/CONTRIBUTING.md).