modified to use with standard modules
modified to use environment value for nagios target