|
|
| Author |
Message |
mrh Cacti User
Joined: 08 Mar 2005 Posts: 84
|
|
| Back to top |
|
 |
BSOD2600 Cacti Moderator
Joined: 08 May 2004 Posts: 6662 Location: WA, USA
|
Posted: Tue May 16, 2006 10:21 am Post subject: |
|
|
| Nice... you might want to post a few graphs of it too.
|
|
| Back to top |
|
 |
nitraat
Joined: 17 May 2006 Posts: 2
|
Posted: Wed May 17, 2006 7:46 am Post subject: No resutls in graph |
|
|
Hi, I added the template and i'm getting no results in my graph.
Is this the right input string: cscript <nologo> <path_cacti>/scripts/Win32_Services.vbs <hostname><servicename>
|
|
| Back to top |
|
 |
mrh Cacti User
Joined: 08 Mar 2005 Posts: 84
|
|
| Back to top |
|
 |
nitraat
Joined: 17 May 2006 Posts: 2
|
Posted: Mon May 22, 2006 12:38 pm Post subject: Re: No resutls in graph |
|
|
| nitraat wrote: | Hi, I added the template and i'm getting no results in my graph.
Is this the right input string: cscript <nologo> <path_cacti>/scripts/Win32_Services.vbs <hostname><servicename> |
Problem was a space was needed between hostname and servicename!
Works perfectly, even the alerting when it goes to 0.
Thanks!!
|
|
| Back to top |
|
 |
lex8009
Joined: 18 May 2006 Posts: 35
|
Posted: Tue May 23, 2006 11:21 pm Post subject: need help |
|
|
i've followed the instruction but it's not displaying the line on the graph and the service status shows NaN on the graph.
running the cscript command on the command line returns a -1 value.
C:\WINNT>cscript c:/inetpub/wwwroot/cacti/scripts/win32_services.vbs localhost W32Time
-1
Any idea is greatly appreciated.
|
|
| Back to top |
|
 |
mrh Cacti User
Joined: 08 Mar 2005 Posts: 84
|
Posted: Wed May 24, 2006 4:37 am Post subject: |
|
|
-1 is a good response! That means the service is running. Try to stop it and you'll get a 0 instead.
Also, make sure the data input method is this way: cscript <nologo> <path_cacti>/scripts/Win32_Services.vbs <hostname> <servicename>
I think the export I did is not fully working as is, so you need to change manually the <> characters. Nevertheless I post another export again (find enclosed).
Cheers
| Description: |
|
 Download |
| Filename: |
cacti_graph_template_win32_services.xml |
| Filesize: |
8.59 KB |
| Downloaded: |
1012 Time(s) |
|
|
| Back to top |
|
 |
lex8009
Joined: 18 May 2006 Posts: 35
|
Posted: Wed May 24, 2006 11:38 am Post subject: monitoring |
|
|
mrh, I re-imported the the script (thanks by the way), recreated the graph setting in the device profile and saved it. The service is running on the server, got a -1 after running the script from the command line.
it creates the graph, but no line. also on the graph, the service state shows 0.
|
|
| Back to top |
|
 |
lex8009
Joined: 18 May 2006 Posts: 35
|
Posted: Wed May 24, 2006 5:07 pm Post subject: error in cmd |
|
|
seem that when it creates the cscript cmd, it combines the hostname and the service name (output from cacti.log file):
CMD: cscript //nologo C:/Inetpub/wwwroot/cacti/scripts/win_services.vbs localhostW32Time, output: U
even though in the xml template file, there's a space in between and i've added another space, so there's actually 2 spaces.
<input_string>cscript //nologo <path_cacti>/scripts/win_services.vbs <hostname> <servicename></input_string>
|
|
| Back to top |
|
 |
mrh Cacti User
Joined: 08 Mar 2005 Posts: 84
|
Posted: Sun May 28, 2006 5:57 am Post subject: |
|
|
lex, change the lt and gt symbols for < and >, so your input method should keep this way:
cscript <nologo> <path_cacti>/scripts/Win32_Services.vbs <hostname> <servicename>
the problem is that //nologo variable cannot be put directly in the input method, so I needed to define an input variable <nologo> and associate to a fixed value (//nologo).
maybe my export is still wrong, but you should able to make it working by taking a glance to similar input methods in your cacti installation.
hope you get it working!
|
|
| Back to top |
|
 |
lex8009
Joined: 18 May 2006 Posts: 35
|
Posted: Sun May 28, 2006 8:47 pm Post subject: error in cmd |
|
|
| thanks, mrh. that did the trick
|
|
| Back to top |
|
 |
Mikeos
Joined: 07 Jun 2006 Posts: 9
|
Posted: Wed Jun 14, 2006 4:34 am Post subject: Windows Service Monitoring with WMI |
|
|
Could somebody please post how the correct string that should be used in the XML to add the necessary space, at the minute I've got:-
<input_string>cscript //nologo <path_cacti>/scripts/win_services.vbs <hostname> <servicename></input_string>
Is this correct ?
|
|
| Back to top |
|
 |
mrh Cacti User
Joined: 08 Mar 2005 Posts: 84
|
Posted: Thu Jun 15, 2006 3:29 am Post subject: |
|
|
< = <
> = >
This error happens many times when importing/exporting templates
|
|
| Back to top |
|
 |
mrh Cacti User
Joined: 08 Mar 2005 Posts: 84
|
Posted: Thu Jun 15, 2006 3:52 am Post subject: |
|
|
| ops, you also need to remove the ";"
|
|
| Back to top |
|
 |
Mikeos
Joined: 07 Jun 2006 Posts: 9
|
Posted: Thu Jun 15, 2006 8:09 am Post subject: |
|
|
mrh,
Thanks for the info although I'm still struggling could you post me an
example of the xml string that works ok for ?
Cheers
-Mike
|
|
| Back to top |
|
 |
|