Monitor Windows Service stats from Linux
Moderators: Developers, Moderators
Re: Monitor Windows Service stats from Linux
For anyone who is interested I have attached fixed win_services.php and win_services.xml that works on my CentOS 4 Cacti 0.8.7g set up.
- Attachments
-
- win_services.tar.gz
- (1.48 KiB) Downloaded 1278 times
Re: Monitor Windows Service stats from Linux
Hi, guys!
This correct version of "windows service template". Thats, extended state display:
0- stopped, 1 - active, 2-continue-pending, 3 - pause-pending, 4 - paused
State display by color.
This correct version of "windows service template". Thats, extended state display:
0- stopped, 1 - active, 2-continue-pending, 3 - pause-pending, 4 - paused
State display by color.
- Attachments
-
- services.rar
- (9.28 KiB) Downloaded 1405 times
-
- Graphic
- Untitled-2.jpg (36.03 KiB) Viewed 8921 times
-
- Check the RRA function for LAST data collection. This prevent error: "the RRD does not contain an RRA matching the chosen CF". See topic: http://forums.cacti.net/viewtopic.php?f=21&t=3686&start=15 post of Gendalf
- Untitled-1.jpg (73.42 KiB) Viewed 8921 times
Re: Monitor Windows Service stats from Linux
I'm imported this template into my windows box, but all my graphs are showing red - no service. Did I miss something?
- Attachments
-
- ScreenShot203.gif (15.71 KiB) Viewed 8904 times
Re: Monitor Windows Service stats from Linux
I don't understand, why in Your picture is some numbers exist - no any numbers must be - only words.
Re: Monitor Windows Service stats from Linux
I could really use some help with this:
I'm running 8.7g on Windows
I'm imported your scripts and template, and the graphs above are what I get. Can you assist? I'll try to reimport and see what happens.
Using SNMP version 2
I'm running 8.7g on Windows
I'm imported your scripts and template, and the graphs above are what I get. Can you assist? I'll try to reimport and see what happens.
Using SNMP version 2
-
- Posts: 2
- Joined: Fri Nov 05, 2010 1:50 pm
Re: Monitor Windows Service stats from Linux
Hello everyone.
Good day!
I'm a newbie in Cacti and I would like to ask for assistance regarding this addon.
I installed the latest version of the add-on. Unfortunately, when I go to "New Graph", under Data Query of Win Services, I get this:
This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.
How can I fix this?
Thank you.
Best Regards,
Paul
Good day!
I'm a newbie in Cacti and I would like to ask for assistance regarding this addon.
I installed the latest version of the add-on. Unfortunately, when I go to "New Graph", under Data Query of Win Services, I get this:
This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.
How can I fix this?
Thank you.
Best Regards,
Paul
-
- Posts: 2
- Joined: Fri Nov 05, 2010 1:50 pm
Re: Monitor Windows Service stats from Linux
Found the reason why... the data input method should be "Get Script Server Data" instead of "Get SNMP Data" because the xml of win services is placed in script_server.paulgabion wrote:Hello everyone.
Good day!
I'm a newbie in Cacti and I would like to ask for assistance regarding this addon.
I installed the latest version of the add-on. Unfortunately, when I go to "New Graph", under Data Query of Win Services, I get this:
This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.
How can I fix this?
Thank you.
Best Regards,
Paul
-
- Posts: 4
- Joined: Fri Jan 07, 2011 3:41 am
Re: Monitor Windows Service stats from Linux
great thanks a lot
Re: Monitor Windows Service stats from Linux
How to add the service to threshold. So it can trigger me when a service is down.
Re: Monitor Windows Service stats from Linux
I download igorx1972 source files and installed things as usual. However, I was getting the same result as gbaity. I spent some time today getting this script working on my Cacti 8.7g+spine deployment. What I found was there in the win_services.php file there seems to be an error.
In the cacti log I saw it making the following request:
03/21/2011 03:20:09 PM - SPINE: Poller[0] Host[646] TH[1] DS[16045] SS[0] SERVER: /var/www/cacti/scripts/win_services.php win_services 10.0.0.53 2:161:500:public:::::: get servstate .9.69.118.101.110.116.32.76.111.103 , output: 0
Notice that the OID has a period at the start of the string. I decided to emulate this on the command line:
/var/log/cacti$ /usr/bin/php -q /var/www/cacti/scripts/win_services.php 10.0.0.53 2:161:500:public:::::: get servstate .9.69.118.101.110.116.32.76.111.103
.1.3.6.1.4.1.77.1.2.3.1.2..9.69.118.101.110.116.32.76.111.103: Unknown Object Identifier (Sub-id not found: enterprises -> .9.69.118.101.110.116.32.76.111.103)
0
The result was 0, fail! The script was barking about the OID not existing?! Odd... the script appended my OID to the base OID incorrectly. What I ended up with was:
.1.3.6.1.4.1.77.1.2.3.1.2..9.69.118.101.110.116.32.76.111.103
What I need is:
.1.3.6.1.4.1.77.1.2.3.1.2.9.69.118.101.110.116.32.76.111.103
In the /var/www/cacti/scripts/win_services.php file go down to line 85 and change this:
$x = trim(cacti_snmp_get($hostname, $snmp_community, $oids[$arg] . '.' . $index, $snmp_version, $snmp_auth_username, $snmp_auth_password, $snmp_auth_protocol, $snmp_p
riv_passphrase, $snmp_priv_protocol, $snmp_context, $snmp_port, $snmp_timeout, read_config_option("snmp_retries"), SNMP_POLLER));
to this:
$x = trim(cacti_snmp_get($hostname, $snmp_community, $oids[$arg] . '' . $index, $snmp_version, $snmp_auth_username, $snmp_auth_password, $snmp_auth_protocol, $snmp_p
riv_passphrase, $snmp_priv_protocol, $snmp_context, $snmp_port, $snmp_timeout, read_config_option("snmp_retries"), SNMP_POLLER));
What I did was change '.' to just ''
Everything now seems to work!
Keep up the good work!
In the cacti log I saw it making the following request:
03/21/2011 03:20:09 PM - SPINE: Poller[0] Host[646] TH[1] DS[16045] SS[0] SERVER: /var/www/cacti/scripts/win_services.php win_services 10.0.0.53 2:161:500:public:::::: get servstate .9.69.118.101.110.116.32.76.111.103 , output: 0
Notice that the OID has a period at the start of the string. I decided to emulate this on the command line:
/var/log/cacti$ /usr/bin/php -q /var/www/cacti/scripts/win_services.php 10.0.0.53 2:161:500:public:::::: get servstate .9.69.118.101.110.116.32.76.111.103
.1.3.6.1.4.1.77.1.2.3.1.2..9.69.118.101.110.116.32.76.111.103: Unknown Object Identifier (Sub-id not found: enterprises -> .9.69.118.101.110.116.32.76.111.103)
0
The result was 0, fail! The script was barking about the OID not existing?! Odd... the script appended my OID to the base OID incorrectly. What I ended up with was:
.1.3.6.1.4.1.77.1.2.3.1.2..9.69.118.101.110.116.32.76.111.103
What I need is:
.1.3.6.1.4.1.77.1.2.3.1.2.9.69.118.101.110.116.32.76.111.103
In the /var/www/cacti/scripts/win_services.php file go down to line 85 and change this:
$x = trim(cacti_snmp_get($hostname, $snmp_community, $oids[$arg] . '.' . $index, $snmp_version, $snmp_auth_username, $snmp_auth_password, $snmp_auth_protocol, $snmp_p
riv_passphrase, $snmp_priv_protocol, $snmp_context, $snmp_port, $snmp_timeout, read_config_option("snmp_retries"), SNMP_POLLER));
to this:
$x = trim(cacti_snmp_get($hostname, $snmp_community, $oids[$arg] . '' . $index, $snmp_version, $snmp_auth_username, $snmp_auth_password, $snmp_auth_protocol, $snmp_p
riv_passphrase, $snmp_priv_protocol, $snmp_context, $snmp_port, $snmp_timeout, read_config_option("snmp_retries"), SNMP_POLLER));
What I did was change '.' to just ''
Everything now seems to work!
Keep up the good work!
- fourhouses
- Posts: 3
- Joined: Thu Apr 07, 2011 4:39 am
Re: Monitor Windows Service stats from Linux
I'd like to thank everybody to develop all those features.
Just remark that using script posted by igorx1972, with 0.8.7g under CentOS5 it works fine (you must wait for a couple of minutes to generate graphs).
Cheers!
Just remark that using script posted by igorx1972, with 0.8.7g under CentOS5 it works fine (you must wait for a couple of minutes to generate graphs).
Cheers!
Cacti Version 0.8.7g; Cacti OS unix; SNMP Version NET-SNMP version: 5.3.2.2;
RRDTool Version RRDTool 1.4.x; Poller Information; Interval 300;
Type spine; Concurrent Processes 1; Max Threads 1; PHP Servers 1; Script Timeout 25; Max OID 10;
PHP Version 5.1.6; PHP OS Linux; PHP uname Linux 2.6.18-194.32.1.el5 #1 SMP Wed Jan 5 17:53:09 EST 2011 i686;
PHP SNMP Installed; max_execution_time 60; memory_limit 128M
RRDTool Version RRDTool 1.4.x; Poller Information; Interval 300;
Type spine; Concurrent Processes 1; Max Threads 1; PHP Servers 1; Script Timeout 25; Max OID 10;
PHP Version 5.1.6; PHP OS Linux; PHP uname Linux 2.6.18-194.32.1.el5 #1 SMP Wed Jan 5 17:53:09 EST 2011 i686;
PHP SNMP Installed; max_execution_time 60; memory_limit 128M
Re:
It seems that it does not work in Cacti 0.8.7e.cigamit wrote:Actually, here it is now. I had to do a few changes to it, since it was originally used for Cacti v0.8.6c (which is what our production server still runs, way too many modifications to upgrade at this time) but this was exported from v0.8.6i so you shouldn't have any issues with it.
If someone could verify that it works for them also, then I will go ahead and create some instructions for it.
Re:
Oh, excellent, I downloaded the previous service.zip version, so it does not work in v0.8.7e, after downloading this version, it works fine. Thanks for your wonderful stuff.cigamit wrote:You are going to find that a lot of your old scripts no longer work in v0.8.7, since instead of including config.php, you need to include global.php. Also, certain functions have changed and require more arguments to support SNMP v3.
Attached is a version that should work in v0.8.7.
Re: Monitor Windows Service stats from Linux
Sorry, i'm new in cacti and snmp. How can i monitor linux services or processes? A single service, for example a web service, not a count of all processes.
- fourhouses
- Posts: 3
- Joined: Thu Apr 07, 2011 4:39 am
Re: Monitor Windows Service stats from Linux
Hi,
although Win Service stats is working for me, I need your help:
It seems that RRD are overwritting old data with '0' value, because I loose previous data just in these kind of graphs (not in Latency, CPU, etc).
You can see that looking two attached graphs: they belong to the same server/service, but graph1 is 10 minutes older than graph2, and first one has more data.
I attach my data template screenshot.
Do you know why this behaviour?
Any tip will be appreciated
Thanks in advance.
although Win Service stats is working for me, I need your help:
It seems that RRD are overwritting old data with '0' value, because I loose previous data just in these kind of graphs (not in Latency, CPU, etc).
You can see that looking two attached graphs: they belong to the same server/service, but graph1 is 10 minutes older than graph2, and first one has more data.
I attach my data template screenshot.
Do you know why this behaviour?
Any tip will be appreciated
Thanks in advance.
- Attachments
-
- data_template.jpg (103.6 KiB) Viewed 8230 times
-
- graph1.jpg (22.28 KiB) Viewed 8230 times
-
- graph2.jpg (22.96 KiB) Viewed 8230 times
Cacti Version 0.8.7g; Cacti OS unix; SNMP Version NET-SNMP version: 5.3.2.2;
RRDTool Version RRDTool 1.4.x; Poller Information; Interval 300;
Type spine; Concurrent Processes 1; Max Threads 1; PHP Servers 1; Script Timeout 25; Max OID 10;
PHP Version 5.1.6; PHP OS Linux; PHP uname Linux 2.6.18-194.32.1.el5 #1 SMP Wed Jan 5 17:53:09 EST 2011 i686;
PHP SNMP Installed; max_execution_time 60; memory_limit 128M
RRDTool Version RRDTool 1.4.x; Poller Information; Interval 300;
Type spine; Concurrent Processes 1; Max Threads 1; PHP Servers 1; Script Timeout 25; Max OID 10;
PHP Version 5.1.6; PHP OS Linux; PHP uname Linux 2.6.18-194.32.1.el5 #1 SMP Wed Jan 5 17:53:09 EST 2011 i686;
PHP SNMP Installed; max_execution_time 60; memory_limit 128M
Who is online
Users browsing this forum: No registered users and 4 guests