driskell / log-courier

The Log Courier Suite is a set of lightweight tools created to ship and process log files speedily and securely, with low resource usage, to Elasticsearch or Logstash instances.
Other
419 stars 107 forks source link

lc-admin does not default to tcp transport #395

Closed sysmonk closed 1 year ago

sysmonk commented 2 years ago

The documentation here says: If no transport name is specified, "tcp" is assumed. And even has a "transportless" example below 127.0.0.1:1234

But in reality, lc-admin still requirers to specify a transport:

~# lc-admin -connect :127.0.0.1:12345
Admin version 2.9.1

Setting up client for :127.0.0.1:12345...
Error: unknown transport specified for admin bind: ''
~# lc-admin -connect tcp:127.0.0.1:12345
Admin version 2.9.1

Setting up client for tcp:127.0.0.1:12345...
Detected remote Log Courier v2.9.0

~#

this if on v 2.9.1, but 2.9.0 was the same, didn't check the versions before.

driskell commented 1 year ago

Ah - you need to say 127.0.0.1:12345 instead of with the proceeding colon. I can make it handle it though for next version. It was checking for the existence of only one colon rather than handling both formats and checking for an empty value

driskell commented 1 year ago

Ah and yes it doesn't work without the colon anyway either, due to the port:

Setting up client for 127.0.0.1:12340...
Error: unknown transport specified for admin bind: '127.0.0.1'