# Path: collectors/etc/mapr_metrics_conf.py
# def enabled():
# def get_config():
# 
# Path: collectors/lib/utils.py
# PY3 = sys.version_info[0] > 2
# USER = "nobody"
# def drop_privileges(user=USER):
# def is_sockfile(path):
# def err(msg):
#     def is_numeric(value):
#     def is_numeric(value):


import datetime
import sys
import platform
import sys
import time
import re
  import requests
from datetime import timedelta
from string import Template
from collectors.etc import mapr_metrics_conf
from collectors.lib import utils
  from collectors.etc import mapr_metrics_conf
          timestamp = int(d['TIMESTAMP']) / 1000
          tags = {
            'node': node,
            'cluster': self.cluster_name
          }

          for group in ('DISKS','CPUS','NETWORK'):
            if group in d:
              self.group_metrics(group, self.last_values, d, tags=tags)
          try:
            self.send_gauge('mapr.memory.used', int(d['MEMORYUSED']) * (1024*1024), timestamp, tags=tags)
          except KeyError as e:
            utils.err('%s not in metrics data.' % e)

          try:
            self.send_gauge('mapr.mfs.available', int(d['SERVAVAILSIZEMB']) * (1024 * 1024), timestamp, tags=tags)
          except KeyError as e:
            utils.err('%s not in metrics data.' % e)

          try:
            self.send_gauge('mapr.mfs.used', int(d['SERVUSEDSIZEMB']) * (1024 * 1024), timestamp, tags=tags)
          except KeyError as e:
            utils.err('%s not in metrics data.' % e)

          try:
            rpccount_metric = self.metric_template.substitute(grouping='rpc', metric='count')
            if rpccount_metric in self.last_values:
              self.send_counter(rpccount_metric, self.last_values[rpccount_metric], d['RPCCOUNT'], timestamp, tags=tags)
            self.last_values[rpccount_metric] = d['RPCCOUNT']
          except KeyError as e:

# Path: collectors/etc/mapr_metrics_conf.py
# def enabled():
# def get_config():
# 
# Path: collectors/lib/utils.py
# PY3 = sys.version_info[0] > 2
# USER = "nobody"
# def drop_privileges(user=USER):
# def is_sockfile(path):
# def err(msg):
#     def is_numeric(value):
#     def is_numeric(value):


# Path: collectors/0/mapr_metrics.py
import datetime
import sys
import platform
import sys
import time
import re
  import requests
from datetime import timedelta
from string import Template
from collectors.etc import mapr_metrics_conf
from collectors.lib import utils
  from collectors.etc import mapr_metrics_conf

          timestamp = int(d['TIMESTAMP']) / 1000
          tags = {
            'node': node,
            'cluster': self.cluster_name
          }

          for group in ('DISKS','CPUS','NETWORK'):
            if group in d:
              self.group_metrics(group, self.last_values, d, tags=tags)
          try:
            self.send_gauge('mapr.memory.used', int(d['MEMORYUSED']) * (1024*1024), timestamp, tags=tags)
          except KeyError as e:
            utils.err('%s not in metrics data.' % e)

          try:
            self.send_gauge('mapr.mfs.available', int(d['SERVAVAILSIZEMB']) * (1024 * 1024), timestamp, tags=tags)
          except KeyError as e:
            utils.err('%s not in metrics data.' % e)

          try:
            self.send_gauge('mapr.mfs.used', int(d['SERVUSEDSIZEMB']) * (1024 * 1024), timestamp, tags=tags)
          except KeyError as e:
            utils.err('%s not in metrics data.' % e)

          try:
            rpccount_metric = self.metric_template.substitute(grouping='rpc', metric='count')
            if rpccount_metric in self.last_values:
              self.send_counter(rpccount_metric, self.last_values[rpccount_metric], d['RPCCOUNT'], timestamp, tags=tags)
            self.last_values[rpccount_metric] = d['RPCCOUNT']
          except KeyError as e:

            utils.err('%s is not in metrics data.' % e)