Traverse custom monitor - SSH/SFTP test

QUESTION:

How to create Traverse custom monitor?

 

RESOLUTION:

 

The purpose of this KB is to show the ability of a custom monitor combined with local applications (e.g ssh/sftp client)

Requirements:

* ssh server to be monitored
* ssh client (e.g. PuTTY suite for Windows)
* RSA Key connection established with the server

Assuming you have installed PuTTY suite for Windows or ssh client for GNU/Linux


To create the SSH secure connection with a RSA key:

Windows:

http://winscp.net/eng/docs/ui_puttygen

Linux:

http://www.cyberciti.biz/faq/how-to-set-up-ssh-keys-on-linux-unix/


  •  Files:


<TRAVERSE_HOME>/plugins/monitors/SFTP/sftptest.cmd
<TRAVERSE_HOME>/plugins/monitors/SFTP/sftptest.sh
<TRAVERSE_HOME>/plugins/monitors/sftp.xml


The public key should go on the server to be monitor. The OS should be the one running on the DGE/DGEx.

* copying the scripts and xml

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)
please refer to KB: https://helpdesk.kaseya.com/entries/102273266-TCP-connections-plugin-monitor for more details.

In Linux please change the status of the script to executable; #chmod 755 <TRAVERSE_HOME>/plugins/monitors/SFTP/sftptest.sh

  • Running the test:


Testing:

You can manually check that the script is properly running just call the script like the example below:

Linux:

<TRAVERSE_HOME>/plugins/monitors/SFTP/sftptest.sh <user> <ssh server>

e.g. <TRAVERSE_HOME>/plugins/monitors/SFTP/sftptest.sh sftpuser 10.20.20.90
Windows:

<TRAVERSE_HOME>\plugins\monitors\SFTP\sftptest.cmd <user> <ssh server> <location and key name> <path of psftp executable>

e.g. <TRAVERSE_HOME>\plugins\monitors\SFTP\sftptest.cmd sftpuser 10.20.20.90 c:\temp\id_rsa.ppk c:\temp

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"


  •  Adding the script


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

    Navigate to 'Superuser->Health->Actions' to select 'Reload Config Files' from the 'Action' menu for the BVE and the DGE    
    
To provision a test to alert when the number of connections to the provisioning server is less than the expected 4 connections:

    Navigate to 'Administration->Devices'
    Select 'tests' link for the Device
    'Create New Standard Tests'
    Select 'Create new tests by selecting specific monitors'
    Check the box for monitor type 'sftp' then 'Add Tests'
    Select test category 'SFTP Test Windows' or 'SFTP Test Linux' accordingly  then 'Continue'
    Complete the requested information (e.g. user, rsa key path, psftp path)
    Check the box to the left of 'SFTP Test Windows' (to provision the test)
    

APPLIES TO:

All versions of Traverse


   

Attachments

Have more questions?

Contact us

Was this article helpful?
1 out of 1 found this helpful

Provide feedback for the Documentation team!

Browse this section