from __future__ import absolute_import
from .base import BaseModule

import os

class HostInformationModule(BaseModule):
    key = 'host'

    def get_metrics(self):
        return {'name': os.uname()[1]}


def init():
    return HostInformationModule

import socket

from .base import BaseModule


class HostInformationModule(BaseModule):
    key = 'host'

    def get_metrics(self):
        return {'name': socket.gethostname()}


def init():
    return HostInformationModule

Use more portable function to get hostname
Use more portable function to get hostname

This addresses #11
