1. A computer implemented method of determining a threshold for a metric, the method comprising: partitioning a plurality of measurements of the metric into a number of sets including a set, the set comprising measurements collected during a plurality of intervals of time; selecting a subset of measurements from the set whose rank occurs within a predetermined percentile range; fitting measurements in the subset to a statistical distribution function having a tail that decays slower than a normal distribution, to obtain at least two parameters thereof; computing, based on said at least two parameters, a value of the metric at a predetermined probability outside of the predetermined percentile range; and performing an action when a new measurement of the metric, in a new interval of time corresponding to the set, crosses said value obtained from the computing.