|
|
| Author |
Message |
simonmag
Joined: 25 Jul 2005 Posts: 6
|
Posted: Fri Sep 23, 2005 6:46 am Post subject: Windows Services |
|
|
Is there a way with Cacti that you can monitor Windows services to see when a service stops that you can be notified?
Simon.
|
|
| Back to top |
|
 |
cigamit Developer
Joined: 07 Apr 2005 Posts: 978 Location: B/CS Texas
|
Posted: Fri Sep 23, 2005 8:53 am Post subject: Re: Windows Services |
|
|
| simonmag wrote: | Is there a way with Cacti that you can monitor Windows services to see when a service stops that you can be notified?
Simon. |
You can do something like this. Note that I had created this on Cacti v0.8.6c but it seems to work fine while importing in v0.8.6g on my test machine. Just place the php file in the scripts folder, and import the template.
This will give you a list of all services running on a host, and from there you can select which services you want to monitor. Its then easy enough to set thresholds for the services to alert you.
EDIT: Temporarily removed attachment until I can properly fix it.
Last edited by cigamit on Mon Oct 03, 2005 3:14 pm; edited 2 times in total |
|
| Back to top |
|
 |
BSOD2600 Cacti Moderator
Joined: 08 May 2004 Posts: 6876 Location: WA, USA
|
Posted: Fri Sep 23, 2005 9:14 pm Post subject: |
|
|
| I've written a script that lets you monitor any process running on a windows host. The link is in my signature.
|
|
| Back to top |
|
 |
kevinsonney
Joined: 29 Aug 2005 Posts: 4
|
Posted: Mon Sep 26, 2005 1:34 pm Post subject: |
|
|
I'm getting the following error when I run the data query for a Windows host:
+ Found data query XML file at '/var/opt/cacti/resource/script_server/win_services.xml'
+ Error parsing XML file into an array.
There currently isn't a file at the above location, should this be created after I import the template?
Thanks,
Kevin
|
|
| Back to top |
|
 |
blackakashi
Joined: 13 Feb 2006 Posts: 11
|
Posted: Mon Feb 13, 2006 8:51 am Post subject: |
|
|
Hello!
Did you fix it ?
I would like to help, but i don't know where to start ?!
Greetings
|
|
| Back to top |
|
 |
cigamit Developer
Joined: 07 Apr 2005 Posts: 978 Location: B/CS Texas
|
Posted: Mon Feb 13, 2006 10:03 am Post subject: |
|
|
| kevinsonney wrote: | I'm getting the following error when I run the data query for a Windows host:
+ Found data query XML file at '/var/opt/cacti/resource/script_server/win_services.xml'
+ Error parsing XML file into an array.
There currently isn't a file at the above location, should this be created after I import the template?
Thanks,
Kevin |
That file was included in the Zip, you have to place it there (the directory structure should be layed out for you.) There is also a script that you have to put in the proper place.
|
|
| Back to top |
|
 |
imthemp3king
Joined: 30 Jul 2004 Posts: 27
|
Posted: Mon Feb 13, 2006 10:27 am Post subject: |
|
|
Cigamit,
Is your site currently down, I am having trouble getting to it. Getting a 504 Gateway Timed Out
|
|
| Back to top |
|
 |
cigamit Developer
Joined: 07 Apr 2005 Posts: 978 Location: B/CS Texas
|
Posted: Mon Feb 13, 2006 10:35 am Post subject: |
|
|
| imthemp3king wrote: | Cigamit,
Is your site currently down, I am having trouble getting to it. Getting a 504 Gateway Timed Out |
Works for me, and has been the last few hours (trying to finish answer all the emails!)
|
|
| Back to top |
|
 |
blackakashi
Joined: 13 Feb 2006 Posts: 11
|
Posted: Wed Feb 15, 2006 6:32 am Post subject: |
|
|
Sorry but i have this error when i try to import the template :'(
I'm running Cacti 0.8.6h on Windows 2003 whith Mysql 4.1 and Apache 2.
| Description: |
|
| Filesize: |
6.68 KB |
| Viewed: |
7132 Time(s) |

|
|
|
| Back to top |
|
 |
anuraganuj Cacti User
Joined: 21 Feb 2006 Posts: 70
|
Posted: Wed Mar 08, 2006 1:37 am Post subject: Win service returning -1 for running process |
|
|
| i have one critical process being graphed with u r template but it is returning -1 for that process.pls help
|
|
| Back to top |
|
 |
N3NCY Cacti User
Joined: 22 Sep 2005 Posts: 242 Location: Landenberg, PA
|
Posted: Fri Mar 10, 2006 11:08 pm Post subject: |
|
|
blackakashi: Your import error is a setting in your php.ini file.
\WINNT\php.ini or wherever your is...
It has been a while since I had this error on Windows, so my memory is shaky, but one of these fixed that for me on Windows a while back:
error_reporting = e_error
session.bug_compat_warn = 0
safe_mode = off
magic_quotes_gpc = off
magic_quotes_runtime = off
magic_quotes_sybase = off
extension_dir = "c:\php\extensions"
extension=php_gd2.dll
One of the ones in bold if I am remembering correctly...
|
|
| Back to top |
|
 |
anuraganuj Cacti User
Joined: 21 Feb 2006 Posts: 70
|
Posted: Fri Mar 10, 2006 11:22 pm Post subject: running Process retruns 0 |
|
|
| Hi the running process after running of some time is returning 0 but i can see service running what cud be the problem.
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9736 Location: MI, USA
|
Posted: Sat Mar 11, 2006 9:08 am Post subject: |
|
|
Service monitoring is pretty difficult without a specific tweak to the XML file to remove the dependency on the uniqueness of the service name, for as you know, in Windoz, something like svchost.exe can appear multiple times.
I don't have the time to go into additional detail, but this is something for either nagios or THold.
TheWitness
|
|
| Back to top |
|
 |
cigamit Developer
Joined: 07 Apr 2005 Posts: 978 Location: B/CS Texas
|
Posted: Tue Mar 14, 2006 2:50 pm Post subject: |
|
|
| TheWitness wrote: | Service monitoring is pretty difficult without a specific tweak to the XML file to remove the dependency on the uniqueness of the service name, for as you know, in Windoz, something like svchost.exe can appear multiple times.
I don't have the time to go into additional detail, but this is something for either nagios or THold.
TheWitness |
You can monitor Windoz Services by the actual service name, instead of the executable name. I'll re-export my templates / scripts for version H and post it here. But for reference, here is an example SNMP walk of the relivant parts.
| Description: |
|
 Download |
| Filename: |
services.txt |
| Filesize: |
24.75 KB |
| Downloaded: |
452 Time(s) |
|
|
| Back to top |
|
 |
cigamit Developer
Joined: 07 Apr 2005 Posts: 978 Location: B/CS Texas
|
|
| Back to top |
|
 |
|