// This assembly is included in the following assemblies:
//
// metrics/assembly_metrics-prometheus-setup.adoc

[id='assembly-metrics-prometheus-{context}']

= Setting up Prometheus

link:https://prometheus.io/[Prometheus^] provides an open source set of components for systems monitoring and alert notification.

We describe here how you can use the link:https://github.com/coreos/prometheus-operator[CoreOS Prometheus Operator^] to run and manage a Prometheus server that is suitable for use in production environments, but with the correct configuration you can run any Prometheus server.

[NOTE]
====
The Prometheus server configuration uses service discovery to discover the pods in the cluster from which it gets metrics.  For this feature to work correctly, the service account used for running the Prometheus service pod must have access to the API server so it can retrieve the pod list.

For more information, see {K8sServiceDiscovery}.
====

include::../../modules/metrics/con_metrics-prometheus-options.adoc[leveloffset=+1]

include::../../modules/metrics/con_metrics-prometheus-resources.adoc[leveloffset=+1]

include::../../modules/metrics/proc_metrics-deploying-prometheus-operator.adoc[leveloffset=+1]

include::../../modules/metrics/proc_metrics-deploying-prometheus.adoc[leveloffset=+1]
