ubnt_collectd.py
def fetch_info(host, username, password):
    """ Connect to UBNT device and request info. """
    try:
        station = AirOS(host=host, username=username, password=password)
    except:
        collectd.error('ubnt_info plugin: Error connecting to %s' % (host))

    try:
        status = station.status
    except:
        collectd.error('ubnt_info plugin: Unable to read status from %s' % (host))

    return status
 Connect to UBNT device and request info. 
Connect to UBNT device and request info.
Connect to UBNT device and request info .
def fetch_info(host, username, password):
    try:
        station = AirOS(host=host, username=username, password=password)
    except:
        collectd.error('ubnt_info plugin: Error connecting to %s' % (host))
    try:
        status = station.status
    except:
        collectd.error('ubnt_info plugin: Unable to read status from %s' % (host))
    return status
def fetch_info ( host , username , password ) : try : station = AirOS ( host = host , username = username , password = password ) except : collectd . error ( 'ubnt_info plugin: Error connecting to %s' % ( host ) ) try : status = station . status except : collectd . error ( 'ubnt_info plugin: Unable to read status from %s' % ( host ) ) return status
Connect to UBNT device and request info.
Connect to UBNT device and request info .
""" Connect to UBNT device and request info. """
host
username
password