Erik Hollensbe edited this page Nov 11, 2013 · 6 revisions
  • Type: record
  • Params: must match the name of configured plugin -- see below.

This allows you to inject values into gollector. When a PUT query is issued with a payload that looks like:

{ 
  "Name": "record example",
  "Value": { "here's a hash": [ "of", "array", "of", "string" ] }
}

It will show up when queried with GET or POST methods just like any other gollector metric.

Configuring the record plugin

Note that the metric name and parameter are the same. This is critical to the accurate function of this plugin.

For a given metric named "record_example" like the above we PUT to:

{
  "Params": {
    "record_example": {
      "Type": "record",
      "Params": "record_example"
    }
  }
}

Note, again, that the "Params" section's value and the key, "record_example", are the same.

Example Usage

You can try with the above configuration example with the following curl commands:

To set the value:

curl http://gollector:gollector@localhost:8000 -X PUT -d '{ "Name": "record_example", "Value": 1 }'

To get the value:

curl http://gollector:gollector@localhost:8000 -d '{ "Name": "record_example" }'

Which will return 1.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.