Page 1 of 1

Any good plugins to monitori the number of FTP connections?

Posted: Mon Mar 14, 2016 2:34 pm
by dpasacritacrown
Hi everyone, are there any good plugins out there for monitoring the number of FTP connection on a windows FTP server? I thought maybe I could make something with the netstat command, but I'm finding it kinda difficult since it's passive FTP. It's a windows 2003 server.

Also, I'm not super familiar with windows or FTP, which is another complication. :(

Re: Any good plugins to monitori the number of FTP connectio

Posted: Mon Mar 14, 2016 4:06 pm
by rkennedy
What software is the 2003 server running for FTP?

A netstat should work, you would just need to filter for established connections. On linux, for example -

Code: Select all

[root@nagiosxi etc]# netstat -tap|grep 22
tcp        0     64 android-785c9e376c9d322:ssh rkennedy.nagios.local:50802 ESTABLISHED 1448/sshd
[root@nagiosxi etc]# netstat -tap|grep 22|wc -l
1
I'm not sure of the Powershell capabilities for W2K3 though, or what's supported back then to be honest.

Re: Any good plugins to monitori the number of FTP connectio

Posted: Fri Mar 18, 2016 3:44 pm
by dpasacritacrown
I eventually got something working. Basically I made a batch script with this command:

Code: Select all

for /f "delims=" %%i in ('netstat -b ^| find "coresrvr.exe" ^| find /c /v ""') do set output=%%i
That returned what I wanted, because every connection to FTP had that "coresrvr.exe" string in there, so that returns the correct value. Now a problem is that it times out occasionally, because the command takes a while to run, but I got around this by just disabling the unknown notification for it. It's a bit sloppy but it's the best I was able to do.

You can close this topic.