Skip to content

os::linux::local::plugin --mode=list-storages doesn't return an error on connection problems using ssh-backend sshcli or plink #5364

@rmorandell-pgum

Description

@rmorandell-pgum

Quick description

When I'm using the plugin os::linux::local::plugin with mode "list-storages" it doesn't terminate with an error when using wrong ssh credentials or the destination doesn't respond on ssh port.

The plugins responses with a empty xml and return code 0 for OK.

image

using the ssh-backend the plugin response is correct:

image

How to reproduce

Please provide below the initial conditions to reproduce the bug

  • perl centreon_plugins.pl --hostname=<IP that has no SSH port open) --ssh-backend=sshcli --ssh-username=test --ssh-password='' --ssh-priv-key='' --sshcli-option='-o=StrictHostKeyChecking=no' --plugin=os::linux::local::plugin --mode=list-storages --ssh-port=22 --disco-show

Expected result

Same plugin with mode=uptime with ssh-backend=sshcli does it correct.

perl centreon_plugins.pl --hostname=10.10.100.23 --ssh-backend=sshcli --ssh-username=test --ssh-password='' --ssh-priv-key='' --sshcli-option='-o=StrictHostKeyChecking=no' --plugin=os::linux::local::plugin --mode=uptime --ssh-port=22
UNKNOWN: Command error: ssh: connect to host 10.10.100.23 port 22: Connection refused

image

So using the service discovery command I can't understand if the SSH communication is working and only there are no items for the filter used (empty list) or the communication is broken

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions