Manage the OpenShift monitoring stack
Clone or download
openshift-merge-robot Merge pull request #182 from abhinavdahiya/fix_namespace_sel
pkg/client: fix namespaceSelector being ignored when creating client
Latest commit 1322e56 Dec 10, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Documentation *: Open source Apr 13, 2018
assets Set correct image for Prometheus Adapter Dec 7, 2018
cmd/operator *: Enable multi-namespace monitoring Oct 31, 2018
examples example: rename to cluster-monitoring Apr 13, 2018
hack Add new roles to cluster monitoring operator for apiservices Dec 5, 2018
jsonnet Set correct image for Prometheus Adapter Dec 7, 2018
manifests Add new roles to cluster monitoring operator for apiservices Dec 5, 2018
pkg pkg/client: fix namespaceSelector being ignored when creating client Dec 10, 2018
scripts Fix deploy-on-openshift.sh Oct 5, 2018
test/e2e *: Open source Apr 13, 2018
vendor pkg: CreateOrUpdate aggregation APIService Dec 4, 2018
.dockerignore Use openshift/origin-base as base container image Jun 28, 2018
.gitignore *: Use jsonnet to sync from kube-prometheus Jun 1, 2018
.travis.yml Makefile: container build operator with deps Aug 15, 2018
.yamllint Add yamllint configuration, run yamllint in Travis Apr 26, 2018
CHANGELOG.md *: Cut v0.0.6 Jun 6, 2018
CONTRIBUTING.md *: Open source Apr 13, 2018
DCO *: Open source Apr 13, 2018
Dockerfile Add a rhel7 dockerfile and standarize dockerfile contents across repos Nov 11, 2018
Dockerfile.generate Makefile: improve dependencies Aug 2, 2018
Dockerfile.rhel7 Add a rhel7 dockerfile and standarize dockerfile contents across repos Nov 11, 2018
Gopkg.lock pkg: CreateOrUpdate aggregation APIService Dec 4, 2018
Gopkg.toml Add k8s.io/kube-aggregator as dependency Dec 4, 2018
Jenkinsfile *: Open source Apr 13, 2018
LICENSE Initial commit Apr 11, 2018
Makefile fix makefile issue when GOPATH contains colon Nov 1, 2018
OWNERS OWNERS: add lucas and sergiusz Aug 14, 2018
README.md README: distinguish app vs cluster monitoring Nov 1, 2018
VERSION Integrate into cluster version operator Sep 27, 2018
code-of-conduct.md *: Open source Apr 13, 2018
container.yaml Dockerfile: switch to multistage builds Oct 17, 2018

README.md

Cluster Monitoring Operator

The Cluster Monitoring Operator manages and updates the Prometheus-based cluster monitoring stack deployed on top of OpenShift.

It contains the following components:

The deployed Prometheus Operator is intended to be used only for cluster-level monitoring. As such, the deployed Prometheus instance (prometheus-k8s) is responsible for monitoring and alerting on cluster and OpenShift components; it should not be extended to monitor user applications. Important: The Prometheus Operator managed by the Cluster Monitoring Operator will by default only look for ServiceMonitor resources in openshift-monitoring namespace.

Users interested in leveraging Prometheus for application monitoring on OpenShift should consider using OLM to easily deploy a Prometheus Operator and setup new Prometheus instances to monitor and alert on their applications.

Alertmanager is a cluster-global component for handling alerts generated by all Prometheus instances deployed in that cluster.

Metrics are collected from the following components:

Contributing new component integrations

The Cluster Monitoring Operator has many builtin ServiceMonitor resources which enable discovering the metrics endpoints of a variety of well-known components. Only components that must be created before the cluster monitoring stack belong in this repository, in order to solve the cyclic dependencies of bootstrapping.

To register a new builtin component, make the following changes:

  • Add a new ServiceMonitor manifest file to jsonnet/prometheus.jsonnet. An example of this can be seen for the OpenShift component "kube-controllers", here.
  • Re-generate the go-bindata code, using the pkg/manifests/bindata.go make target. This will also create a new file in assets/prometheus-k8s/ according to the name given in the jsonnet code.
  • Add a constant in pkg/manifests/manifests.go which points to the new manifest file, from assets/.
  • Add a new Factory method in pkg/manifests/manifests.go which loads the manifest using the new constant.
  • Add a step to PrometheusTask in pkg/tasks/prometheus.go which creates the ServiceMonitor using the Factory new method.

To add new builtin recording or alerting rules:

Run make pkg/manifests/bindata.go after you modify the files and make sure to add the modified files to the commit. All rules are automatically created, so no additional code changes are necessary.

Roadmap

  • Monitor etcd
  • Adapt Tectonic inherited alerts with OpenShift operational knowledge

Testing

End-to-end tests

Run e2e-tests with make e2e-test. Clean up after e2e-tests with make e2e-clean