$Threscount=0; open(THRESHOLDS, "$Thresholds") or die("Could not open Thresholds file."); foreach () { chomp($_); if ($_ =~/^(\w+);(\d+);$/ && $_ !~/^\#/) { print "DEBUG: use constant $1 => $2;\n"; use constant $1 => $2; log_msg("Setting: use constant $1 => $2;"); if ($Threslabels[$Threscount] ne $1) { log_msg("There is something wrong with the thresholds labels, check thresholds file!"); exit(2); } $Threscount++; } } if ($Threscount != 8) { print "$Threscount\n"; log_msg("Wrong number of thresholds they should be 8 there are $Threscount"); exit(2); } close(THRESHOLDS); #### #Define Warning values use constant SIMULWAR => 30; use constant MEMINUSEWAR => 200000000; use constant SIMULSNAGWWAR => 40; use constant CONDBWAR => 200; #Define Critical Values use constant SIMULCRIT => 50; use constant MEMINUSECRIT => 240000000; use constant SIMULSNAGWCRIT => 60; use constant CONDBCRIT => 240;