btimby
Joined: 21 Oct 2009 Posts: 3
|
Posted: Wed Oct 28, 2009 2:08 pm Post subject: Graph Proftpd metrics. |
|
|
I found the following post regarding graphing the number of proftpd users.
http://forums.cacti.net/viewtopic.php?t=22698&highlight=proftpd
However, I have a couple of problems with this solution.
1. It only graphs the number of users.
2. It uses a two-phase process whereby a cron job writes stats to a text file and SNMPD reads from that file.
3. It had a bug that if no users were connected, the output was "no" rather than 0.
Therefore I reworked the script and Cacti templates to gather data directly via SSH and it now returns 4 metrics:
- user count: number of authenticated users connected (same as other script).
- uniq user count: number of authenticated users connected with different names.
- ftp uploads: number of uploads (STOR/STOU/APPE).
- ftp downloads: number of downloads (RETR).
I placed the script, templates and a README into the attached tarball. I hope somebody finds this useful!
*** UPDATE 10/30/2009 ***
I have uploaded a new tarball, it contains a fix for proftpd_users.sh, there was a "|" char missing in the UPLOADS calculation. "STO[RU]APPE" -> "STO[RU]|APPE"... Or just download the new tarball.
| Description: |
| Cacti XML template, shell script and README for graphing 4 metrics related to proftpd. |
|
 Download |
| Filename: |
cacti-proftpd.tar.gz |
| Filesize: |
4.26 KB |
| Downloaded: |
100 Time(s) |
|
|