Skip to content
/ m3 Public

M3 monorepo - Distributed TSDB, Aggregator and Query Engine, Prometheus Sidecar, Graphite Compatible, Metrics Platform

License

Notifications You must be signed in to change notification settings

m3db/m3

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4790b1e · Oct 22, 2024
Oct 22, 2024
May 11, 2023
Nov 18, 2020
Oct 20, 2020
Nov 7, 2020
Aug 14, 2024
Aug 14, 2024
Nov 9, 2020
Mar 9, 2021
Oct 22, 2024
Sep 12, 2023
Jan 16, 2019
Oct 22, 2024
Dec 3, 2021
Dec 20, 2018
Oct 9, 2018
Apr 17, 2018
Apr 17, 2018
Dec 3, 2021
Oct 28, 2020
May 22, 2023
Jan 25, 2017
Aug 14, 2024
Jun 9, 2020
Feb 25, 2019
Apr 7, 2022
Nov 9, 2020
Mar 29, 2021
Aug 1, 2022
May 19, 2021
Oct 22, 2024
Nov 9, 2020
May 18, 2018
Aug 14, 2024
Jan 30, 2019
Dec 23, 2021
Nov 9, 2020
May 30, 2018
Jul 25, 2024
Aug 14, 2024
Aug 14, 2024
Jan 10, 2023
Apr 6, 2021

Repository files navigation

M3

GoDoc Build Status FOSSA Status

M3 Logo

Distributed TSDB and Query Engine, Prometheus Sidecar, Metrics Aggregator, and more such as Graphite storage and query engine.

Table of Contents

More Information

Community Meetings

You can find recordings of past meetups here: https://vimeo.com/user/120001164/folder/2290331.

Install

Dependencies

The simplest and quickest way to try M3 is to use Docker, read the M3 quickstart section for other options.

This example uses jq to format the output of API calls. It is not essential for using M3DB.

Usage

The below is a simplified version of the M3 quickstart guide, and we suggest you read that for more details.

  1. Start a Container
docker run -p 7201:7201 -p 7203:7203 --name m3db -v $(pwd)/m3db_data:/var/lib/m3db quay.io/m3db/m3dbnode:v1.0.0
  1. Create a Placement and Namespace
#!/bin/bash
curl -X POST http://localhost:7201/api/v1/database/create -d '{
  "type": "local",
  "namespaceName": "default",
  "retentionTime": "12h"
}' | jq .
  1. Ready a Namespace
curl -X POST http://localhost:7201/api/v1/services/m3db/namespace/ready -d '{
  "name": "default"
}' | jq .
  1. Write Metrics
#!/bin/bash
curl -X POST http://localhost:7201/api/v1/json/write -d '{
  "tags": 
    {
      "__name__": "third_avenue",
      "city": "new_york",
      "checkout": "1"
    },
    "timestamp": '\"$(date "+%s")\"',
    "value": 3347.26
}'
  1. Query Results

Linux

curl -X "POST" -G "http://localhost:7201/api/v1/query_range" \
  -d "query=third_avenue" \
  -d "start=$(date "+%s" -d "45 seconds ago")" \
  -d "end=$( date +%s )" \
  -d "step=5s" | jq .  

macOS/BSD

curl -X "POST" -G "http://localhost:7201/api/v1/query_range" \
  -d "query=third_avenue > 6000" \
  -d "start=$(date -v -45S "+%s")" \
  -d "end=$( date +%s )" \
  -d "step=5s" | jq .

Contributing

You can ask questions and give feedback in the following ways:

M3 welcomes pull requests, read contributing guide to help you get setup for building and contributing to M3.


This project is released under the Apache License, Version 2.0.