Re: [Pysnmp-dev] Pysnmp: Can it receive snmp v3 trap with random engine id
Brought to you by:
elie
From: chengkeke <che...@16...> - 2011-06-16 03:09:29
|
Hi Ilya, It is really helpful for me. I read the whole FAQ and knew how to get snmp agent ip address. In our product, only support v2 and v3 agent and trap. For v2 trap, there is a sample in pysnmp tar, it can get trap version and other information. It is ok for our testing. Although there is no community information. For v3 trap, we need to set trap version is 3, and set security name, auth and privacy settings, after that, we will open a trap receive in one computer, and check we receive trap information and also the setting are correct, including agent ip address, security name, auth and privacy settings. Is it possible to get the information (security name, auth and privacy settings)? If yes, could you please give me an example? Thanks. Cherry At 2011-06-15 18:48:51,"Ilya Etingof" <il...@gl...> wrote: > >> Now, I can get snmp v3 trap base on examples of v3 in pysnmp web site. I >> used the version pysnmp-4.1.10a. >> >> Here are my new questions. >> >> 1. There two network card in my computer. If set host as 127.0.0.1, >> local IP is 192.168.0.100, can't get trap information. After I change >> host to 192.168.0.100, it works well.So we can't set host as >> 127.0.0.1(want to receive all traps sent to local computer), is it >> correct? > >So, if you need your Receiver to listen on several IP interfaces, you have >to register each of your local endpoints (IP:port) as a separate >transport at your SNMP engine. I've added this hint to a FAQ: > >http://pysnmp.sourceforge.net/faq.html#6 > >> 2. In the sample, we only get name, val in varBinds. Can we get other >> information, for example, sec-name, auth protocol, auth key, privacy >> protocol, privacy key and agent ip address? [We can get details >> information in v1.] In pysnmp\proto\api, we only have v1 and v2c. > >The short answer is - you should not have to know that. Please, find the >long answer in the [newly added] hint in the FAQ: > >http://pysnmp.sourceforge.net/faq.html#7 > >-ilya |