Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

...

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

Our implementation support supports authentication methods usingwhich use:

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

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

...

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 to execute scripts already existing scripts in your system. To run an existing script on your server just write an execution command just like in the shell (i.e ./home/user1732/Documents/sctipts/notifyLowMem.sh). Remember that some users may do NOT have the access to some files or execution permissionpermissions. Most operating systems inform you about this situation and Pulse - Monitoring Tool for JIRA also throw throws the information about this, otherwise . Otherwise you may would just be just informed about an unsuccessfully running script running.

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

Pulse - Monitoring Tool for JIRA provide  provides a correct value mechanism - it allows you to define if a returned value is bigger, smaller or equal to the expected value. Depending of on a 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 . If all of your test tries will successsucceed, in case when using "at least one attempt was successful" - , any of the test tries have has to success succeed to set your service as working correctly working.
 

Info
titleImportant

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

...

Info
titleImportant

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

 

or should NOT:

Examples

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

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

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

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

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

FAQ

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

It is possible sometimes you will Sometimes you may be informed about successfully a successful connection , but even then script executions failedmay fail. In most cases it means that your script unsuccessfully finished but if you set the timeout script execution too small the shell streams latency may cause that there will be not enpugh enough time to run a script and read the result. For better efficiency it is recommended to set a higher script execution timeout - if a script will execute faster, you will NOT have to wait until the execution time finish, but if sometimes executin script in any reasons extend finishes. When the executed script extends, for any reason,  it is more possible that this script will run correctly.