ahaerpfer / ansible-inventory-omd-livestatus

Ansible dynamic inventory script for OMD Livestatus.
BSD 2-Clause "Simplified" License
1 stars 1 forks source link

Add possibility to provide port number for remote connections via SSH #9

Open ahaerpfer opened 8 years ago

ahaerpfer commented 8 years ago

See also Issue #5.

Remote Livestatus access via SSH currently does not allow to provide a port number for SSH connections:

--ssh=LOCATION     Connect to Livestatus socket via SSH.  LOCATION has the
                   form [user@]host[:path], the default path is ./tmp/run/live.

This is required for tunnelled SSH ports.

ahaerpfer commented 8 years ago

The current syntax

[user@]host[:path]

is based on the familiar notation e.g. used by scp. To also add a port number to this we would have to use an URI notation like

[user@]host[:port][/path/to/socket]

This requires an absolute path component; relative paths won't work any more. The most common case user@host is identical in both notations.

Alternatively we could use an additional CLI option `--port`` … which is a little ugly.