Scott Dodson 1a656ce0b2 Add OWNERS files 7 年之前
..
defaults 9ef5125284 cluster_monitoring: Bump operator version and adjust related config 7 年之前
files daa6c2df94 Merge pull request #7906 from elad661/cluster-monitoring-no-admin 7 年之前
meta f2071c75d0 Add an ansible role to install OpenShift monitoring platform 7 年之前
tasks 315f04f61c cluster_monitoring_operator: Don't use cluster-admin role 7 年之前
OWNERS 1a656ce0b2 Add OWNERS files 7 年之前
README.md f2071c75d0 Add an ansible role to install OpenShift monitoring platform 7 年之前

README.md

OpenShift Cluster Monitoring Operator

The OpenShift Cluster Monitoring Operator role manages the Tectonic Prometheus Operator deployment. TPO is an operator that deploys our monitoring stack (Prometheus, Alertmanager) with out-of-the-box alerts and metrics.

Component integration

The following sections are to guide component owners to shipping new integrations with the monitoring stack.

Developing

To develop new component integrations, try the following.

  1. Create a GCE cluster with the monitoring stack enabled by editing your profile prior to launch (e.g. gcp-dev/vars.yaml):

    openshift_monitoring_deploy: true
    
  2. Clone the Tectonic Prometheus Operator repository.

  3. To register a new component for metrics scraping:

    1. Follow the Tectonic Prometheus Operator instructions to register a new builtin component (Note: the Go code portions can be skipped while prototyping but must be completed before a PR is submitted).
    2. Create the new ServiceMonitor manually with:

      oc apply -n openshift-monitoring -f assets/prometheus-k8s/prometheus-k8s-service-monitor-$COMPONENT.yaml`
      
  4. To add a new alerting rule:

    1. Follow the Tectonic Prometheus Operator instructions to add a new alerting rule.
    2. Rebuild the rules ConfigMap manually with:

      hack/generate-rules-configmap.sh k8s | oc apply -n openshift-monitoring -f -
      

Shipping

To ship a new component integration, the following things must happen:

  1. The component must be accepted into Tectonic Prometheus Operator and available in a new Tectonic Prometheus Operator image.

  2. The openshift_cluster_monitoring_operator role must be updated to use the new Tectonic Prometheus Operator image containing the new component integration.

Installation

See the openshift-monitoring playbook for installation options.

Role Variables

For default values, see defaults/main.yaml.

  • openshift_cluster_monitoring_operator_install: true - install/update. false - uninstall. Defaults to true.
  • openshift_cluster_monitoring_operator_image: TPO image to use
  • openshift_cluster_monitoring_operator_prometheus_operator_repo: Prometheus Operator repo to pull the image from
  • openshift_cluster_monitoring_operator_prometheus_repo: Prometheus repo to pull the image from
  • openshift_cluster_monitoring_operator_alertmanager_repo: Alertmanager repo to pull the image from
  • openshift_cluster_monitoring_operator_prometheus_reloader_repo: Prometheus Reloader repo to pull the image from
  • openshift_cluster_monitoring_oeprator_configmap_reloader_repo: ConfigMap reloader repo to pull the image from

Requirements

Ansible 2.4

Dependencies

  • lib_openshift
  • lib_utils
  • openshift_facts

License

Apache License, Version 2.0