All Projects → wkulhanek → openshift-prometheus

wkulhanek / openshift-prometheus

Licence: other
Repository for all things related to Prometheus on OpenShift

Programming Languages

Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to openshift-prometheus

docker-openshift-grafana
Grafana Docker Image for use with Red Hat OpenShift
Stars: ✭ 22 (-58.49%)
Mutual labels:  openshift, openshift-templates, openshift-application
kubernetes-lab
Kubernetes - Basics to Advanced
Stars: ✭ 44 (-16.98%)
Mutual labels:  openshift
deploy
No description or website provided.
Stars: ✭ 23 (-56.6%)
Mutual labels:  openshift
libvirt-ocp4-provisioner
Automate your OCP4 installation
Stars: ✭ 82 (+54.72%)
Mutual labels:  openshift
deploy
Deploy Development Builds of Open Cluster Management (OCM) on RedHat Openshift Container Platform
Stars: ✭ 133 (+150.94%)
Mutual labels:  openshift
spring-boot-configmaps-demo
Demo application to show Spring Boot configuration using ConfigMaps
Stars: ✭ 31 (-41.51%)
Mutual labels:  openshift
commons.openshift.org
Repository for OpenShift Commons Community Site
Stars: ✭ 31 (-41.51%)
Mutual labels:  openshift
cookbook-openshift3
Chef Cookbook for Openshift
Stars: ✭ 27 (-49.06%)
Mutual labels:  openshift
openshift101
OpenShift 101 on IBM Cloud tutorial: https://ibm.github.io/openshift101/
Stars: ✭ 27 (-49.06%)
Mutual labels:  openshift
abstract-operator
Library/SDK for creating the operators for Kubernetes and Openshift.
Stars: ✭ 60 (+13.21%)
Mutual labels:  openshift
testnet deploy
Deployment scripts and monitoring configuration for a Cosmos Validator setup
Stars: ✭ 19 (-64.15%)
Mutual labels:  openshift
openshift-update-graph
Visualize the OpenShift Update Graph
Stars: ✭ 20 (-62.26%)
Mutual labels:  openshift
s2i-build
Github Action to build an OCI-compatible container image from source code.
Stars: ✭ 26 (-50.94%)
Mutual labels:  openshift
starter-guides
Getting Started with OpenShift for Developers workshop
Stars: ✭ 127 (+139.62%)
Mutual labels:  openshift
kraken
Chaos and resiliency testing tool for Kubernetes and OpenShift
Stars: ✭ 161 (+203.77%)
Mutual labels:  openshift
infinispan-operator
Infinispan Operator
Stars: ✭ 32 (-39.62%)
Mutual labels:  openshift
oshinko-s2i
This is a place to put s2i images and utilities for spark application builders for openshift
Stars: ✭ 16 (-69.81%)
Mutual labels:  openshift
OpenShift
Azure Red Hat OpenShift
Stars: ✭ 92 (+73.58%)
Mutual labels:  openshift
mongodb-container
MongoDB container images based on Red Hat Software Collections and intended for OpenShift and general usage. Users can choose between Red Hat Enterprise Linux, Fedora, and CentOS based images.
Stars: ✭ 50 (-5.66%)
Mutual labels:  openshift
scale-ci-deploy
Automation for OpenShift Deployments - install, scaling and upgrades
Stars: ✭ 14 (-73.58%)
Mutual labels:  openshift

Prometheus on OpenShift

This repository contains definitions and tools to run Prometheus and its associated ecosystem on Red Hat OpenShift.

Components

The following components are available:

Project Organization

A new project called prometheus will be created to contain the entire ecosystem.

Execute the following command to create the project:

oc new-project prometheus --display-name="Prometheus Monitoring"

Make sure that there is not a default node selector on the project:

oc annotate namespace prometheus openshift.io/node-selector=""

Deploy Prometheus

Starting with OpenShift 3.6 the OpenShift routers expose a metrics endpoint on port 1936. For Prometheus to be able to monitor the routers this port needs to be open.

Additionally Prometheus does not work with remote volumes (NFS, EBS, …​) but needs local disk storage as well. This means we need to create a directory on (one of) the infranodes. The Prometheus template includes a Node Selector prometheus-host=true - so we need to set the correct label on the infranode(s) as well.

Run the following Ansible playbook to configure the infranodes:

ansible-playbook -i /etc/ansible/hosts ./setup_infranodes.yml

The router also requires basic authentication to be allowed to scrape the metrics. Find the router password by executing the following command:

oc set env dc router -n default --list|grep STATS_PASSWORD|awk -F"=" '{print $2}'

An OpenShift template has been provided to streamline the deployment to OpenShift.

Execute the following command to instantiate the Prometheus template using the previously retrieved router password as a parameter:

oc new-app -f prometheus.yaml --param ROUTER_PASSWORD=<Router Password>

Since Prometheus needs to use a local disk to write its metrics add the privileged SCC to the prometheus service account:

oc adm policy add-scc-to-user privileged system:serviceaccount:prometheus:prometheus

Make sure your Prometheus pod is running (on an Infranode):

oc get pod -o wide

Next Steps

Please refer to the following to enhance the functionality of Prometheus

Cleanup

Delete the project and the cluster-reader binding (which gets created by the template but doesn’t get deleted as part of the project):

oc delete project prometheus
oc delete clusterrolebinding prometheus-cluster-reader
oc adm policy remove-scc-from-user privileged prometheus

You will also need to clean up the directory /var/lib/prometheus-data on the Infranode(s) and remove the label prometheus-host=true from the Infranode(s).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].