Icon

Comments have been closed on this page. Please use AppMon & UEM Plugins forum for questions about this plugin.

Overview

The SSH Client Action Plugin executes any arbitrary command or script on any SSH accessible remote machine. It can be used as an Incident Action plugin to perform some action on a remote machine as a result of an incident triggering.

Name

SSH Action Plugin

Plug-In Version

1.0.2

Compatible with

dynaTrace >= 4.x

Author

Joe Hoffman (joe.hoffman@dynatrace.com)

License

dynaTrace BSD

Support

Community Supported

Downloads

com.dynatrace.sshClient_1.0.2.jar

Key benefits

Ensures encrypted communication with remote machine
Executes any command or script
Open source: Adaptable as necessary
OS Independent
Uses the jsch (java Secure Channel) encryption package which is an implementation of SSH2

Additional Notes

It accepts SSH connections from whatever responds on port 22 on the specified machine. This means that it could be vulnerable to a Man in the Middle attack. Therefore we suggest running it on and across only trusted networks.
This plugin requires an SSH service be running on the specified remote machine. FreeSSHd is a good option for any OS that does not have SSH natively.

Configuration

Debugging

Output from the executed command is written to the plugin log which can be found in the log directory of the Collector where the plugin is being executed.

Additional suggested Improvements

  • Provide a switch to be able to disable logging for verbose commands
  • Regex Match for output match
  • Configurable as a task
  • Success criteria
  • Make the SSH port configurable
  • Most of these features would be attainable by adding this SSH functionality to the Generic Execution Plugin and making the SSH feature optional.

Contribution

Feel free to contribute any changes on Github

 

  1. Anonymous (login to see details)

     

    I just used this plugin to generate a voice message upon incident:

    You would have to setup a Linux box in your office, to which you can connect from the Dynatrace server through ssh using this plugin.

    On this target Linux box, you should install the “festival” text to speech package, with at least one voice, to be able to use the “text2wave” command :

    For my Mint distribution (based on Ubuntu), I had to issue the following commands, as root, to install the required packages :

    • apt-get install festival
    • apt-get install festvox-don

    You’ll also need to install “aplay” if it’s not already there.

    Then, use the following piped commands to have your Linux Box pronounce a text :

    • echo 'Some incident occurred' | text2wave | aplay

    Now, in Dynatrace, just add an SSHClientAction to your incident rule, and configure it to connect to your Linux Box, with user, password and the aforementioned command :

     

    When the incident is triggered, the Dynatrace Server will run the ssh action, connecting to the Linux Box in your office…and your Linux Box will speak to you.

     

    Have fun.

    --

    Laurent IZAC

     

  2. Anonymous (login to see details)

    I am not able to download this plugin, when i client on the link to the jar file, it just redirects me to the same page.

    1. Anonymous (login to see details)

      Hi Shiv. Thanks for making us aware of this. The plugin just moved to our new GitHub repository. This link has not been update. It should work now.

  3. Anonymous (login to see details)

    Thanks for the prompt action Andreas!.