Skip to content

Conversation

@AnatomicJC
Copy link

As discussed with you by mail, here is a pull request. I added a SSH class who allows you to use native SSH in replacement of python Paramiko module.

It is still a work in progress. For now, all params like user, port, etc. must be managed in ssh config file.

If you can reach a host with "ssh host", you will be able to use any check like this:

python2 check_cpu_stats_by_ssh.py -H host -a ssh

Never forget you have to populate a ~/.ssh/config file with at
least SSH multiplexing params:
ControlMaster auto
ControlPath ~/.ssh/sockets/%r@%h:%p
ControlPersist 600

http://blog.scottlowe.org/2015/12/11/using-ssh-multiplexing/

Jean-Christophe VASSORT added 5 commits December 3, 2016 10:15
This class allows you to use native SSH in replacement of python
Paramiko module.

Never forget you have to populate a ~/.ssh/config file with at
least SSH multiplexing params:
  ControlMaster auto
  ControlPath ~/.ssh/sockets/%r@%h:%p
  ControlPersist 600
http://blog.scottlowe.org/2015/12/11/using-ssh-multiplexing/
if checks are launched with '-a ssh' param, native ssh will be used
instead of paramiko module
https://docs.python.org/2/library/optparse.html

"Deprecated since version 2.7: The optparse module is deprecated and will
not be developed further; development will continue with the argparse
module."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant