func IgnoreFleet(iamRole string) bool {
	list := config.FleetIgnored()
	for _, value := range list {
		getRegex, _ := regexp.Compile(value)
		result := getRegex.FindString(iamRole)
		if len(result) > 0 {
			return true
		}
	}
	return false
}
IgnoreFleet returns true if the fleet does not need to monitor
package structure
import (
	"os"
	"regexp"
	"time"
	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/service/cloudwatch"
	"github.com/getninjas/spot-ninja/config"
)
func QueryData(dimension *cloudwatch.Dimension) *cloudwatch.MetricDataQuery {
	metricQuerieData := &cloudwatch.MetricDataQuery{
		Id: aws.String(
			IDMetric()),
		MetricStat: &cloudwatch.MetricStat{
			Unit: aws.String(
				Unit()),
			Period: DataPoint(),
			Stat:   Statistic(),
			Metric: &cloudwatch.Metric{
				Dimensions: []*cloudwatch.Dimension{dimension},
				MetricName: MetricName(),
				Namespace:  NameSpace(),
			},
		},
	}
	return metricQuerieData
}
func CloudDimension(spootID string) *cloudwatch.Dimension {
	configFile := Fleettype()
	result := &cloudwatch.Dimension{
		Name:  aws.String(configFile),
		Value: aws.String(spootID),
	}
	return result
}
func GetRegion() {
	if len(os.Getenv("AWS_REGION")) <= 1 {
		os.Setenv("AWS_REGION", "us-east-1")
	}
}
func getSpotConfig() string {
	spot := os.Getenv("SPOT_CONFIG")
	if len(spot) <= 1 {
		panic("env SPOT_CONFIG not found")
	}
	return os.Getenv("SPOT_CONFIG")
}
func DataPoint() *int64 {
	dpoint := config.DataPointConfig()
	return &dpoint
}
func Statistic() *string {
	result := config.StatisticConfig()
	return &result
}
func Fleettype() string {
	return config.FleetTypeConfig()
}
func IDMetric() string {
	return config.IDmetricConfig()
}
func ScanType() *string {
	result := config.ScantypeConfig()
	return &result
}
func MetricName() *string {
	result := config.MetricnameConfig()
	return &result
}
func NameSpace() *string {
	result := config.NamespaceConfig()
	return &result
}
func Unit() string {
	return config.UnitConfig()
}
func TimeConfig() int64 {
	return config.TimeToConfig() * 2
}
func Speed() int64 {
	return config.SpeedConfig()
}
func Divider() int64 {
	return config.DividerConfig()
}
func FallbackCheck(trigger bool, lock, scaling string) bool {
	if trigger == true && lock != scaling {
		return true
	} else if trigger == false && lock == scaling {
		return false
	}
	return false
}
func MakeLock(lock int64) bool {
	return lock > 0
}
func CheckLock(lock int64) bool {
	t := time.Now()
	timeNow := t.Unix()
	result := timeNow - lock
	return result >= config.TimeToLive()
}
func GetTrigger(data int64) bool {
	return data > 0
}