IDERA

Custom Remote Monitor

 GitHub: uptimesoftware/monitor-custom-remote
Tags : remote
Category: plugin

Version Compatibility
Module Name
Uptime Monitoring Station Version
Custom Remote Monitor 3.017.8, 7.7, 7.6, 7.5, 7.4, 7.3
Custom Remote Monitor 2.27.2, 7.1, 7.0, 6.0
Download Files

Custom Remote Monitor 3.01 Custom Remote Monitor 2.2 - Uptime 7.2 or earlier only

Information Table
Description: The Custom Remote Monitor will trigger a script on a remote system via the Uptime agent and return the output to Uptime as a string. Note that this monitor provides an excellent general template for custom monitoring.
Supported Monitoring Stations:7.8, 7.7, 7.6, 7.5, 7.4, 7.3, 7.2, 7.1, 7.0, 6.0
Supported Agents:Windows, Solaris, Linux, AIX
Installation Notes:
  1. Uptime 7.3 and later - Install via the Extension Manager

  2. Uptime 7.2 - Download ‘Custom Remote Monitor 2.2’ and install via the Plugin Manager

Dependencies:

Agent must be installed to trigger remote script. Agent password must also be set up.

Input Variables:
  • uptime agent port (default 9998)
  • agent password
  • password set up on the agent system
  • remote script / command
  • script name (POSIX) or command (Win) set up on the agent
  • arguments that will be sent to the remote script
Output Variables:
  • string output received back from the remote script
Languages Used:
  • Shell/Batch
  • PHP

Notes:

If you need to save the results of this plugin for graphing or reporting purposes try the Custom Remote Integer plugin instead, as that monitor handles output as an integer which works much better for graphing purposes.

This plugin only does thershold comparisons (ie. contains, does not contain etc) against the first line of output from the agent side script.

####Agent Configuration Since this mod requires an agent component you will need to do the following on each server that you want to trigger a remote script.

####Linux/Solaris:

1. Make sure the file is able to be executed by the "nobody" user (Solaris) or "uptimeagent" user (Linux).

2. Create/edit the following agent password file: /opt/uptime-agent/bin/.uptmpasswd

3. Enter a line like the following for each script you want to run remotely: |
PASSWORD   /SCRIPT/NAME

As long as the agent user ('nobody' for Solaris and 'uptimeagent' for Linux) can read and execute the script manually the agent should be able to as well.

####Windows:

1. Place the script somewhere on a local drive on the system.

2. Open the Uptime Agent Console (Start > Uptime Agent).

3. Set a Password for the agent and click on the Save button (restart the agent for the change to take effect). It should only take about a second for the agent to restart and there should be no outage during this period.

4. Click on Advanced > Custom Scripts. It is here that you configure the agent to run your custom scripts. Changes are saved as soon as you click the add/edit/delete buttons to the registry.  

The scripts can be in any programming language (bat, vbs, php, perl,etc) as long as they can be executed on the command line.

The Command Name is just a descriptive name for the script. The Path to Script is the full path to the script (including the script name).

    Example (batch script):
    Command: dir_c
    Script: cmd /c dir C:\

    Example (vbs script):
    Command: wmi_script
    Script: cscript //nologo "C:\path\to\your\wmi-script.vbs"

    Example (perl script):
    Command: perl_script
    Script: cmd.exe /c "C:\perl\bin\perl.exe “C:\path\to\your.pl”

    Example (powershell script):
    Command: powershell_script
    Script: powershell.exe -ExecutionPolicy Bypass -Command "& C:\path\to\your.ps1”



5. After adding the custom script(s) to the list, click on the Close button and it will ask to restart the agent, click Yes. Changes only go into effect once the agent is restarted.

April 8, 2014 |

Comments

comments powered by Disqus
Copyright © 2015 IDERA, Inc.   Legal   Privacy Statement