Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Apr 19, 2019 1:34 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 39 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: SQL Server 2000 Connections via WMI
PostPosted: Mon Oct 18, 2004 11:16 am 
Offline
Cacti User

Joined: Fri Jul 16, 2004 1:59 pm
Posts: 166
Location: Oregon
As the title says, SQL Server 2000 connections...

Usage:
Code:
perl <path_cacti>/scripts/w32_sql_query_connections.pl <hostname> get UserConnections,LoginsPersec,LogoutsPersec


*NOTE - I haven't found Logins/Logouts per sec to be very useful in my scenario so I am not graphing them.

Addendum - If you're using SQL 2000 on Windows 2000, you need to change the script class to "Win32_PerfRawData_MSSQLSERVER_SQLServerGeneralStatistics" to make it work. Thanks to chewy009 for this info.


Attachments:
File comment: Graph template
cacti_graph_template_sql_connections.xml [4.04 KiB]
Downloaded 3326 times
File comment: Perl script
w32_sql_query_connections.pl.txt [5.17 KiB]
Downloaded 3865 times
File comment: Screenshot
screen.gif
screen.gif [ 6.47 KiB | Viewed 47610 times ]


Last edited by DevilSun on Mon Nov 28, 2005 2:12 pm, edited 1 time in total.
Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 30, 2004 3:18 pm 
Offline

Joined: Tue Dec 14, 2004 9:54 am
Posts: 14
I imported this template into cacti and go the following:
[success] SQL - Connections [update]
+ Unmet Dependency: (Data Template Item)
+ Found Dependency: (GPRINT Preset) Normal
+ Unmet Dependency: (Data Template Item)
+ Found Dependency: (GPRINT Preset) Exact Numbers
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)

Looking in the data input methods section, there is nothing for SQL- Connections. I'm going to try and figure it out, but if you get a chance can you look into it?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 04, 2005 3:02 pm 
Offline
Cacti User
User avatar

Joined: Fri Dec 31, 2004 7:07 am
Posts: 247
Location: UK
Think me thick but I have managed to import the XML via 'Import Templates' and I have copied the *.pl files into <cacti_install>\scripts\*.*

My question is.... what do I have to do then??

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 04, 2005 5:50 pm 
Offline
Cacti User

Joined: Fri Jul 16, 2004 1:59 pm
Posts: 166
Location: Oregon
Here is the data template, it should be included in the graph template though so I dunno...


Attachments:
File comment: Data template for SQL connections...
cacti_data_template_sql_connections.xml [5.48 KiB]
Downloaded 2451 times
Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 04, 2005 5:57 pm 
Offline
Cacti User

Joined: Fri Jul 16, 2004 1:59 pm
Posts: 166
Location: Oregon
pshankland wrote:
Think me thick but I have managed to import the XML via 'Import Templates' and I have copied the *.pl files into <cacti_install>\scripts\*.*

My question is.... what do I have to do then??

Thanks.


Go create a Data Input Method, of type "Script/Command", input string like
Code:
perl <path_cacti>/scripts/w32_sql_query_connections.pl <hostname> get UserConnections,LoginsPersec,LogoutsPersec

and setup the fields as shown. You gotta match up the fields and what not...


Attachments:
File comment: Data Input screenshot
sql_di.gif
sql_di.gif [ 10.76 KiB | Viewed 47233 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 05, 2005 4:11 am 
Offline
Cacti User
User avatar

Joined: Fri Dec 31, 2004 7:07 am
Posts: 247
Location: UK
Cheers for the reply. I have done what you have said but the graph never gets generated - I just get the red-cross thingy.

I have imported the Graph Template OK and I have then created a Data Input Method as per your instructions but still get no graph. Any suggestions??

Thanks.

Code:
perl <path_cacti>/scripts/w32_sql_query_connections.pl <hostname> get UserConnections,LoginsPersec,LogoutsPersec


Attachments:
File comment: Data Input Method Screen-Shot
WMI SQL - Data Input Methods.jpg
WMI SQL - Data Input Methods.jpg [ 91.05 KiB | Viewed 47210 times ]
File comment: Graph Template Screen-Shot
WMI SQL - Graph Template.jpg
WMI SQL - Graph Template.jpg [ 164.69 KiB | Viewed 47210 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 05, 2005 4:21 pm 
Offline
Cacti User

Joined: Fri Jul 16, 2004 1:59 pm
Posts: 166
Location: Oregon
I see the problem. This is that data source disconnect problem that happened to me a version or two ago, a lot of my templates got hosted in that nature, and I've rebuilt quite a few, but some don't want to be fixed.

Here's what I believe you need to do. Go edit the graph template. See where it says "(No task)" next to each graph item under the Data Source column? That means, that graph item is not associated with the data source. My suggestion would be to delete the existing Graph Item input data source, and then go to each graph item itself, and select the Data Source. The reason I say to delete the existing Graph Item Input data source ("Data Source [user_count]") is because as soon as you add it again to the graph item, it'll duplicate the existing one and you won't know which to delete. For each graph item, set the data source to "SQL - Connections - (user_count)". That should work unless there is something else going on.


Top
 Profile  
 
 Post subject: This only works if cacti is on windows -right?
PostPosted: Thu Jan 06, 2005 9:09 am 
Offline
Cacti User

Joined: Fri Sep 05, 2003 9:20 am
Posts: 150
Location: London
I'd like to use this, but I'd be polling from a linux host...

Would that mean I'd install activeperl on the sql server and ....

Hmm... I might have to do something like what's mentioned in

http://forums.cacti.net/about4670.html

-P

_________________
uname -a


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 07, 2005 5:59 am 
Offline
Cacti User

Joined: Thu Dec 09, 2004 1:51 pm
Posts: 112
Location: Austria
If you want to monitor Windows Servers using WMI from Unix/Linux please have a look at http://forums.cacti.net/viewtopic.php?t=5842.
I have summarized all possible ways (as far as I know them) to get WMI information from Unix/Linux.

_________________
Thomas Rupp


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 10, 2005 7:58 pm 
Offline

Joined: Thu Oct 14, 2004 2:39 pm
Posts: 21
I have a set of clustered MSSQL 2000 \ Win2k servers that both respond to WMI queries for cpu and mem etc, but when I query using this perl script I get this.

Any ideas?

Check the computer and class name.
No information was found on the specified class!

Thanks in advance,


Nick


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 11, 2005 5:16 am 
Offline
Cacti User
User avatar

Joined: Fri Dec 31, 2004 7:07 am
Posts: 247
Location: UK
I know this script is for WMI but just as a word of caution if you want to monitor Microsoft SQL Servers that are clustered using SNMP...... DON'T!! It seems that the Intel SNMP agent can cause a load of problems that you really don't want in a clustered environment!

http://support.microsoft.com/default.as ... -us;811876

Cheers.

Pete.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 11, 2005 10:27 am 
Offline

Joined: Thu Oct 14, 2004 2:39 pm
Posts: 21
Roger that, I am just running the windows SNMP service on these machines. Thanks for the heads up.

I was wondering if I need to install the mof files for SQL since my machines think they don't have this class needed for this application.


Thanks,


Nick


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 11, 2005 4:24 pm 
Offline
Cacti User

Joined: Fri Jul 16, 2004 1:59 pm
Posts: 166
Location: Oregon
Riceman, check these links, they might help...
http://support.microsoft.com/default.as ... -us;827260
http://support.microsoft.com/default.as ... -us;820847


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 11, 2005 4:46 pm 
Offline

Joined: Thu Oct 14, 2004 2:39 pm
Posts: 21
Thanks for the help bro. Looks like it might be my problem.


Thanks again,


Nick


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 12, 2005 8:08 pm 
Offline

Joined: Fri May 27, 2005 11:39 am
Posts: 3
Did you ever figure anything out with this, niether of these solutions helped, I even reinstalled sql making sure snmp was enabled before install.

When running the script I get the same error as Riceman. Any suggestions are much appreciated.

Thanks!

Jason


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 39 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours


Who is online

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