# MetricBeat Microsoft SQL Server Custom Port

**URL:** <https://discuss.elastic.co/t/metricbeat-microsoft-sql-server-custom-port/214121>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [January 7, 2020, 7:47pm UTC](https://discuss.elastic.co/t/metricbeat-microsoft-sql-server-custom-port/214121 "2020-01-07T19:47:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anji\_Reddy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anji_reddy/32/59007_2.png) [@Anji\_Reddy](https://discuss.elastic.co/u/Anji_Reddy)\
**Post date:** [January 7, 2020, 7:47pm UTC](https://discuss.elastic.co/t/metricbeat-microsoft-sql-server-custom-port/214121/1 "2020-01-07T19:47:05Z")

</div>

We are trying to configure Metricbeat for Microsoft SQL server with custom port 31433. How do we configured mssql.yml file like below. This does not work.  
module: mssql  
metricsets:  
- "transaction\_log"  
- "performance"  
hosts: ["sqlserver://10.x.x.x:31433"]  
username : xxxxx  
password: xxxx

---

<div class="post-metadata">

**Author:** ![Kaiyan\_Sheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaiyan_sheng/32/38247_2.png) [@Kaiyan\_Sheng](https://discuss.elastic.co/u/Kaiyan_Sheng)\
**Post date:** [January 30, 2020, 8:44pm UTC](https://discuss.elastic.co/t/metricbeat-microsoft-sql-server-custom-port/214121/2 "2020-01-30T20:44:58Z")

</div>

@Mario_Castro Could you help here please? The format of `hosts` seems right to me. The only thing I can think of is to try putting username and password into hosts maybe? Like `["sqlserver://user:password@localhost: 31433"]`

---

<div class="post-metadata">

**Author:** ![Mario\_Castro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mario_castro/32/35107_2.png) [@Mario\_Castro](https://discuss.elastic.co/u/Mario_Castro)\
**Post date:** [January 31, 2020, 10:38am UTC](https://discuss.elastic.co/t/metricbeat-microsoft-sql-server-custom-port/214121/3 "2020-01-31T10:38:01Z")

</div>

Hi @Anji_Reddy

Please, can you attach the output metricbeat, for example by running `metricbeat -e -d "*"`. Also, can you detail which version of MS SQL are you using and which version of Metricbeat.

One last thing, do you have any issue by accessing with the system administrator user? In other words, can you confirm that you aren't having a permissions problem?

---

<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:** [February 28, 2020, 10:45am UTC](https://discuss.elastic.co/t/metricbeat-microsoft-sql-server-custom-port/214121/4 "2020-02-28T10:45:46Z")

</div>

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