Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] update readme #36

Merged
merged 2 commits into from
Sep 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 10 additions & 97 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,108 +1,21 @@
# 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

```bash
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.76.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.76.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).
Loading