Code Monkey home page Code Monkey logo

cortex's Introduction

Weave Cortex Logo

Open source, horizontally scalable Prometheus as a service

Circle CI Slack Status

NB this is a pre-beta service. Availability is not 100%. APIs might change. Data could be lost.

Cortex is an API compatible Prometheus implementation, that natively supports multitenancy and horizontal scale-out clustering.

Cortex is a Weaveworks project that forms the monitoring backend of Weave Cloud.

Getting Started with Weave Cloud & Kubernetes

Go to https://cloud.weave.works and sign up. Follow the steps to create a new instance.

Once you have created your instance, note down the 'Service Token' listed underneath 'Probes' in the box on the right of the screen. You will use this token to authenticate your local Prometheus with Weave Cloud.

Weave Cloud Token

Install the Cortex agent (an unmodified OSS Prometheus) on your Kubernetes cluster using the following command:

$ kubectl -n kube-system apply -f 'https://cloud.weave.works/k8s/cortex.yaml?t=<token>'

Click Monitor to access the Cortex service in the Weave Cloud UI:

Prometheus Monitoring with Weave Cortex

Weave Cloud gives you some example queries that displays general system information. You can of course write your own Prometheus queries.

About Weave Cortex

To learn more about Weave Cortex, consult the follow documents / talks:

Using Cortex on Other Platforms

Cortex can be used to monitor virtually any application on any platform, as the local agent is a specially configured unmodified OSS Prometheus binary. You can download Prometheus from its website. You will need v1.2.1 or later.

When you've got Prometheus, you will need to configure it to discover your services and configure it to send its data to Weave Cloud by adding the following top-level stanza to prometheus.yml:

remote_write:
  url: https://cloud.weave.works/api/prom/push
  basic_auth:
    password: <token>

Where <token> is the Service Token you obtained from Weave Cloud.

Once your local Prometheus is running you can enter Prometheus queries into Weave Cloud. Go to https://cloud.weave.works and click Monitor from Weave Cloud header:

Prometheus Monitoring with Weave Cortex

Using Cortex to power Grafana dashboards

To use the Prometheus Service with Grafana, configure your Grafana instance to have a datasource with the following parameters:

  • Type: Prometheus
  • Url: https://cloud.weave.works/api/prom
  • Access: Direct
  • Http Auth: Basic Auth
  • User: user (this is ignored, but must be non-empty)
  • Password: (the same one your retrieval agent uses)

Developing

To build & test, install minikube, and run:

eval $(minikube docker-env)
make
kubectl create -f ./k8s

Cortex will sit behind an nginx instance exposed on port 30080. A job is deployed to scrape it itself. Try it:

http://192.168.99.100:30080/api/prom/api/v1/query?query=up

Getting Help

If you have any questions regarding Cortex our hosted Prometheus as a service:

Your feedback is always welcome!

cortex's People

Contributors

abuehrle avatar awh avatar bwplotka avatar davkal avatar ekimekim avatar jml avatar juliusv avatar mjlodge avatar paulbellamy avatar tomwilkie avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

andieandpal

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.