better script for nagios generator