prometheus #0

Supports: kubernetes

Deploy this charm on Kubernetes with the CLI. Find out how by reading the docs.

Description

Deploys and operates Prometheus on Kubernetes


Juju Charm/Operator for Prometheus on Kubernetes

Description

Prometheus is an open source monitoring system and alterting toolkit. This repository contains a Charm for deploying Prometheus in Kubernetes clusters using Juju.

Usage

    juju deploy prometheus

Scale Out Usage

...

Developing

Create and activate a virtualenv, and install the development requirements,

virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements-dev.txt

Testing

Just run run_tests:

./run_tests

Configuration

advertised-port
(int) The port prometheus will be listening on
9090
alertmanager-notification-queue-capacity
(int) The capacity of the queue for pending alert manager notifications.
10000
alertmanager-timeout
(string) Timeout for sending alerts to AlertManager.
10s
enforce-pod-restart
(boolean) If set to True, charm will forcibly shutdown and re-create the workload pod(s), one by one. If there is only one pod - any config modification will lead to the short service downtime.
evaluation-interval
(string) How frequently rules will be evaluated.
1m
external-labels
(string) A JSON string of key-value pairs that specify the labels to attach to metrics in this Prometheus instance when they get pulled by an aggregating parent. This is useful in the case of federation where, for example, you want each datacenter to have its own Prometheus instance and then have a global instance that pulls from each of these datacenter instances. By specifying a unique set of external-labels for each datacenter instance, you can easily determine in the aggregating Prometheus instance which datacenter a metric is coming from. Note that you are not limited to one instance per datacenter. The datacenter example here is arbitrary and you are free to organize your federation's hierarchy as you see fit. Ex. '{ "cluster": "datacenter1" }'. Both keys and values may be arbitrarily chosen as you see fit.
{}
log-level
(string) Prometheus server log level (only log messages with the given severity or above). Must be one of: [debug, info, warn, error, fatal]. If not set, the Prometheus default one (info) will be used.
monitor-k8s
(boolean) Adds additional scrape configs to the prometheus config file such that it collects metrics about the k8s cluster it is deployed in. It's important that metrics-server be running in the kube-system namespace otherwise the charm will remain in the blocked status.
prometheus-image-password
(string) The password associated with prometheus-image-username for accessing the registry specified in prometheus-image-path.
prometheus-image-path
(string) The location of the image to use, e.g. "registry.example.com/prometheus:v1". This setting is required.
prom/prometheus:latest
prometheus-image-username
(string) The username for accessing the registry specified in prometheus-image-path.
scrape-interval
(string) How frequently to scrape targets by default.
1m
scrape-timeout
(string) How long until a scrape request times out.
10s
ssl-cert
(string) SSL certificate to install and use for Prometheus endpoint.
ssl-key
(string) SSL key to use with certificate specified as ssl-cert.
tsdb-retention-time
(string) How long to retain samples in the storage. Units Supported: y, w, d, h, m, s, ms.
15d
tsdb-wal-compression
(boolean) This flag enables compression of the write-ahead log (WAL). Depending on your data, you can expect the WAL size to be halved with little extra cpu load.
web-enable-admin-api
(boolean) Enable API endpoints for admin control actions. As of Prometheus 2.0, this flag controls access to the administrative HTTP API which includes functionality such as deleting time series. This is disabled by default. If enabled, administrative and mutating functionality will be accessible under the /api/*/admin/ paths.
web-external-url
(string) The URL under which Prometheus is externally reachable (for example, if Prometheus is served via a reverse proxy). Used for generating relative and absolute links back to Prometheus itself. If the URL has a path portion, it will be used to prefix all HTTP endpoints served by Prometheus. If omitted, relevant URL components will be derived automatically.
web-max-connections
(int) Maximum number of simultaneous connections.
512
web-page-title
(string) Document title of Prometheus instance.
Charmed LMA - Prometheus TSDB, Collection & Processing
web-read-timeout
(string) Maximum duration before timing out read of the request, and closing idle connections.
5m