'Chek if SNMP is available on the server.'

def check_snmp(self):

    from glances.snmp import GlancesSNMPClient
    clientsnmp = GlancesSNMPClient(host=self.args.client, port=self.args.snmp_port, version=self.args.snmp_version, community=self.args.snmp_community, user=self.args.snmp_user, auth=self.args.snmp_auth)
    ret = (clientsnmp.get_by_oid('1.3.6.1.2.1.1.5.0') != {})
    if ret:
        oid_os_name = clientsnmp.get_by_oid('1.3.6.1.2.1.1.1.0')
        try:
            self.system_name = self.get_system_name(oid_os_name['1.3.6.1.2.1.1.1.0'])
            logger.info('SNMP    system    name    detected:    {}'.format(self.system_name))
        except KeyError:
            self.system_name = None
            logger.warning('Cannot    detect    SNMP    system    name')
    return ret
