Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun Nov 19, 2017 9:29 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 157 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11
Author Message
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Mon Jul 15, 2013 9:45 pm 
Offline

Joined: Mon Jul 15, 2013 9:24 pm
Posts: 2
I have another problem, cacti A (CentOS 6.3 x64 + Cacti 0.8.8a ), it seems missing some MIBS

/usr/bin/php -q /var/www/cacti/scripts/win_services.php compuerFQDN public 2 2 index

it will get

19.101.114
14.118.101.114
16.108.111.103.111.110

But on another cacti B (CactiEZ 0.8.8a)

it returns
5.80.111.119.101.114
6.83.101.114.118.101.114
8.78.101.116.108.111.103.111.110

the red part missing on Cacti A, this caused it get status failed

[[email protected] ~]# /usr/bin/php -q /var/www/cacti/scripts/win_services.php serverFQDN public 2 2 get servstate 19.101.114
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: .1.3.6.1.4.1.77.1.2.3.1.2.19.101.114

0[[email protected] ~]# /usr/bin/php -q /var/www/cacti/scripts/win_services.php serverFQDN public 2 2 get servstate 5.80.111.119.101.114
1[[email protected] ~]#

I compare the /usr/bin/php win_services.php winservices.xml /etc/php.ini /include/config.php /include/global.php
they are same,


is there anyone can help me? Thanks a log


Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Thu Aug 15, 2013 1:22 pm 
Offline

Joined: Thu Aug 15, 2013 1:20 pm
Posts: 2
I also need assistance, I have the graphs formed and represented and nothing is showing up. When I use the realtime plugin though to view my graphs I get a result with an active state and it graphs, any explanation for this?


Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Fri Jan 31, 2014 3:51 pm 
Offline

Joined: Tue Jul 23, 2013 2:02 pm
Posts: 9
on latest release of CactiEZ (0.8.8A), I tried everything in this thread and tried using values 35,25 and 37,27 (currently using 35 and 25) but both give me the same result when I run:

Code:
[[email protected] scripts]# php -q win_services.php 172.16.250.250 public 2 2 index
PHP Parse error:  syntax error, unexpected ':' in /var/www/html/scripts/win_services.php on line 65

Parse error: syntax error, unexpected ':' in /var/www/html/scripts/win_services.php on line 65


Line 65 is just a } How can I fix this? Currently I am getting a blank graph (results showing are -nan).


Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Wed Jan 21, 2015 9:11 pm 
Offline

Joined: Mon Jul 15, 2013 9:24 pm
Posts: 2
Finally, I change the php file
change the red part from 36 to 26 and it works.

/var/www/cacti/scripts/win_services.php

if (substr($return_arr[$i]['oid'],0,2) != "1.")
print substr($return_arr[$i]['oid'],26) . "\n";
else


Top
 Profile  
 
 Post subject: Re:
PostPosted: Thu Aug 10, 2017 4:44 am 
Offline
User avatar

Joined: Wed Sep 21, 2016 8:38 pm
Posts: 15
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.


I got this error message: (How to fix it? )

Data Query Debug Information
+ Running data query [10].
+ Found type = '6' [Script Query - Script Server].
+ Found data query XML file at 'D:/wamp/www/cacti/resource/script_server/win_services.xml'
+ XML file parsed ok.
+ <arg_num_indexes> missing in XML file, 'Index Count Changed' not supported
+ Executing script for list of indexes '"D:\wamp\bin\php\php5.4.12\php.exe" -q D:\wamp\www\cacti\scripts\win_services.php mon-srv01 public 2 2 index' Index Count: 9
+ Found index:
+ Found index: Fatal error: Call to undefined function read_config_option() in D:\wamp\www\cacti\lib\snmp.php on line 267
+ Found index:
+ Found index: Call Stack:
+ Found index: 0.0003 255376 1. {main}() D:\wamp\www\cacti\scripts\win_services.php:0
+ Found index: 0.0014 437392 2. call_user_func_array() D:\wamp\www\cacti\scripts\win_services.php:13
+ Found index: 0.0014 438056 3. win_services() D:\wamp\www\cacti\scripts\win_services.php:13
+ Found index: 0.0015 439336 4. cacti_snmp_walk() D:\wamp\www\cacti\scripts\win_services.php:24
+ Found index:
+ Executing script query '"D:\wamp\bin\php\php5.4.12\php.exe" -q D:\wamp\www\cacti\scripts\win_services.php mon-srv01 public 2 2 query index'

_________________
Thanks,
Michael


Top
 Profile  
 
 Post subject: Re: Re:
PostPosted: Thu Aug 10, 2017 8:20 pm 
Offline
User avatar

Joined: Wed Sep 21, 2016 8:38 pm
Posts: 15
michaelcheung wrote:
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.


I got this error message: (How to fix it? )

Data Query Debug Information
+ Running data query [10].
+ Found type = '6' [Script Query - Script Server].
+ Found data query XML file at 'D:/wamp/www/cacti/resource/script_server/win_services.xml'
+ XML file parsed ok.
+ <arg_num_indexes> missing in XML file, 'Index Count Changed' not supported
+ Executing script for list of indexes '"D:\wamp\bin\php\php5.4.12\php.exe" -q D:\wamp\www\cacti\scripts\win_services.php mon-srv01 public 2 2 index' Index Count: 9
+ Found index:
+ Found index: Fatal error: Call to undefined function read_config_option() in D:\wamp\www\cacti\lib\snmp.php on line 267
+ Found index:
+ Found index: Call Stack:
+ Found index: 0.0003 255376 1. {main}() D:\wamp\www\cacti\scripts\win_services.php:0
+ Found index: 0.0014 437392 2. call_user_func_array() D:\wamp\www\cacti\scripts\win_services.php:13
+ Found index: 0.0014 438056 3. win_services() D:\wamp\www\cacti\scripts\win_services.php:13
+ Found index: 0.0015 439336 4. cacti_snmp_walk() D:\wamp\www\cacti\scripts\win_services.php:24
+ Found index:
+ Executing script query '"D:\wamp\bin\php\php5.4.12\php.exe" -q D:\wamp\www\cacti\scripts\win_services.php mon-srv01 public 2 2 query index'


I am using cacti-0.8.8h , any available scripts for it?

_________________
Thanks,
Michael


Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Mon Nov 13, 2017 11:53 am 
Offline

Joined: Thu Aug 02, 2012 2:11 pm
Posts: 4
Is there an updated version of Windows Service stats template for Cacti version 1.1.26?

Thank you in advance,
Mark


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 157 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 7 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