Use nrpe_nt to start VB program

Michael Medin michael at medin.name
Mon Jun 23 12:08:07 CEST 2008


Hello,
Just a quick response, and I am not an expert here so I could be all wrong.
But I am not sure it will be possible / easy to do.

But you would need the "interact with desktop" option set on the service
and  also make sure the service is running as the same user as the one
that is logged in.

And even with this I am not really sure it is possible (out of the box)
services are generally not supposed to do that.


Another way (and this I think is the way I would do it)

Would be to stop running NRPE_nt as a service and instead run it as a
normal program from (autorun) and then it will be very easy to do.

If you monitor other things (such as the system) you might want to run two
instance one as a service that responds to your monitoring needs and one
as the local user that "launches the program".

Again I am not an expert so I dont really know... this is wild
speculations :)


// Michael Medin



> Hi,
>
> I hope someone could help...
> I'm trying to use Nagios and the check_nrpe plugins to restart a Visual
> Basic program if it's down.
> The Nagios server is a Linux box (Centos 5.1).
> check_nrpe launchs a vbs script on a Windows 2000 server which is the same
> machine where the VB program should run.
> The script uses WMI to check if the program is running and to potentially
> create a new instance of the process.
>
> On the Nagios server I install nrpe-2.12
> On the Windows 2000 server I install nrpe_nt 0.8 as a service running as
> LocalSystem and user currently logged is the domain administrator.
>
> This is an excerpt from nrpe.cfg on the Windows 2000 server:
>
> server_port=5666
> allowed_hosts=ip of Nagios server
> dont_blame_nrpe=1
> debug=1
> command_timeout=30
> loglevel=7
> use_win_metachars=1
> command[process_restart]=cscript //nologo c:\process_restart.vbs $ARG1$
>
>
> On the Nagios server I try out this:
>
> ./check_nrpe -H server.domain -c process_restart -a vbProgram.exe
>
>
> At this point on the Windows server a process vbProgram.exe is visible
> from
> the task manager but no windows are displayed.
> Moreover the process cannot be killed from the task manager ("Access
> Denied"
> message is returned).
> In nrpe_nt.log I can see this line:
>
> 2008-06-19 16:06:02; 5488; 7;Command completed with return code 0
>
> which, I think, indicates that the command completed successfully.
>
> How can I make the program visible on desktop?
> Am I missing something?
> Is at least possible to do what I'm trying to do?
>
> Emiliano
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php_______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list