Windows Services

Addons for Cacti and discussion about those addons

Moderators: Developers, Moderators

simonmag
Posts: 6
Joined: Mon Jul 25, 2005 4:09 am
Contact:

Windows Services

Post by simonmag »

Is there a way with Cacti that you can monitor Windows services to see when a service stops that you can be notified?

Simon.
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Windows Services

Post by cigamit »

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.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

I've written a script that lets you monitor any process running on a windows host. The link is in my signature.
kevinsonney
Posts: 4
Joined: Mon Aug 29, 2005 1:23 pm

Post by kevinsonney »

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
blackakashi
Posts: 11
Joined: Mon Feb 13, 2006 7:51 am

Post by blackakashi »

Hello!

Did you fix it ?

I would like to help, but i don't know where to start ?! :D

Greetings
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

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.
imthemp3king
Posts: 27
Joined: Fri Jul 30, 2004 2:38 pm

Post by imthemp3king »

Cigamit,

Is your site currently down, I am having trouble getting to it. Getting a 504 Gateway Timed Out
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

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!)
blackakashi
Posts: 11
Joined: Mon Feb 13, 2006 7:51 am

Post by blackakashi »

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.
Attachments
Error Capture
Error Capture
snap034.png (6.68 KiB) Viewed 16655 times
anuraganuj
Cacti User
Posts: 70
Joined: Tue Feb 21, 2006 9:50 am

Win service returning -1 for running process

Post by anuraganuj »

i have one critical process being graphed with u r template but it is returning -1 for that process.pls help
User avatar
N3NCY
Cacti User
Posts: 260
Joined: Thu Sep 22, 2005 7:50 pm
Location: Landenberg, PA
Contact:

Post by N3NCY »

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...
Thank you,

Ernie
http://www.NMSWorld.com
[b]Dual Zeon Dual Core 2.6Ghz / 8GB RAM / 4x15k RPM SATA RAID5[/b]
[b]Cacti Version[/b] - 0.8.7b
[b]Poller Type[/b] - cactid 0.8.7 with Boost v1.7
[b]Server Info[/b] - FreeBSD 7.0-RELEASE
[b]Web Server[/b] - Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8g DAV/2 PHP/5.2.5 mod_perl/2.0.3 Perl/v5.8.8
[b]PHP[/b] - 5.2.6
[b]MySQL[/b] - 5.0.51b Mod: poller_output ENGINE = MEMORY
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.4.1
[b]Plugins[/b] - Host Info (hostinfo - v0.2), Update Checker (update - v0.3), Network Tools (tools - v0.2), FlowView (flowview - v0.3), Read-only Devices Tab (devices - v0.4), Network Discovery (discovery - v0.8.3), Syslog Monitoring (syslog - v0.5.2), Thresholds (thold - v0.3.9), Device Monitoring (monitor - v0.8.2), PHP Network Weathermap (weathermap - v0.941), SuperLinks (superlinks - v0.72), Report Creator (reports - v0.1b)
anuraganuj
Cacti User
Posts: 70
Joined: Tue Feb 21, 2006 9:50 am

running Process retruns 0

Post by anuraganuj »

Hi the running process after running of some time is returning 0 but i can see service running what cud be the problem.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

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
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

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.
Attachments
services.txt
(24.75 KiB) Downloaded 1057 times
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

Actually, I had already posted the script / templates a while back. You can find it here.

http://forums.cacti.net/viewtopic.php?t=11232
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests