# Trouble understanding how to create a new metricset

**URL:** <https://discuss.elastic.co/t/trouble-understanding-how-to-create-a-new-metricset/81710>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [April 9, 2017, 12:45pm UTC](https://discuss.elastic.co/t/trouble-understanding-how-to-create-a-new-metricset/81710 "2017-04-09T12:45:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lisadeng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lisadeng/32/15458_2.png) [@lisadeng](https://discuss.elastic.co/u/lisadeng)\
**Post date:** [April 9, 2017, 12:45pm UTC](https://discuss.elastic.co/t/trouble-understanding-how-to-create-a-new-metricset/81710/1 "2017-04-09T12:45:44Z")

</div>

I'm mostly looking at the 'fetch' section of creating my own metricset.

The problem is that we have a custom service and we want to write a custom metricset to collect metrics from it.

I took a look at the docker images metricset.  
Usually, if I want to get the status of the docker images, I'd open up my terminal and type 'docker images'.

I actually have no idea where the fetch method gets a function/line like this:

images, err :=m.dockerClient.ListImages(dc.ListImagesOptions())

not sure if ListImagesOptions was part of the metricbeat library, or if it was written up in a file elsewhere.

So my question is - should I be looking more closely into the directory to see if they've defined this method in there and try to emulate this?

Should I try to create a new metricset for my custom software, OR should I just create a new beat based off of metricbeat? I'm unsure of the differences between the two.

Thank you! I know C, but I do not know go unfortunately.

EDIT: I took a look at the MongoDB repositories and saw the API - I understand the process more clearly now.

I'm going to have to create an API on my application and have Go query it.

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [April 10, 2017, 8:32am UTC](https://discuss.elastic.co/t/trouble-understanding-how-to-create-a-new-metricset/81710/2 "2017-04-10T08:32:40Z")

</div>

About API, if your API is e.g. HTTP+JSON you might be able to use [Logstash with http\_poller](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-http_poller.html) or [httpbeat](https://github.com/christiangalsterer/httpbeat). More configurable collectors like [httpbeat](https://github.com/christiangalsterer/httpbeat) might come to metricbeat in the future. For example see [(jolokia/jmx) module](https://www.elastic.co/guide/en/beats/metricbeat/master/metricbeat-module-jolokia.html) and [prometheus/collector module](https://www.elastic.co/guide/en/beats/metricbeat/master/metricbeat-metricset-prometheus-collector.html) currently in beats development branch.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 8, 2017, 8:35am UTC](https://discuss.elastic.co/t/trouble-understanding-how-to-create-a-new-metricset/81710/3 "2017-05-08T08:35:43Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
