Skip to content
A multitenant, horizontally scalable Prometheus as a Service
Branch: master
Clone or download
gouthamve Merge pull request #1341 from nrjpoddar/fixTableDeletes
Updated table deletes to ignore empty prefixes
Latest commit 79bba2f Apr 29, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Update circle integration image to go 1.12 Apr 17, 2019
build-image Bump to go 1.12 Mar 7, 2019
cmd Limit number of days a query can be split into. Use existing flag/lim… Apr 5, 2019
docs Add a cap on bigChunk size Jan 25, 2019
imgs Note Cortex is a CNCF project; make commercial references more balanc… Sep 20, 2018
k8s Make it nicer to test locally with minikube Mar 22, 2019
pkg Merge pull request #1341 from nrjpoddar/fixTableDeletes Apr 29, 2019
tools Disable go tool vet. Mar 14, 2019
vendor Checking in updated vendor files after dep update Apr 22, 2019
.gitignore move migrations to seperate directory and mount into every image with… Mar 4, 2019
.lintignore Update Prometheus & TSDB (take 2) Jan 3, 2019
CONTRIBUTING.md Add contributing guidelines and link in README Oct 9, 2018
COPYING.LGPL-3 license: document vendored code which is under LGPL3 and MPL-2.0 Aug 16, 2018
GOVERNANCE.md Create GOVERNANCE.md and MAINTAINERS (#823) Jun 5, 2018
Gopkg.lock Updated weaveworks/common vendor dependency Apr 22, 2019
Gopkg.toml vendor: update prometheus and related deps Mar 12, 2019
LICENSE Bump license copyright year to 2017 (#571) Oct 6, 2017
MAINTAINERS Use personal emails for FreshTracks maintainers (#1107) Nov 5, 2018
Makefile Use the index cache for cardinality limits. Apr 6, 2019
README.md Use the correct ip address for minikube Apr 4, 2019
VENDORED_CODE.md license: document vendored code which is under LGPL3 and MPL-2.0 Aug 16, 2018
code-of-conduct.md Add a Code of Conduct referencing the CNCF Code of Conduct (#1016) Sep 21, 2018
push-images Fix typo in push-images script Dec 4, 2018

README.md

Cortex Logo

Open source, horizontally scalable, multi-tenant Prometheus as a service

Circle CI GoDoc

Cortex is a CNCF sandbox project used in several production systems including Weave Cloud, GrafanaCloud and FreshTracks.io.

Cortex provides horizontally scalable, multi-tenant, long term storage for Prometheus metrics when used as a remote write destination, and a horizontally scalable, Prometheus-compatible query API.

Multi-tenant means it handles metrics from multiple independent Prometheus sources, keeping them separate.

Instrumenting Your App: Best Practices

Hosted Cortex (Prometheus as a service)

There are several commercial services where you can use Cortex on-demand:

Weave Cloud

Weave Cloud from Weaveworks lets you deploy, manage, and monitor container-based applications. Sign up at https://cloud.weave.works and follow the instructions there. Additional help can also be found in the Weave Cloud documentation.

GrafanaCloud

To use Cortex as part of Grafana Cloud, sign up for GrafanaCloud by clicking "Log In" in the top right and then "Sign Up Now". Cortex is included as part of the Starter and Basic Hosted Grafana plans.

Contributing

For a guide to contributing to Cortex, see the contributor guidelines.

For Developers

To build:

make

(By default, the build runs in a Docker container, using an image built with all the tools required. The source code is mounted from where you run make into the build container as a Docker volume.)

To run the test suite:

make test

Playing in minikube

First, start minikube.

You may need to load the Docker images into your minikube environment. There is a convenience rule in the Makefile to do this:

make prime-minikube

Then run Cortex in minikube:

kubectl apply -f ./k8s

(these manifests use latest tags, i.e. this will work if you have just built the images and they are available on the node(s) in your Kubernetes cluster)

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

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

If that doesn't work, your Minikube might be using a different ip address. Check with minikube status.

Vendoring

We use dep to vendor dependencies. To fetch a new dependency, run:

dep ensure

To update dependencies, run

dep ensure -update

Further reading

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

Getting Help

If you have any questions about Cortex:

Your feedback is always welcome.

You can’t perform that action at this time.