Ask the Community
Groups
Traverse custom monitor - SSH/SFTP test - Connect IT Community | Kaseya
<main> <article class="userContent"> <p><strong>QUESTION:</strong></p> <p>How to create Traverse custom monitor?</p> <p> </p> <p><strong>RESOLUTION:</strong></p> <p> </p> <p>The purpose of this KB is to show the ability of a custom monitor combined with local applications (e.g ssh/sftp client)<br><br>Requirements:<br><br>* ssh server to be monitored<br>* ssh client (e.g. PuTTY suite for Windows)<br>* RSA Key connection established with the server<br><br>Assuming you have installed PuTTY suite for Windows or ssh client for GNU/Linux<br><br><br>To create the SSH secure connection with a RSA key:<br><br>Windows:<br><br><a href="/home/leaving?allowTrusted=1&target=http%3A%2F%2Fwinscp.net%2Feng%2Fdocs%2Fui_puttygen">http://winscp.net/eng/docs/ui_puttygen</a><br><br>Linux:<br><br><a href="/home/leaving?allowTrusted=1&target=http%3A%2F%2Fwww.cyberciti.biz%2Ffaq%2Fhow-to-set-up-ssh-keys-on-linux-unix%2F">http://www.cyberciti.biz/faq/how-to-set-up-ssh-keys-on-linux-unix/</a><br><br><br></p> <ul><li> Files:</li> </ul><p><br><TRAVERSE_HOME>/plugins/monitors/SFTP/sftptest.cmd<br><TRAVERSE_HOME>/plugins/monitors/SFTP/sftptest.sh<br><TRAVERSE_HOME>/plugins/monitors/sftp.xml<br><br><br>The public key should go on the server to be monitor. The OS should be the one running on the DGE/DGEx.<br><br>* copying the scripts and xml<br><br>We should copy the xml and the script files under <TRAVERSE_HOME>/plugins/monitors and the script under <TRAVERSE_HOME>/plugins/monitors/SFTP/ directory (we have to create this) <br>please refer to KB: <a href="/home/leaving?allowTrusted=1&target=https%3A%2F%2Fhelpdesk.kaseya.com%2Fentries%2F102273266-TCP-connections-plugin-monitor">https://helpdesk.kaseya.com/entries/102273266-TCP-connections-plugin-monitor</a> for more details.<br><br>In Linux please change the status of the script to executable; #chmod 755 <TRAVERSE_HOME>/plugins/monitors/SFTP/sftptest.sh<br><br></p> <ul><li>Running the test:</li> </ul><p><br>Testing:<br><br>You can manually check that the script is properly running just call the script like the example below:<br><br>Linux:<br><br><TRAVERSE_HOME>/plugins/monitors/SFTP/sftptest.sh <user> <ssh server><br><br>e.g. <TRAVERSE_HOME>/plugins/monitors/SFTP/sftptest.sh sftpuser 10.20.20.90<br>Windows:<br><br><TRAVERSE_HOME>\plugins\monitors\SFTP\sftptest.cmd <user> <ssh server> <location and key name> <path of psftp executable><br><br>e.g. <TRAVERSE_HOME>\plugins\monitors\SFTP\sftptest.cmd sftpuser 10.20.20.90 c:\temp\id_rsa.ppk c:\temp<br><br>If the script is running properly and is able to connect to the sftp, will return a "10" (note this is an arbitrary number). If fail will return "20"<br><br><br></p> <ul><li> Adding the script</li> </ul><p><br>Confirm on the 'Superuser->Health' page that the plugin files have been distributed from the BVE to the other servers by observing that the 'Config Rev#' number been incremented, then<br><br> Navigate to 'Superuser->Health->Actions' to select 'Reload Config Files' from the 'Action' menu for the BVE and the DGE <br> <br>To provision a test to alert when the number of connections to the provisioning server is less than the expected 4 connections:<br><br> Navigate to 'Administration->Devices'<br> Select 'tests' link for the Device <br> 'Create New Standard Tests'<br> Select 'Create new tests by selecting specific monitors'<br> Check the box for monitor type 'sftp' then 'Add Tests'<br> Select test category 'SFTP Test Windows' or 'SFTP Test Linux' accordingly then 'Continue'<br> Complete the requested information (e.g. user, rsa key path, psftp path)<br> Check the box to the left of 'SFTP Test Windows' (to provision the test)<br> </p> <p><strong>APPLIES TO:</strong></p> <p>All versions of Traverse</p> <p><br> </p> </article> </main>