(self, metric_name, submit_method, prefix=None)
return u"{metric_prefix}{normalized_metric_name}{metric_suffix}".format(
            normalized_metric_name=self.check.normalize(metric_name.lower()),
            metric_prefix=metric_prefix,
            metric_suffix=metric_suffix,
        )
Replace case-sensitive metric name characters, normalize the metric name,
        prefix and suffix according to its type.
Replace case-sensitive metric name characters, normalize the metric name,
        prefix and suffix according to its type.
Replace case - sensitive metric name characters normalize the metric name prefix and suffix according to its type .
def _normalize(self, metric_name, submit_method, prefix=None):
        """Replace case-sensitive metric name characters, normalize the metric name,
        prefix and suffix according to its type.
        """
        metric_prefix = "mongodb." if not prefix else "mongodb.{0}.".format(prefix)
        metric_suffix = "ps" if submit_method == AgentCheck.rate else ""

        # Replace case-sensitive metric name characters
        for pattern, repl in iteritems(CASE_SENSITIVE_METRIC_NAME_SUFFIXES):
            metric_name = re.compile(pattern).sub(repl, metric_name)

        # Normalize, and wrap
        return u"{metric_prefix}{normalized_metric_name}{metric_suffix}".format(
            normalized_metric_name=self.check.normalize(metric_name.lower()),
            metric_prefix=metric_prefix,
            metric_suffix=metric_suffix,
        )
def _normalize ( self , metric_name , submit_method , prefix = None ) : metric_prefix = "mongodb." if not prefix else "mongodb.{0}." . format ( prefix ) metric_suffix = "ps" if submit_method == AgentCheck . rate else "" # Replace case-sensitive metric name characters for pattern , repl in iteritems ( CASE_SENSITIVE_METRIC_NAME_SUFFIXES ) : metric_name = re . compile ( pattern ) . sub ( repl , metric_name ) # Normalize, and wrap return u"{metric_prefix}{normalized_metric_name}{metric_suffix}" . format ( normalized_metric_name = self . check . normalize ( metric_name . lower ( ) ) , metric_prefix = metric_prefix , metric_suffix = metric_suffix , )