Event handlers for handling Windows services

Erik N. Mullinix e!mullin at Confi-chek.com
Wed Sep 18 20:58:45 CEST 2002


This is an interesting concept Andy.
The ability to handle common failures within a service or system is
valuable to larger scale networks.
You can however within an active directory dc network use command line
on a remote system to start services such as IIS.  Take a look at the
Windows 2000 Active Directory Black Book by Adam Wood with Coriolis
Press (ISBN 1-57610-256-4).  This might give you the method you're
searching for without exposing your environment to the evils of security
failure and reduce the load or need of using FTP or allowing FTP access
to and from windows servers.  You will also get a lot more out of your
Nagios machine if you do not run FTP sessions.

Erik Mullinix

-----Original Message-----
From: Andy [mailto:andy at droidmcse.com] 
Sent: Wednesday, September 18, 2002 10:40 AM
To: nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] Event handlers for handling Windows services

I have another idea.  Probably exposes some security risks.....but
that's another discussion.

Have your service check on Nagios pipe some arguments out to a file and
then ftp them to a windows server.  From there, have a task scheduler
job run on windows with enough permissions to be able to use the params
in the ftp'd file to act on it.

I have been thinking about this and thought about this scenario.

Nagios checks a web server
Web server fails
Nagios executes a script that has $HOSTNAME$ $SERVICEDESC$
$SERVICESTATE$ $SERVICEATTEMPT$
In the script, it eventually runs it and all of the checks line up and
then the script would create a small text file with the hostname and the
service - probably a good idea to adjust this to be the actual line that
would start / stop the service (eg: netsvc IISADMIN \\hostname /stop)
Then have a script on the ftp server that is able to run that script.

Again, this leave open all kinds of holes for someone to arbitrarily
start and stop services....but you could throw in some text to act like
a password and also restrict ftp from certain hosts.  My intent is only
to show a way to pull this off.

Andy 

-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Carroll,
Jim P [Contractor]
Sent: Wednesday, September 18, 2002 11:15 AM
To: nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] Event handlers for handling Windows services

The question can be answered if you can answer the question, "Can you
start/stop Windows services from the command line?"  I think.

If you install Cygwin, you have the option of turning on an SSH daemon
service.  Once you get the proper authentication set up (most likely
using a
null passphrase), so long as you can access the start/stop command from
within the Cygwin environment (might require copying/linking the
authroitative Windows command), then I don't see why not.

If you try this approach, let us know how it works out.

jc

> -----Original Message-----
> From: Greg Vickers [mailto:g.vickers at qut.edu.au]
> Sent: Wednesday, September 18, 2002 2:46 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Event handlers for handling Windows services
> 
> 
> Hi all,
> I was wondering if there is a way to stop/start windows services from 
> linux? (i.e. event handlers with Nagios and Win2K servers)
> 
> TIA,
> 
> =================================
> Greg Vickers
> Computer Systems Officer
> Student Support and Systems
> Teaching and Learning Support Systems, QUT
> Kelvin Grove Campus, CRICOS No 00213J
> 
> Ph: 07 3864 8276 Fax: 07 3864 5425
> Mob: 0416 001 674 SD: x6147
> 
> 
> 
> -------------------------------------------------------
> This SF.NET email is sponsored by: AMD - Your access to the experts
> on Hammer Technology! Open Source & Linux Developers, register now
> for the AMD Developer Symposium. Code: EX8664
> http://www.developwithamd.com/developerlab
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> 


-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users



-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users


-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab




More information about the Users mailing list