elastic / elastic/integrations

[SQL Input]: Multiple issues with the hosts fiels.

Open
#19,888 0 comments 0 reactions 0 assignees View on GitHub
Integration:sql needs:triage Team:Obs-InfraObs
Dominant language
Handlebars
Stars
333
Forks
647
Avg merge
2d 17h
Merged PRs (30d)
225

Description

### Integration Name

SQL Input [packages/sql_input]

### Dataset Name

_No response_

### Integration Version

1.1.0

### Agent Version

9.4.1

### Agent Output Type

elasticsearch

### Elasticsearch Version

9.5.0

### OS Version and Architecture

RedHat

### Software/API Version

_No response_

### Error Message

_No response_

### Event Original

_No response_

### What did you do?

1. Hosts field refused to work until I URL encoded the host string and put it in quotation marks. Integration should do this itself, or the documentation should reflect this need.
2. Integration tried to connect to localhost unless I added a new Hosts row and left it empty.

### What did you see?

Error message: "cannot open connection: testing connection: unable to open tcp connection with host 'localhost:1433': dial tcp [::1]:1433: connect: connection refused"

### What did you expect to see?

SQL rows creating events.

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start in packages/sql_input and reproduce the connection using the reported Hosts values, including the URL-encoded and quoted form. Trace how an empty or configured Hosts row is parsed and how the default localhost:1433 endpoint is selected. Done means the configured host works without manual encoding or quoting, and an unintended localhost fallback no longer prevents SQL rows from becoming events.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.