Push metrics to M3DB coordinator using remote write API

281 views
Skip to first unread message

madhu sudhana Reddy

unread,
Jun 24, 2020, 4:25:01 AM6/24/20
to M3
Hi,
I am trying to push metrics to M3DB using coordinator remote write API.  

Scenario: we use need to use a push mechanism to send the metrics to M3DB. For this, we are using the M3DB coordinator. For API testing, We are Using the Postman tool, to push the metric.

Post Body
{
  "namespace": "default",
  "tags": [
    {
      "name": "__name__",
      "value": "user_login"
    },
    {
      "name": "city",
      "value": "new_york"
    },
    {
      "name": "endpoint",
      "value": "/request"
    }
  ],
  "datapoint": {
   "timestamp": 1591691050,
    "value": 42.123456789
  }
}

Application is throwing error "error":"snappy: corrupt input" m3db 

madhu sudhana Reddy

unread,
Jun 24, 2020, 4:32:43 AM6/24/20
to M3


On Wednesday, June 24, 2020 at 1:25:01 AM UTC-7, madhu sudhana Reddy wrote:
Hi,
I am trying to push metrics to M3DB using coordinator remote write API.  

Scenario: we use need to use a push mechanism to send the metrics to M3DB. For this, we are using the M3DB coordinator. For API testing, We are Using the Postman tool, to push the metric.


Post body:
{
  "labels": [
    {
      "name": "__name__", 
      "value": "user_login"
    },
    {
      "name": "rc",     
      "value": "200"
    },
    {
      "name": "is_success",     
      "value": false
    },
    {
      "name": "errors", 
      "value": null

sayf eddine Hammemi

unread,
Jun 24, 2020, 5:26:29 AM6/24/20
to madhu sudhana Reddy, M3
I guess (I may be mistaken) that Prometheus sends the data to remote write endpoints in a protobuf over HTTP format, you need a specific tool to push the data manually or just use Prometheus in your tests

--
You received this message because you are subscribed to the Google Groups "M3" group.
To unsubscribe from this group and stop receiving emails from it, send an email to m3db+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/m3db/64e7dc30-67ea-431e-a5aa-10db0d1f8125o%40googlegroups.com.

Rob Skillington

unread,
Jun 29, 2020, 12:40:14 AM6/29/20
to sayf eddine Hammemi, madhu sudhana Reddy, M3
Hi Madhu,

For the Remote Write Endpoint you'll need to snappy compress a protobuf message, more documentation is available here including an example pushing metrics with a Go client library used by a command line utility "promremotecli":
https://docs.m3db.io/m3coordinator/api/remote/#remote-write


Reply all
Reply to author
Forward
0 new messages