Skip to content

Getting "SNMP version 3 is not supported" #26

Description

@tyson-nw

I am working on an api frontend for snmp data using LARAVEL 12.46.0 on PHP 8.5.1

I am getting the "SNMP version 3 is not supported" error when I try to get.

        $snmp = new SnmpClient([
            'host' => $this->host,
            'port' => $this->port,
            'version' => $this->version,
            'user' => $this->user,
            'use_auth' => true,
            'auth_pwd' => $this->auth_password,
            'auth_mech' => $this->auth_protocol,
            'use_priv' => true,
            'priv_password' => $this->privacy_password,
            'priv_mech' => $this->privacy_protocol
        ]);

        $oids = $snmp->get('1.3.6.1.2.1.1.5.0', '1.3.6.1.2.1.1.3.0');

I have tested the values with snmpwalk -v 3 -l authPriv -u $this->user -a $this->auth_protocol -A $this->auth_password -x $this->privacy_protocol -X $this->privacy_password $this->host and it connects and gives output. So the server is supporting v 3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions