# I'm trying to build new integration

**URL:** <https://discuss.elastic.co/t/im-trying-to-build-new-integration/349866>\
**Category:** Elastic Agent\
**Tags:** integrations\
**Created:** [December 22, 2023, 3:30pm UTC](https://discuss.elastic.co/t/im-trying-to-build-new-integration/349866 "2023-12-22T15:30:51Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![kcreddy](https://avatars.discourse-cdn.com/v4/letter/k/6f9a4e/32.png) [@kcreddy](https://discuss.elastic.co/u/kcreddy)\
**Post date:** [December 28, 2023, 11:02am UTC](https://discuss.elastic.co/t/im-trying-to-build-new-integration/349866/6 "2023-12-28T11:02:51Z")

</div>

> [@zeynepyz](#):
>
> Yes i want to check Elastic Agent debug logs but is there any command for me to do it?

You can use the [CLI to collect the diagnostics](https://www.elastic.co/guide/en/fleet/current/fleet-troubleshooting.html#_collect_elastic_agent_diagnostics_bundle:~:text=Get%20the%20diagnostics%20bundle%20using%20the%20CLI).

If you are collecting metrics via beat, I believe you were making use of metricbeat modules and metricsets for your use case.  
When creating integration, you need to define `metricsets` in your input configuration. You can refer to an existing integration such as [ActiveMQ](https://github.com/elastic/integrations/tree/main/packages/activemq) on how to define [modules](https://github.com/elastic/integrations/blob/main/packages/activemq/data_stream/topic/manifest.yml#L4) and [metricsets](https://github.com/elastic/integrations/blob/main/packages/activemq/data_stream/topic/agent/stream/stream.yml.hbs#L1)

---

_[View the full topic](https://discuss.elastic.co/t/im-trying-to-build-new-integration/349866)._
