I have written a few custom plug-ins for the Nagios server monitoring/alerting system. These are all written in Perl.

Plugin Purpose OS
check_conn Checks the number of active connections on any given port. GNU/Linux and BSD
check_quota Checks if any of the system users has exceeded disk quota. WARNING status when soft quota limit has been reached, and CRITICAL status when the hard quota limit has been reached. It will also report the total number of blocks used by all users. BSD

All these scripts are licensed under the GNU GPL license.