I feel like whatever code I write, no matter how simple or seemingly insignificant, eventually ends up becoming useful to someone else at some point. So here is a quick Nagios plugin that I whipped up today, check_p4_license.
I have a server running Perforce at work and it seems that every other year I have managed to not realize the license needed renewing until someone said to me, “Hey, is there any reason Perforce isn’t working?”
This year my spider-senses started tickling earlier on and I caught it in time, but I told myself I needed to count on more than just an odd sense of doom and foreboding in April. So I wrote a quickly Perl script that calls the Perforce p4 CLI tool and looks at your server’s license info and gripes back to you if it is going to be expiring any time soon.
I have also placed this plugin up on NagiosExchange, because I have found that it is better for me to do so earlier on than to have someone else find my stuff and upload then abandon it.