Created
April 22, 2017 19:30
-
-
Save jonnystorm/cca0b8bf908fbb266f7e3ad1abe84bc9 to your computer and use it in GitHub Desktop.
Test of snmp-elixir noAuthNoPriv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iex(1)> SNMP.start | |
dets: file "/home/jstorm/dev/working/elixir/snmp-elixir/snmpm_config_db" not properly closed, repairing ... | |
:ok | |
iex(2)> cred = SNMP.credential [:v3, :no_auth_no_priv, "admin"] | |
%SNMP.USMNoAuthNoPrivCredential{sec_level: :noAuthNoPriv, sec_model: :usm, | |
sec_name: 'admin', version: :v3} | |
iex(3)> SNMP.get [1,3,6,1,2,1,1,5,0], "192.0.2.3", cred, engine_id: <<0x800000090300c2014d0c0000::12*8>> | |
14:28:35.866 [debug] Will register agent snmp://192.0.2.3 with target [65, 103, 132, 139, 225, 110, 135, 78, 197, 42, 203, 250, 118, 170, 37, 192, 34, 175, 3, 58] and config [engine_id: [128, 0, 0, 9, 3, 0, 194, 1, 77, 12, 0, 0], address: [192, 0, 2, 3], port: 161, tdomain: :transportDomainUdpIpv4, sec_level: :noAuthNoPriv, sec_model: :usm, sec_name: 'admin', version: :v3]. | |
[{[1, 3, 6, 1, 2, 1, 1, 5, 0], :"OCTET STRING", 'R1'}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment