# Unable to connect to ibm\_mq from metricbeat

**URL:** <https://discuss.elastic.co/t/unable-to-connect-to-ibm-mq-from-metricbeat/273188>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [May 17, 2021, 2:57pm UTC](https://discuss.elastic.co/t/unable-to-connect-to-ibm-mq-from-metricbeat/273188 "2021-05-17T14:57:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohitarorait82](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rohitarorait82/32/82981_2.png) [@rohitarorait82](https://discuss.elastic.co/u/rohitarorait82)\
**Post date:** [May 17, 2021, 2:57pm UTC](https://discuss.elastic.co/t/unable-to-connect-to-ibm-mq-from-metricbeat/273188/1 "2021-05-17T14:57:36Z")

</div>

Hi All,

I am trying to connect to IBM MQ from metricbeat, in logstash, I have provided all the values required to connect to a queue manager like below

```
:factory: com.ibm.mq.jms.MQQueueConnectionFactory
  :queue_manager: QM_name
  :host_name: host ip
  :channel: channel_name
  :port: port number
  :transport_type: 1
  :require_jars:
    - jar1
    - jar2

```

However, when I am trying to connect IBM\_MQ from metricbeat, it is only asking me to provide below values. I tried giving IP and port in hosts field, but then it is throwing error

```
- module: ibmmq
  metricsets: ['qmgr']
  period: 10s
  hosts: ['localhost:9157']

```

Error :  
Error fetching data for metricset ibmmq.qmgr: unable to decode response from prometheus endpoint: error making http request: Get "[http://ip](http://ip):port/metrics": dial tcp ip:port: connect: connection refused

Can someone please suggest , how to connect with ibm mq

---

<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:** [June 14, 2021, 4:58pm UTC](https://discuss.elastic.co/t/unable-to-connect-to-ibm-mq-from-metricbeat/273188/2 "2021-06-14T16:58:08Z")

</div>

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