At last - Windows Services monitoring with WMI!
Moderators: Developers, Moderators
Hi MRH,
Thanks for the last post, I checked my data input method and changed it to what you recommended. I can run the script from the command line without any problems. I turned debugging on for one poller cycle and saw this in the output debug:-
CMD: cscript //nologo C:/Inetpub/wwwroot/cacti/scripts/win_services.vbs localhostW32Time, output: U
Looks like its not adding a space between the server and service its trying to query. Im my data input method there is a space (checked and re-checked). Is it the markup on the XML file that is the issue now ?
Thanks for your help so far....
Cheers
-Mike
Thanks for the last post, I checked my data input method and changed it to what you recommended. I can run the script from the command line without any problems. I turned debugging on for one poller cycle and saw this in the output debug:-
CMD: cscript //nologo C:/Inetpub/wwwroot/cacti/scripts/win_services.vbs localhostW32Time, output: U
Looks like its not adding a space between the server and service its trying to query. Im my data input method there is a space (checked and re-checked). Is it the markup on the XML file that is the issue now ?
Thanks for your help so far....
Cheers
-Mike
Strange... the space should be there. Anyway, have you checked that the scheduled task for the poller is being run with a privileged user?
Try to run from the cmd line with the scheduled task user... if working then try to re-check once more for that space - bear in mind that if you add the space on the data input method, it probably won't be refreshed on the data template or data source... check!
Try to run from the cmd line with the scheduled task user... if working then try to re-check once more for that space - bear in mind that if you add the space on the data input method, it probably won't be refreshed on the data template or data source... check!
mrh | cacti 0.8.6h | plugin architecture | thold | monitor | iis6
I think I found the problem. The cscript appears not be working always with the //nologo option, so my recommendation is: open a shell cmd with your poller scheduled user and run: "cscript //nologo /S" - this will save the //nologo for future cscript uses with that user on your cacti machine - let me know the results
mrh | cacti 0.8.6h | plugin architecture | thold | monitor | iis6
No Data in Graph
Hello, i have read the hole Topic, so far. I have import the Scritp frot Site 2
an ther is an error. I dont now how to fix it.
Pleas HELP me.
an ther is an error. I dont now how to fix it.
Pleas HELP me.
- Attachments
-
- import_error.jpg (32.15 KiB) Viewed 14160 times
Please don't take this the wrong way as I don't mean this to be rude but why is this monitoring services with WMI "at last"? Have people had issues doing this... just interested?
I started writing a generic framework for pulling WMI based data into Cacti but I got bored with it because it was easier to just knock up a script for whatever WMI data I needed. It's all really easy to do (well, relatively) so I suppose I could try to write something up if enough people really want soething like this.Is there any tutorial on how to use Cacti with WMI monitoring?
I'm really interested by your script +1I started writing a generic framework for pulling WMI based data into Cacti but I got bored with it because it was easier to just knock up a script for whatever WMI data I needed. It's all really easy to do (well, relatively) so I suppose I could try to write something up if enough people really want soething like this.
I have the same problem ..... if someone have the solutionrodesian
Hello, i have read the hole Topic, so far. I have import the Scritp frot Site 2
an ther is an error. I dont now how to fix it.
Pleas HELP me.
Hi there,
I've never got any problem when exporting importing this template, however always some corrections are always required in my case, like chaning gt with < or adding spaces between ">" and "<".
Please find attached the exported template in plain text so you can copy and paste into the cacti text box (better for me than .xml files)
HAVE LUCK!
I've never got any problem when exporting importing this template, however always some corrections are always required in my case, like chaning gt with < or adding spaces between ">" and "<".
Please find attached the exported template in plain text so you can copy and paste into the cacti text box (better for me than .xml files)
HAVE LUCK!
- Attachments
-
- win32_services.txt
- (8.09 KiB) Downloaded 1353 times
mrh | cacti 0.8.6h | plugin architecture | thold | monitor | iis6
Still problems..
Hi,
I have been asked to investigate how to use WMI with cacti, in particular would like to monitor SQL Server..
I am a complete novice with cacti and WMI so please be patient with me!
Essentially I have downloaded the file from the forum "cacti_graph_template_win32_services_137.xml" then I have tried to import it.. and received the 3 errors as mentioned before "unmet dependencies". (See output below).
My confusion is I can run the following command with output: -1
cscript ./win32_services.vbs localhost W32Time HOWEVER
1. How does the above script relate to the XML file imported? (Two different query's yeah?
2. How do I use the smaller vbs script (win32_services.vbs) to create a graph in cacti?
3. The 3 unmet dependencies with the XML file whilst importing is an error.. if yes, how to fix it?
Keeping in mind I would like to ultimately monitor SQL Server via WMI any advice would be *greatly* appreciated.
Thanks
Sam
**** Import Output *****
GPRINT Preset
[success] Normal [update]
[success] Exact Numbers [update]
Data Input Method
[success] Win32 Services [update]
Data Template
[success] Win32 Services [update]
+ Found Dependency: (Data Input Method) Win32 Services
+ Found Dependency: (Data Input Field) ServiceState
+ Unmet Dependency: (Data Input Field) Output Type ID
+ Unmet Dependency: (Data Input Field) Index Value
+ Unmet Dependency: (Data Input Field) Index Type
+ Found Dependency: (Data Input Field) Hostname
+ Found Dependency: (Data Input Field) ServiceName
+ Found Dependency: (Data Input Field) NoLogo
Graph Template
[success] Win32 Services [update]
I have been asked to investigate how to use WMI with cacti, in particular would like to monitor SQL Server..
I am a complete novice with cacti and WMI so please be patient with me!
Essentially I have downloaded the file from the forum "cacti_graph_template_win32_services_137.xml" then I have tried to import it.. and received the 3 errors as mentioned before "unmet dependencies". (See output below).
My confusion is I can run the following command with output: -1
cscript ./win32_services.vbs localhost W32Time HOWEVER
1. How does the above script relate to the XML file imported? (Two different query's yeah?
2. How do I use the smaller vbs script (win32_services.vbs) to create a graph in cacti?
3. The 3 unmet dependencies with the XML file whilst importing is an error.. if yes, how to fix it?
Keeping in mind I would like to ultimately monitor SQL Server via WMI any advice would be *greatly* appreciated.
Thanks
Sam
**** Import Output *****
GPRINT Preset
[success] Normal [update]
[success] Exact Numbers [update]
Data Input Method
[success] Win32 Services [update]
Data Template
[success] Win32 Services [update]
+ Found Dependency: (Data Input Method) Win32 Services
+ Found Dependency: (Data Input Field) ServiceState
+ Unmet Dependency: (Data Input Field) Output Type ID
+ Unmet Dependency: (Data Input Field) Index Value
+ Unmet Dependency: (Data Input Field) Index Type
+ Found Dependency: (Data Input Field) Hostname
+ Found Dependency: (Data Input Field) ServiceName
+ Found Dependency: (Data Input Field) NoLogo
Graph Template
[success] Win32 Services [update]
hi, you need to make sure you copied the vbs file to the \scripts folder in your cacti installation, after that, double check the input methods for the right command line. the errors you all are experiencing with the import could be due to a different cacti version, but at least it imports it.
also please make sure the poller runs with an account has the privileges to get the -1 or 0 results.
hope this helps... i'm using this script without modifications since long long time ago, however it should be rewritten into perl as the nologo command that cscript generates is a pitfall to avoid - i remember i needed to modify the nologo permanently (see cscript cmd-line help) from the poller account profile.
also please make sure the poller runs with an account has the privileges to get the -1 or 0 results.
hope this helps... i'm using this script without modifications since long long time ago, however it should be rewritten into perl as the nologo command that cscript generates is a pitfall to avoid - i remember i needed to modify the nologo permanently (see cscript cmd-line help) from the poller account profile.
mrh | cacti 0.8.6h | plugin architecture | thold | monitor | iis6
Script errors
Thanks for the reply.
Having not built WMI scripts before, I asked a colleague to help me debug the script.. we straight away noticed that the script was not returning any info.. my colleague was really surprised that the forum posts has mentioned if the script returned -1 then everything was ok, given that the script early on appears to fail, not sure how to proceed.
I added the vbs script to the script directory but no luck:
<path to cacti>\scripts\win32_services.vbs
Input String defined in cacti:
cscript <nologo> <path_cacti>/scripts/Win32_Services.vbs <hostname> <servicename>
I am suppose to eventually create custom WMI scripts for disk/SQL server usage..
Thanks again for your help and any further advice/info would be great.
-Sam
Having not built WMI scripts before, I asked a colleague to help me debug the script.. we straight away noticed that the script was not returning any info.. my colleague was really surprised that the forum posts has mentioned if the script returned -1 then everything was ok, given that the script early on appears to fail, not sure how to proceed.
I added the vbs script to the script directory but no luck:
<path to cacti>\scripts\win32_services.vbs
Input String defined in cacti:
cscript <nologo> <path_cacti>/scripts/Win32_Services.vbs <hostname> <servicename>
I am suppose to eventually create custom WMI scripts for disk/SQL server usage..
Thanks again for your help and any further advice/info would be great.
-Sam
Specifying a username for remote hosts
Hello,
I am wanting to use this script to monitor the services on a couple of XP workstations that are not domain members. Is there a way to specify a local user account that it will use with the script so it can connect via WMI?
Thanks!
Danny
I am wanting to use this script to monitor the services on a couple of XP workstations that are not domain members. Is there a way to specify a local user account that it will use with the script so it can connect via WMI?
Thanks!
Danny
I have been able to install and run the script. Nice - Thank you.
However, as I have several services i like to monitor, the graph title does not show the service monitored.
I tried to add "|query_ServiceName|" and "<servicename>", amongst others, in the title field of the graph template, but no success.
Does anyone have an idea on how to do this correctly?
thanks as always!
However, as I have several services i like to monitor, the graph title does not show the service monitored.
I tried to add "|query_ServiceName|" and "<servicename>", amongst others, in the title field of the graph template, but no success.
Does anyone have an idea on how to do this correctly?
thanks as always!
Who is online
Users browsing this forum: No registered users and 0 guests