SQL Server 2005 Templates

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Yes, I was just looking at that myself - thanks
Going to give this a whirl and see where it takes me
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Fantastic graphs - possibly one of the best collections I've seen so far.

If you're using Ubuntu:

sudo apt-get install php5-sysbase

Will give you the required mssql libraries

Tried three graphs, all of which are working.

Thanks very much for the contribution.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
denyingthetruth
Posts: 23
Joined: Wed May 26, 2010 9:13 pm

Post by denyingthetruth »

some questions mr lints.

what if I already have username and password for my mssql server?
can we just use that username and password on "ss_win_mssql.php" without making a new user?

and what username and password that we use when making a graph?
username and password that we created on "ss_win_mssql.php"
or username and password that I already had?

sorry for these newbie questions.

thanks.
denyingthetruth
Posts: 23
Joined: Wed May 26, 2010 9:13 pm

Post by denyingthetruth »

just edit the "ss_win_mssql.php" to use my current database username and password. it works!

also need another script to monitor blocking process in ms sql server 2000/2005/2008,
I would highly appreciate if anyone can make the script.

thanks in advance.
lints
Cacti User
Posts: 107
Joined: Thu Nov 08, 2007 2:00 pm
Location: Ottawa, Canada

Post by lints »

denyingthetruth:
Yeah, if you've already got a user setup that has the appropriate permissions, you can make the script use that info in two ways:
  • Edit ss_win_mssql.php
    Put the Username/Password combo in the prompts at graph creation time
mcutting:
Thanks! I like them and find they're invaluable tools when clients/management have questions, but I didn't think they were that good. I think you've inspired me to start posting more of my graphs.
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

mcutting:
Thanks! I like them and find they're invaluable tools when clients/management have questions, but I didn't think they were that good. I think you've inspired me to start posting more of my graphs.
Well, I thought they were great - go ahead and post the others - looking forward to that !
I'm actually using your template set on a SQL 2005 server I have that is under load....you saved me hours of work !
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
lints
Cacti User
Posts: 107
Joined: Thu Nov 08, 2007 2:00 pm
Location: Ottawa, Canada

Post by lints »

I think I will.

Is there anything in particular you need?
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Easy question, difficult answer...:)
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
lints
Cacti User
Posts: 107
Joined: Thu Nov 08, 2007 2:00 pm
Location: Ottawa, Canada

Post by lints »

denyingthetruth wrote:just edit the "ss_win_mssql.php" to use my current database username and password. it works!

also need another script to monitor blocking process in ms sql server 2000/2005/2008,
I would highly appreciate if anyone can make the script.

thanks in advance.
I've just updated the script and created the graph on my server, but I want let it run for a bit to make sure it works properly. If I have good enough data by this afternoon I'll post it. Otherwise, I'll wait till tomorrow morning.
Stay tuned.
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Lints - thanks
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
denyingthetruth
Posts: 23
Joined: Wed May 26, 2010 9:13 pm

Post by denyingthetruth »

lints wrote:
I've just updated the script and created the graph on my server, but I want let it run for a bit to make sure it works properly. If I have good enough data by this afternoon I'll post it. Otherwise, I'll wait till tomorrow morning.
Stay tuned.
huge thanks mr. lints :)
TeoriABiFo
Posts: 5
Joined: Fri Jun 11, 2010 10:33 am

Post by TeoriABiFo »

Thanks, you help me a lot with this. The graphs are great!!

Bye.
lints
Cacti User
Posts: 107
Joined: Thu Nov 08, 2007 2:00 pm
Location: Ottawa, Canada

Post by lints »

Well, it guess my servers either aren't that busy or something, because I only got 1 big spike last night in the Blocked Processes.

In any event, here's the new script (to replace the one you currently have), the graph template (with dependencies) and an example.

Let me know how it works out.
Attachments
ss_win_mssql.txt
Script server script. Change extension to 'php' and place in /scripts.
CHANGE USERNAME AND PASSWORD TO MATCH YOUR SETUP.
(6.4 KiB) Downloaded 454 times
cacti_graph_template_windows_-_sql_server_-_processes_blocked.xml
Graph template. Import into Cacti from the console.
(10.41 KiB) Downloaded 411 times
Example of the graph.
Example of the graph.
blocked_procs.png (20.52 KiB) Viewed 4915 times
aleu
Cacti User
Posts: 216
Joined: Mon Dec 11, 2006 10:17 am

Post by aleu »

lints wrote:Well, it guess my servers either aren't that busy or something, because I only got 1 big spike last night in the Blocked Processes.

In any event, here's the new script (to replace the one you currently have), the graph template (with dependencies) and an example.

Let me know how it works out.
Lints,
I am trying to make it work, but I am running into issues. The graphs render, but no data is displayed. I have checked the log file and I am seeing that the poller is returning "Us" for all of the values. I am running this against SQL server 2005 enterprise (x64) with forced encryption. Does it matter that the encryption is enabled?

I have created a user and granted permissions for the SELECT statements as described. I have also installed the "php5-sybase" package and restarted the apache daemon (I can see via Cacti tech support link that mssql module is active.) As I am not using the memcached daemon, I have commented out appriopriate lines from the php script as you described. However, when I execute the script from the CLI nothing is returned (one empty line, to be precise). Should I see anythig when executing the script from the CLI? If so, what? Also, what commands would you recommend to execute in order to verify what is going on?

One more comment: I run tcpdump on my Cacti host to verify whether it sees any packets being sent to my SQL server, but I see nothing (checked both Cacti poller and when executing the php script from the CLI.) Note, that I am not monitoring other things on the SQL server, but using your templates. When I execute ping from the CLI I can see the traffic via tcpdump.

Do you guys have any idea why this is happening and how to investigate this further?
denyingthetruth
Posts: 23
Joined: Wed May 26, 2010 9:13 pm

Post by denyingthetruth »

Thanks again for your new template lints.
However i kinda have a little problem here.
All graphs are good and returning data except "process blocked" graph. It returns "nan" value.
Since I dont use memcached I comment out this:

Code: Select all

/*        $MCache_Host = 'localhost';
        $MCache_Port = '11211';
        $cachekey = 'ss_win_mssql:'.$host.'-'.$port;
        $MemCache = new Memcache;
        $MemCache->connect($MCache_Host, $MCache_Port);

        if (! $vals = $MemCache->get($cachekey)){
*/
and this:

Code: Select all

/*                $MemCache->set($cachekey, $vals, FALSE, 15);
        }*/
I have imported your blocked process template too.

have I done something wrong?
thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests