Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Tue May 21, 2019 7:48 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 159 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11  Next
Author Message
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Sun Nov 13, 2011 5:15 am 
Offline

Joined: Fri Feb 27, 2009 9:02 am
Posts: 5
Why all services i have green (Active)? When i stopped Windows Update Service i have green alltime. hmm help please.

Image


Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Mon Nov 14, 2011 3:17 am 
Offline
User avatar

Joined: Thu Apr 07, 2011 4:39 am
Posts: 3
Maybe services which you're stopping don't belong to graphs above.
I suggest you test with print spooler, help &techincal service or windows audio.
Additionally, you can check real state using snmpwalk.

_________________
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: Monitor Windows Service stats from Linux
PostPosted: Tue Nov 22, 2011 2:47 pm 
Offline

Joined: Tue Nov 08, 2011 10:31 am
Posts: 6
Hello,

I used files from cigamit's zip file on page 6. Running Cacti 0.8.7h. Templates imported succesfully. But when i add data query to the host and run verbose Query for Win Services i get following Data Query Debug Information and no Items are added in Status column:

+ Running data query [15].
+ Found type = '6' [Script Query - Script Server].
+ Found data query XML file at '/var/www/html/cacti-0.8.7h/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 '"/usr/bin/php" -q /var/www/html/cacti-0.8.7h/scripts/win_services.php servername 2:161:900:public:::::: index' Index Count: 0
+ Executing script query '"/usr/bin/php" -q /var/www/html/cacti-0.8.7h/scripts/win_services.php servername 2:161:900:public:::::: query index'

Please let me know if i can provide more information to get this issue resolved.


Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Wed Nov 23, 2011 5:36 pm 
Offline

Joined: Tue Nov 08, 2011 10:31 am
Posts: 6
Hello,
Tried to use files from igorx1972 services.rar file at page#9. At this time Verbose Query returns the information below and no Items in Status column:

+ Running data query [15].
+ Found type = '6' [Script Query - Script Server].
+ Found data query XML file at '/var/www/html/cacti-0.8.7h/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 '"/usr/bin/php" -q /var/www/html/cacti-0.8.7h/scripts/win_services.php servername 2:161:900:public:::::: index' Index Count: 2
+ Found index: ERROR: Invalid Parameters
+ Found index:
+ Executing script query '"/usr/bin/php" -q /var/www/html/cacti-0.8.7h/scripts/win_services.php servername 2:161:900:public:::::: query index'


At the same moment in /etc/httpd/logs/error_log following is logged:

[color=#800080]PHP Warning: Missing argument 2 for win_services() in /var/www/html/cacti-0.8.7h/scripts/win_services.php on line 16
PHP Warning: Missing argument 3 for win_services() in /var/www/html/cacti-0.8.7h/scripts/win_services.php on line 16
PHP Notice: Undefined variable: snmp_auth in /var/www/html/cacti-0.8.7h/scripts/win_services.php on line 31
PHP Notice: Undefined offset: 1 in /var/www/html/cacti-0.8.7h/scripts/win_services.php on line 33
PHP Notice: Undefined offset: 2 in /var/www/html/cacti-0.8.7h/scripts/win_services.php on line 34
PHP Notice: Undefined offset: 3 in /var/www/html/cacti-0.8.7h/scripts/win_services.php on line 52
sh: line 1: 2:161:900:public::::::: command not found


I'm running 0.8.7h. Please advise which way this issue can be fixed.


Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Wed Nov 23, 2011 5:54 pm 
Offline

Joined: Tue Nov 08, 2011 10:31 am
Posts: 6
Running following command manually returns a long list of paramaters without any error:

"/usr/bin/php" -q /var/www/html/cacti-0.8.7h/scripts/win_services.php servername 2:161:900:public:::::: index

What does this mean that i can run command from CLI and get a result but running a verbose query from Device Settings page returns me:

+ Found index: ERROR: Invalid Parameters

Please let me know what additional steps can be done to troubleshoout this issue and get it fixed.


Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Wed Nov 23, 2011 8:37 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14804
Location: MI, USA
There are/were some bugs in H on Windows servers. I prefer to use HMIB to track application use.

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.


Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Fri Nov 25, 2011 9:18 am 
Offline

Joined: Tue Nov 08, 2011 10:31 am
Posts: 6
Thank you TheWitness for your reply. Having this Template working is one of the requirement for using Manage plugin to work. So there is no way for me to get fully functional Manage plugin on 0.8.7h in this case?


Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Fri Nov 25, 2011 9:39 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14804
Location: MI, USA
Well, seek out Gilles as he owns Manage. All the service/process information is available from HMIB. He might find it so useful that he does a major update to his Manage plugin.

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.


Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Fri Nov 25, 2011 9:51 am 
Offline

Joined: Tue Nov 08, 2011 10:31 am
Posts: 6
OK, thank you. Will make a post in his "Manage Plugin 0.6.2 for monitoring networks, servers..." topic. Hopefully he has time to make this change.


Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Tue Mar 20, 2012 11:12 am 
Offline
Cacti User

Joined: Thu Apr 10, 2008 6:52 pm
Posts: 141
a moderator of these forums really needs to delete the attachment on page1 and add a note to see page 6 for the download. or some action to prevent confusion with two attachments 5 pages apart.


Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Wed Mar 21, 2012 12:41 pm 
Offline
Cacti User

Joined: Thu Apr 10, 2008 6:52 pm
Posts: 141
I thought I posted this file yesterday, but it must not have gone through


here is the win_services.php file I am using. It has the substring bug fixed (26 => 25 and 36 =>35) and the index command will show items in alphabetical order.


Attachments:
File comment: replace the other one.
win_services.php.txt [4.05 KiB]
Downloaded 994 times
Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Tue Aug 28, 2012 2:40 am 
Offline

Joined: Mon Mar 26, 2012 1:27 pm
Posts: 37
Hello to all.
I has a little problem with this script. Becouse my windows is not english, I get names of services in this way (url encode):

Code:
D0:96:D1:83:D1:80:D0:BD:D0:B0:D0:BB:20:D1:81:D0:BE:D0:B1:D1:8B:D1:82:D0:B8:D0:B9   
D0:A0:D0:B0:D0:B1:D0:BE:D1:87:D0:B0:D1:8F:20:D1:81:D1:82:D0:B0:D0:BD:D1:86:D0:B8:D1:8F   
D0:A1:D0:BB:D1:83:D0:B6:D0:B1:D0:B0:20:D1:81:D0:BE:D0:BE:D0:B1:D1:89:D0:B5:D0:BD:D0:B8:D0:B9   
D0:A3:D0:B4:D0:B0:D0:BB:D0:B5:D0:BD:D0:BD:D1:8B:D0:B9:20:D1:80:D0:B5:D0:B5:D1:81:D1:82:D1:80   
D0:A1:D0:BB:D1:83:D0:B6:D0:B1:D1:8B:20:D1:82:D0:B5:D1:80:D0:BC:D0:B8:D0:BD:D0:B0:D0:BB:D0:BE:D0:B2   
D0:A1:D0:B8:D1:81:D1:82:D0:B5:D0:BC:D0:B0:20:D1:81:D0:BE:D0:B1:D1:8B:D1:82:D0:B8:D0:B9:20:43:4F:4D:2B


Can someone say what to write in php script to make changes in servise names:
1. Change ":" symbols to "%"
2. Make URL decode


Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Thu Apr 04, 2013 12:43 pm 
Offline

Joined: Thu Apr 04, 2013 12:35 pm
Posts: 2
AllertGen wrote:
Hello to all.
I has a little problem with this script. Becouse my windows is not english, I get names of services in this way (url encode):

Code:
D0:96:D1:83:D1:80:D0:BD:D0:B0:D0:BB:20:D1:81:D0:BE:D0:B1:D1:8B:D1:82:D0:B8:D0:B9   
D0:A0:D0:B0:D0:B1:D0:BE:D1:87:D0:B0:D1:8F:20:D1:81:D1:82:D0:B0:D0:BD:D1:86:D0:B8:D1:8F   
D0:A1:D0:BB:D1:83:D0:B6:D0:B1:D0:B0:20:D1:81:D0:BE:D0:BE:D0:B1:D1:89:D0:B5:D0:BD:D0:B8:D0:B9   
D0:A3:D0:B4:D0:B0:D0:BB:D0:B5:D0:BD:D0:BD:D1:8B:D0:B9:20:D1:80:D0:B5:D0:B5:D1:81:D1:82:D1:80   
D0:A1:D0:BB:D1:83:D0:B6:D0:B1:D1:8B:20:D1:82:D0:B5:D1:80:D0:BC:D0:B8:D0:BD:D0:B0:D0:BB:D0:BE:D0:B2   
D0:A1:D0:B8:D1:81:D1:82:D0:B5:D0:BC:D0:B0:20:D1:81:D0:BE:D0:B1:D1:8B:D1:82:D0:B8:D0:B9:20:43:4F:4D:2B


Can someone say what to write in php script to make changes in servise names:
1. Change ":" symbols to "%"
2. Make URL decode


I fixed your and my problem. :wink:
Change the line 80 in win_services.php from
Code:
print $arr_index2[$i] . " !" . $arr[$i] . "\n";

to
Code:
if (strpos($arr[$i], ":") > 0){
print $arr_index2[$i] . " !" . urldecode(str_replace(":", "%", "%" . $arr[$i])) . "\n";
}
else{
print $arr_index2[$i] . " !" . $arr[$i] . "\n";
}

or use the attached file.


Attachments:
File comment: fixed for german windows version
win_services.php.txt [4.25 KiB]
Downloaded 315 times


Last edited by SeSchi77 on Fri Apr 05, 2013 3:44 pm, edited 1 time in total.
Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Fri Apr 05, 2013 1:07 pm 
Offline

Joined: Thu Apr 04, 2013 12:35 pm
Posts: 2
Hello I found an other error in the win_services.php.
On query and query index part return is the substring of the oid to long.
I changed it from:

Code:
for ($i=0; $i < sizeof($return_arr); $i++) {
     if (substr($return_arr[$i]['oid'],0,4) == "SNMP")
                       print substr($return_arr[$i]['oid'],35) . "\n";
     else
                       print substr($return_arr[$i]['oid'],25) . "\n";
}


to

Code:
for ($i=0; $i < sizeof($return_arr); $i++) {
          if (substr($return_arr[$i]['oid'],0,4) == "SNMP")
                            print substr($return_arr[$i]['oid'], 37) . "\n";
          else
                            print substr($return_arr[$i]['oid'], 27) . "\n";
}


I fixed it and now my services shows the correct state.
This works fine for german windows server. Other language version not tested yet.


Attachments:
File comment: substring oid to long fixed
for german windows version

win_services.php.txt [4.72 KiB]
Downloaded 518 times
Top
 Profile  
 
 Post subject: Re: Monitor Windows Service stats from Linux
PostPosted: Mon Jul 15, 2013 5:27 pm 
Offline

Joined: Mon Jul 15, 2013 9:27 am
Posts: 1
hello,

I am using 0.8.8a cati, I need to monitor windows services, I modified the php file win_service.php but can not see services.

Please help.

thanks


Attachments:
servicios.JPG
servicios.JPG [ 104.61 KiB | Viewed 12870 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 159 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11  Next

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