Re: [Nagios-users] How to monitor Windows Scheduled Tasks?

2009-06-30 Thread M. Sébastien LELIEVRE
Natxo Asenjo a écrit :
 hi,
 
 at work I have written a very simple perl script that parses the
 output of the windows command schtasks /query. I let it execute thru
 nrpe in the windows servers (win2k3 std) that have scheduled jobs.
 
 It is a very simple script and it works for us. It requires a perl
 installation in the windows servers, but if one can install .Net, why
 not perl ? :-)
 


I am also interested in that script :-)

Thank you very much for your Feedback!

Regards,
-- 
M. Sébastien LELIÈVRE

Ingénieur Système  Base de Données

AZ Network
40, rue Ampère
61000 ALENÇON (ORNE)
FRANCE



--
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] How to monitor Windows Scheduled Tasks?

2009-06-30 Thread Natxo Asenjo
hi,

ok, but I do not have any time to support the script, it is supplied
'as is' without license or obligations on my part. I will not answer
any questions about why it is not working for you (in case it does not
work for you).


#!perl
use strict;
use warnings;
use diagnostics;

# first run schtasks /query /fo /list /v and dump everything to a file
open (JOBS, schtasks /query /fo list /v |) or die couldn't exec
schtasks: $!\n;

# Counters
my $count = 0;
my @count = ();

# parse file, if string Last Result is not 0 (success), croak
while (JOBS) {
if (/^Last Result:\s+(.*)$/) {
# count how many jobs there are, we'll use this later
$count++;

# By type
$count[$1]++;
}
}

close JOBS;

if ($count[1]) {
warn WARNING: problem with $count[1] scheduled jobs\n;
exit 1;
}

if ($count[0] == $count) {
warn OK: all scheduled tasks have run fine\n;
exit 0;
}
else {
# if there is something wrong, give unkonw and errolevel 3
warn UNKONWN: something else went wrong\n;
exit 3;
}

__END__
-- 
Groeten,
J.Asenjo

--
___
Nagios-users mailing list
Nagios-users@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


[Nagios-users] How to monitor Windows Scheduled Tasks?

2009-06-29 Thread M. Sébastien LELIEVRE
Greetings,

I saw that NSClient++ can do it with :
; Extremly early beta of a task-schedule checker
;CheckTaskSched.dll

How does it work?

Is there any other way to do this?

Best Regards,
-- 
M. Sébastien LELIÈVRE

Ingénieur Système  Base de Données

AZ Network
40, rue Ampère
61000 ALENÇON (ORNE)
FRANCE



--
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] How to monitor Windows Scheduled Tasks?

2009-06-29 Thread Rachel Steffen
Hi, 

 I saw that NSClient++ can do it with :
 ; Extremly early beta of a task-schedule checker ;CheckTaskSched.dll

 How does it work?

I don't use it because of the early beta warning but I found somthing 
interesting.
It's a collection of varios Windows checks...
http://sourceforge.net/projects/nagiosplugincol/

Try it, it works fine for me.

Regards
Steffen

--
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] How to monitor Windows Scheduled Tasks?

2009-06-29 Thread Natxo Asenjo
hi,

at work I have written a very simple perl script that parses the
output of the windows command schtasks /query. I let it execute thru
nrpe in the windows servers (win2k3 std) that have scheduled jobs.

It is a very simple script and it works for us. It requires a perl
installation in the windows servers, but if one can install .Net, why
not perl ? :-)

-- 
Groeten,
J.Asenjo

--
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] How to monitor Windows Scheduled Tasks?

2009-06-29 Thread Mathew Walker

Hrm, I bet you could even do a few things with a batch script.  I haven't 
flexed those muscles in awhile, but you would be surpised what can be done.

 

Would you care to share the script?  I would love to try it out in my test 
environment.

-- 
Mat W. - http://www.techadre.com


 
 Date: Mon, 29 Jun 2009 12:12:01 +0200
 From: natxo.ase...@gmail.com
 To: nagios-users@lists.sourceforge.net
 Subject: Re: [Nagios-users] How to monitor Windows Scheduled Tasks?
 
 hi,
 
 at work I have written a very simple perl script that parses the
 output of the windows command schtasks /query. I let it execute thru
 nrpe in the windows servers (win2k3 std) that have scheduled jobs.
 
 It is a very simple script and it works for us. It requires a perl
 installation in the windows servers, but if one can install .Net, why
 not perl ? :-)
 
 -- 
 Groeten,
 J.Asenjo
 
 --
 ___
 Nagios-users mailing list
 Nagios-users@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

_
Lauren found her dream laptop. Find the PC that’s right for you.
http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290--
___
Nagios-users mailing list
Nagios-users@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