Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Protocol Overview

SSH (Secure Shell) is a cryptographic network protocol for operating network services securely over an unsecured network. The best known example application is for remote login to computer systems by users. Read more on Wikipedia.

Implemented features

Currently SSH protocol allows you to add SSH servers to monitor if is available and even execute your own scripts. In case execute own script it will return information about execution status and returened numerical value (if possible).

There are 3 possible usage scenarios:

  1. Check only if SSH service is up&running without executing any command on remote host. In this scenario test is successful when SSH connection is made.
  2. Check SSH connectivity and execute a script or program on remote host. In this case test is successful when SSH connection is made, script was able to execute and returned exit code 0.
  3. Check script execution result and parse its result. In this scenario to mark test successful, condition from scenario no. 2 have to be met and script output have to contain expected value (e.g. if script ends with result message "Free disk space 543MB" value of 543 will be used as returned value).

Our implementation support authentication methods using:

  • username and password,
  • username and private key,
  • username, private key and password.

If you want to execute own script it is important to fill timeout script execution field. It is approximated execution time for your script. Obviously if your script will execute faster than you expected, test will finish faster, but in another case your service will be set as timeouted and flagged as failure.

Protocol settings

Pulse - Monitoring Tool for JIRA SSH protocol allows you to run inline scripts (i.e df -h -m .|awk '{ print $2}'|tail -1 ), but also execute scripts already existing in your system. To run existing script on your server just write execution command like in shell (i.e ./home/user1732/Documents/sctipts/notifyLowMem.sh). Remember that some users may do NOT have access to some files or execution permission. Most operating systems inform you about this situation and Pulse - Monitoring Tool for JIRA also throw information about this, otherwise you may be just informed about unsuccessfully script running.

Currently Pulse - Monitoring Tool for JIRA for each of supported protocols allows you to specify "correct" or "expected" values. These values must be numerical. Default if your script return more than one numerical value, the first one will be used. Script values may be integer or floating point.

Pulse - Monitoring Tool for JIRA provide correct value mechanism - it allows you to define if returned value is bigger, smaller or equal expected value. Depending of choosen strategy and script execution tries, the service will be failed or succeded. If you use "all attempts were successful" - your service will be set as success if all of your test tries will success, in case using "at least one attempt was successful" - any of test tries have to success to set your service as correctly working.
 

Important

If Pulse - Monitoring Tool for JIRA notice problems with correct connection service, value tests will NOT be running. 

Important

It is highly recommended to use OpenSSH private key format. Currently if you are NOT using password in addition it is not such important, in another case it may be necessery. Below you can see how it should looks like:

or should NOT:

Examples

Below you can find sample of SSH protocol configuration in Pulse - Monitoring Tool for JIRA.

Before configure service make sure your SSH server is running on server. If you want successfully test your service the following steps need to be properly passed:

  • SSH server have to be running,
  • check if your SSH server is running on specified port,
  • check, how do you authorize with your service (if it is just a password, private key or both).

If all parameters you entered are correct, you service connect correctly. If not checkout your firewall rules.

Next step, if SSH connection estabilish correctly is script execution. It is highly recommended to set service timeout higher than script execution timeout. It will NOT be a mistake, but in some cases it may cause failures. 

FAQ

Why my SSH service connect to the server correctly but script return exit status code -1?

It is possible sometimes you will be informed about successfully connection, but script executions failed. In most cases it means that your script unsuccessfully finished but if you set timeout script execution too small shell streams latency may cause not enpugh time to run script and read result. For better efficiency it is recommended to set higher script execution timeout - if script will execute faster you will NOT have to wait until execution time finish, but if sometimes executin script in any reasons extend it is more possible that script will run correctly.

  • No labels