def _mapreduce_job_counters_metrics(self, running_jobs):
        '''
        Get custom metrics specified for each counter
        '''
        try:
            for job_id, job_metrics in running_jobs.iteritems():
                ts = time.time()
                job_name = job_metrics['job_name']
                if job_name:
                    metrics_json = self.request_url("%s%s" % (job_metrics['tracking_url'],'/counters'))
                    if metrics_json.get('jobCounters'):
                        if metrics_json['jobCounters'].get('counterGroup'):
                            for counter_group in metrics_json['jobCounters']['counterGroup']:
                                group_name = counter_group.get('counterGroupName')
                                if group_name:
                                    if counter_group.get('counter'):
                                        for counter in counter_group['counter']:
                                            counter_name = counter.get('name')
                                            for metric in JOB_COUNTER:
                                                self._readq.nput('mapreduce.job.counter.%s %d %d app_name=%s user_name=%s job_name=%s counter_name=%s' % (metric, ts, counter[metric], utils.remove_invalid_characters(job_metrics.get('app_name')), utils.remove_invalid_characters(job_metrics.get('user_name')), utils.remove_invalid_characters(job_name), utils.remove_invalid_characters(str(counter_name).lower())))
        except Exception as e:
            self._readq.nput("mapreduce.state %s %s" % (int(time.time()), '1'))
            self.log_exception('exception collecting mapreduce jobs counter metric \n %s',e)