2 Replies Latest reply on May 18, 2011 4:05 AM by b1tm4p

    using External Process to run scripts on External Host


      Hi, I'm new to ipMonitor. We're migrating from Oracle Enterprise Manager (that works with agents) where I created a lot of so called User Defined Metrics, to ipMonitor. We have several OS scripts in place we would like to migrate with as little recoding as possible. There are some scripts that exit with a returncode of either 0 or 1 so those scripts (that are on external hosts) can be called in this way with External Process:


      Monitor Name                                      External Process Test 2

      Executable Name                                 psexec.exe

      Directory                                                D:\scripts\

      Command Line Parameters                \\SERVER -u USER -p PASS

                                E:\ipMonitor\check.cmd /acceptEula

      Startup Directory                                  D:\scripts\

      Expected Return Value                0


      In the above example psexec.exe is located in d:\scripts on the ipMonitor server, with the parameters of psexec.exe the external script on the other host is called. Works like a charm.


      But... I would like to be able to return some environment variables instead of just the 0 or 1 exitcode. When I select 'Compare an Environment Variable' instead of '' and set 'variable name' to result and 'variable value' to successful

      I would expect this should be possible.


      I read that the script should call the signal_env.exe to send the environment values to ipMonitor. So I created a little script called check_env.cmd on the external host that does no more than:


      SET result=successful


      When I create a monitor for this and run this from ipMonitor I get this result:

      Last Result: The expected environment variable was not detected


      When I run the psexec command from the commandline on the ipMonitor server I get:

      psexec.exe \\SERVER -u USER -p PASS                      E:\ipMonitor\check_env.cmd /acceptEula

      PsExec v1.98 - Execute processes remotely
      Copyright (C) 2001-2010 Mark Russinovich
      Sysinternals -

      ipMonitor7 did not receive the environment variables
      E:\ipMonitor\check_env.cmd exited on rbndtcorap001 with error code 0.

      So, I'm a bit confused. Does signal_env.exe only work when you run a script on the ipMonitor server or is it possible to gather environment variables from an external host with this tool?

      Maybe my goal can be achieved in an other way, please advice.