Any good plugins to monitori the number of FTP connections?

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
dpasacritacrown
Posts: 24
Joined: Tue Oct 13, 2015 12:57 pm

Any good plugins to monitori the number of FTP connections?

Post 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. :(
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

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

Post 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.
Former Nagios Employee
dpasacritacrown
Posts: 24
Joined: Tue Oct 13, 2015 12:57 pm

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

Post 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.
Locked