Create your own Prometheus and node_exporter in Openshift4.3 (2/2)

DOY
1 min readApr 7, 2020

To create your own prometheus using prometehus configuration file, prometheus.yml, I use configMaps.

1.Create a new app

$oc new-app prometheus — docker-image=”docker.io/prom/prometheus:latest”

2.Create a configmap for prometheus file with prometheus.yml

$oc create configmap prometheus-1 — from-file prometheus.yml

3. Edit prometheus configmap to prometheus pod

$oc edit dc/prometheus

Prometheus deployment configuration file

Find configMaps in openshift console

OpenShift 4.3 console

$oc get route/prometheus

To verify your configuration, browse prometheus with host information.

snapshot of prometheus target

This shows how to create pods with config.

Next time, I publish about using prometheus database

--

--