|
|
| Author |
Message |
rjholtz
Joined: 05 Oct 2005 Posts: 11
|
Posted: Mon Aug 18, 2008 10:58 pm Post subject: [Solved] best way to get number of netstat connections? |
|
|
Hi, we are using network load balancing to balance an application between two servers. The best way we know how to check the load on one vs the other is to run 'netstat -a' and look to see how many connections of a certain type there are. We want to graph this number. Windows 2003 SP2 hosts, monitored by Cacti 0.8.7.b on a Fedora box.
One idea would be to get the number of connections using a batch file, and write that number to a text file, and see if we can get Cacti to read the number in that file.
Another idea is to see if there is already a script that will pull the data we need from Windows, into cacti.
We have nagios running on the monitoring server, and nsclient running on the windows servers, in case there is a way to do it using a nagios plugin.
Does anyone have any suggestions for doing this? I've looked in the archives but couldn't find anything that related to what we are trying to do.
Thanks,
Ray
Last edited by rjholtz on Tue Aug 19, 2008 1:38 pm; edited 1 time in total |
|
| Back to top |
|
 |
BSOD2600 Cacti Moderator
Joined: 08 May 2004 Posts: 6795 Location: WA, USA
|
Posted: Tue Aug 19, 2008 12:46 am Post subject: |
|
|
| I imagine there must be some WMI counter(s) which contain the data you're after. Since you've already got nsclient installed, it shouldn't be too much work to pull that data via a script. There are a lot of nsclient examples on the script forum for pulling this type of data. Google for the WMI counters / perfmon counters Windows has which contains the data you're after. |
|
| Back to top |
|
 |
rjholtz
Joined: 05 Oct 2005 Posts: 11
|
Posted: Tue Aug 19, 2008 12:56 pm Post subject: |
|
|
| I was able to use http://forums.cacti.net/viewtopic.php?t=12787 and edit the perl script to only include what I wanted, basically the connections to the server that we were wanting to monitor. A bit of editing of the template also was required but I got it and it is running great for what we needed! |
|
| Back to top |
|
 |
|