Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

creating oid with type OID. getting error - ReferenceError: data type OID has no registered constructor #263

Open
brzssh opened this issue Jul 16, 2020 · 0 comments

Comments

@brzssh
Copy link

brzssh commented Jul 16, 2020

creating oid with type OID. getting error - ReferenceError: data type OID has no registered constructor

what is correct type to put?

agent.request({ oid: '.1.3.6.1.2.1.1.2', handler: function (prq) {
var sysobjid = '1.3.6.1.6.3.15.1.1.4.0'
var val = snmp.data.createData({ type: 'OID',
value: sysobjid });

    snmp.provider.readOnlyScalar(prq, val);

} });

agent.bind({ family: 'udp4', port: 161 });

/root/node_modules/snmpjs/lib/protocol/data.js:664
throw new ReferenceError('data type ' + type +
^

ReferenceError: data type OID has no registered constructor
at Object.createData (/root/node_modules/snmpjs/lib/protocol/data.js:664:9)
at handler (/root/scripts/Loaders/pcp/snmp/generic_snmp_objid.js:8:22)
at /root/node_modules/snmpjs/lib/agent.js:220:4
at Array.forEach ()
at /root/node_modules/snmpjs/lib/agent.js:219:11
at Array.forEach ()
at Agent._do_getset (/root/node_modules/snmpjs/lib/agent.js:181:19)
at Agent._process_req (/root/node_modules/snmpjs/lib/agent.js:408:8)
at Agent._recv (/root/node_modules/snmpjs/lib/agent.js:450:7)
at Socket._recv_binder (/root/node_modules/snmpjs/lib/agent.js:481:8)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant