Coder Social home page Coder Social logo

prometheus-grafana's Introduction

prometheus-grafana

Monitoring Namespace

We are going to install the monitoring components into a “monitoring” namespace.

First, create the monitoring namespace:

$ kubectl create -f monitoring-namespace.yaml.

You can now list the namespaces by running

$ kubectl get namespaces

Prometheus Configuration

Prometheus will get its configuration from a Kubernetes ConfigMap. This allows us to update the configuration separate from the image.

To deploy this to the cluster run

$ kubectl create -f prometheus-config.yaml

You can view this by running

$ kubectl get configmap --namespace=monitoring prometheus-config -o yaml

Prometheus Pod

We will use a single Prometheus pod for this demo. Take a look at prometheus-deployment.yaml. This is a Kubernetes Deployment that describes the image to use for the pod, resources, etc.

Deploy the deployment by running

$ kubectl create -f prometheus-deployment.yaml

You can see this by running

$ kubectl get deployments --namespace=monitoring

Prometheus Service

Now that we have Prometheus deployed, we actually want to get to the UI. To do this, we will expose it using a Kubernetes Service Create the service by running

$ kubectl create -f prometheus-service.yaml

You can then view it by running

$ kubectl get services --namespace=monitoring prometheus -o yaml

Deploying Grafana

You can deploy grafana by creating its deployment and service by running

$ kubectl create -f grafana-deployment.yaml

and

$ kubectl create -f grafana-service.yaml.

You can then view it by running

$ kubectl get services --namespace=monitoring grafana -o yaml

For the URL, we will actual use Kubernetes DNS service discovery. So, just enter http://:9191

Create a New dashboard by clicking on the upper-left icon and selecting Dashboard->New.

Download the dashboard file from Grafana website https://grafana.com/dashboards/2115 and import it to dashboards.

prometheus-grafana's People

Contributors

vemular1 avatar

Watchers

 avatar

Forkers

srimanchiru

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.