# Path: collectors/etc/riak_conf.py
# def onload(options, tags):
# def get_default_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 json
import os
import sys
import time
from collectors.etc import riak_conf
from collectors.lib import utils
    from urllib.request import urlopen
    from urllib2 import urlopen
    'node_get_fsm_siblings_95': ('node.siblings.95th', ''),
    'node_get_fsm_siblings_99': ('node.siblings.99th', ''),
    'node_get_fsm_siblings_100': ('node.siblings.100th', ''),
    'node_get_fsm_objsize_mean': ('node.object.size.mean', ''),
    'node_get_fsm_objsize_median': ('node.object.size.median', ''),
    'node_get_fsm_objsize_95': ('node.object.size.95th', ''),
    'node_get_fsm_objsize_99': ('node.object.size.99th', ''),
    'node_get_fsm_objsize_100': ('node.object.size.100th', ''),
    'pbc_connects_total': ('connections', ''),
    'pbc_active': ('pbc.active', ''),
    'read_repairs_total': ('read_repairs', ''),
    'sys_process_count': ('sys_process_count', ''),
    'executing_mappers': ('executing_mappers', ''),
    'mem_allocated': ('memory.allocated', ''),
    'mem_total': ('memory.total', ''),
    'memory_processes_used': ('memory.erlang', ''),
    'index_fsm_active': ('index.active.fsm', ''),
    'list_fsm_active': ('key.listing.active', ''),
    'cpu_nprocs': ('os.processes', '')
    #connected_nodes is calculated
}


def main():
    """Main loop"""

    # don't run if we're not a riak node
    if not os.path.exists("/usr/lib/riak"):
        sys.exit(13)


# Path: collectors/etc/riak_conf.py
# def onload(options, tags):
# def get_default_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/riak.py
import json
import os
import sys
import time
from collectors.etc import riak_conf
from collectors.lib import utils
    from urllib.request import urlopen
    from urllib2 import urlopen

    'node_get_fsm_siblings_95': ('node.siblings.95th', ''),
    'node_get_fsm_siblings_99': ('node.siblings.99th', ''),
    'node_get_fsm_siblings_100': ('node.siblings.100th', ''),
    'node_get_fsm_objsize_mean': ('node.object.size.mean', ''),
    'node_get_fsm_objsize_median': ('node.object.size.median', ''),
    'node_get_fsm_objsize_95': ('node.object.size.95th', ''),
    'node_get_fsm_objsize_99': ('node.object.size.99th', ''),
    'node_get_fsm_objsize_100': ('node.object.size.100th', ''),
    'pbc_connects_total': ('connections', ''),
    'pbc_active': ('pbc.active', ''),
    'read_repairs_total': ('read_repairs', ''),
    'sys_process_count': ('sys_process_count', ''),
    'executing_mappers': ('executing_mappers', ''),
    'mem_allocated': ('memory.allocated', ''),
    'mem_total': ('memory.total', ''),
    'memory_processes_used': ('memory.erlang', ''),
    'index_fsm_active': ('index.active.fsm', ''),
    'list_fsm_active': ('key.listing.active', ''),
    'cpu_nprocs': ('os.processes', '')
    #connected_nodes is calculated
}


def main():
    """Main loop"""

    # don't run if we're not a riak node
    if not os.path.exists("/usr/lib/riak"):
        sys.exit(13)


    utils.drop_privileges()