Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu May 23, 2019 8:01 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 159 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11  Next
Author Message
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Thu Oct 14, 2010 4:15 pm 
Offline

Joined: Thu Jun 15, 2006 11:36 am
Posts: 48
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 1069 times
Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Mon Oct 25, 2010 2:17 am 
Offline

Joined: Thu Oct 21, 2010 6:55 pm
Posts: 4
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.


Attachments:
services.rar [9.28 KiB]
Downloaded 1209 times
File comment: Graphic
Untitled-2.jpg
Untitled-2.jpg [ 36.03 KiB | Viewed 4735 times ]
File comment: 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
Untitled-1.jpg [ 73.42 KiB | Viewed 4735 times ]
Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Thu Oct 28, 2010 3:13 pm 
Offline

Joined: Wed Aug 04, 2010 2:35 pm
Posts: 5
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
ScreenShot203.gif [ 15.71 KiB | Viewed 4718 times ]
Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Thu Oct 28, 2010 7:29 pm 
Offline

Joined: Thu Oct 21, 2010 6:55 pm
Posts: 4
I don't understand, why in Your picture is some numbers exist - no any numbers must be - only words.


Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Mon Nov 01, 2010 8:58 am 
Offline

Joined: Wed Aug 04, 2010 2:35 pm
Posts: 5
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


Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Fri Nov 05, 2010 2:00 pm 
Offline

Joined: Fri Nov 05, 2010 1:50 pm
Posts: 2
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


Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Fri Nov 05, 2010 2:13 pm 
Offline

Joined: Fri Nov 05, 2010 1:50 pm
Posts: 2
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


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.


Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Tue Jan 11, 2011 5:40 am 
Offline

Joined: Fri Jan 07, 2011 3:41 am
Posts: 4
great :D thanks a lot


Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Tue Mar 08, 2011 5:37 am 
Offline

Joined: Tue Jan 11, 2011 5:28 am
Posts: 18
How to add the service to threshold. So it can trigger me when a service is down.


Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Mon Mar 21, 2011 4:02 pm 
Offline

Joined: Mon Dec 06, 2010 10:09 am
Posts: 19
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!


Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Thu Apr 07, 2011 9:47 am 
Offline
User avatar

Joined: Thu Apr 07, 2011 4:39 am
Posts: 3
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!

_________________
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


Top
 Profile  
 
 Post subject: Re:
PostPosted: Mon Apr 25, 2011 9:54 pm 
Offline

Joined: Mon Apr 25, 2011 7:38 pm
Posts: 21
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.


It seems that it does not work in Cacti 0.8.7e.


Top
 Profile  
 
 Post subject: Re:
PostPosted: Mon Apr 25, 2011 10:04 pm 
Offline

Joined: Mon Apr 25, 2011 7:38 pm
Posts: 21
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.

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.


Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Wed Apr 27, 2011 9:05 am 
Offline

Joined: Wed Apr 27, 2011 8:56 am
Posts: 1
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.


Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Fri Apr 29, 2011 2:26 am 
Offline
User avatar

Joined: Thu Apr 07, 2011 4:39 am
Posts: 3
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.


Attachments:
data_template.jpg
data_template.jpg [ 103.6 KiB | Viewed 4044 times ]
graph1.jpg
graph1.jpg [ 22.28 KiB | Viewed 4044 times ]
graph2.jpg
graph2.jpg [ 22.96 KiB | Viewed 4044 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
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 159 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group