# Copyright 2026 SigmaSRC, Inc. All Rights Reserved.

"""Gather the host name, according to socket.gethostname()."""

if __name__ == "__main__":
    import os
    import sys
    try:
        import sigma
    except ImportError:
        sys.path.append(os.path.join(os.pardir, os.pardir))
    del sys
    del os

import os
import socket

def Gather(collector):
    t = collector.table("hostname", ["hostname"])
    t.add([socket.gethostname()])

def _test():
    from sigma.gather import gathering
    gathering.test(Gather)

if __name__ == "__main__":
    _test()
