RE: sending traps from embedded AgentX subagent

"Srivastava, Namburi (IE10)" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <7BADC3AE4B177E4EB91BFF3E227E6BDC54E23A@IE10EV801.global.ds.honeywell.com>
These are the packet dumps I got even after changing the socket through
which the master and sub-agent communicate.

Any idea why the master agent is not letting the sub-agent register in
spite of being able to receive the packets from the Sub-Agent???

Regards,
Sri.

*******************For MASTER AGENT*************************************
# snmpd -c /etc/snmpd.conf -p /var/run/snmpd.pid -d -Dagentx -f -L
IF-MIB: Module not found
TCP-MIB: Module not found
UDP-MIB: Module not found
HOST-RESOURCES-MIB: Module not found
SNMPv2-MIB: Module not found
RFC1213-MIB: Module not found
SNMPv2-SMI: Module not found
NOTIFICATION-LOG-MIB: Module not found
UCD-SNMP-MIB: Module not found
UCD-DEMO-MIB: Module not found
SNMP-TARGET-MIB: Module not found
NET-SNMP-AGENT-MIB: Module not found
SNMP-VIEW-BASED-ACM-MIB: Module not found
SNMP-COMMUNITY-MIB: Module not found
UCD-DLMOD-MIB: Module not found
SNMP-FRAMEWORK-MIB: Module not found
SNMP-MPD-MIB: Module not found
SNMP-USER-BASED-SM-MIB: Module not found
SNMP-NOTIFICATION-MIB: Module not found
SNMPv2-TM: Module not found
Turning on AgentX master support.
agentx/config: port spec: udp:localhost:705
agentx/master: initializing...
agentx/master: initializing...   DONE

/*********THIS IS WHERE THE SUB-AGENT MAKES REGISTRATION
ATTEMPTS****************************/
Received 80 bytes from 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5B 0A B0 59
............[..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...


Received 80 bytes from 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5B 0A B0 59
............[..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...


Received 80 bytes from 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5B 0A B0 59
............[..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...


Received 80 bytes from 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5B 0A B0 59
............[..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...


Received 80 bytes from 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5B 0A B0 59
............[..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...


Received 80 bytes from 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5B 0A B0 59
............[..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...


Received 80 bytes from 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5C 0A B0 59
............\..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...


Received 80 bytes from 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5C 0A B0 59
............\..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...


Received 80 bytes from 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5C 0A B0 59
............\..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...


Received 80 bytes from 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5C 0A B0 59
............\..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...


Received 80 bytes from 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5C 0A B0 59
............\..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...




*********PACKET DUMP ON SUBAGENT
SIDE***************************************
# ./SNMPSubagent -d -f -L

Sending 80 bytes to 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5B 0A B0 59
............[..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...


Resending 80 bytes to 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5B 0A B0 59
............[..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...


Resending 80 bytes to 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5B 0A B0 59
............[..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...


Resending 80 bytes to 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5B 0A B0 59
............[..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...


Resending 80 bytes to 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5B 0A B0 59
............[..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...


Resending 80 bytes to 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5B 0A B0 59
............[..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...

IP-MIB: Module not found
IF-MIB: Module not found
TCP-MIB: Module not found
UDP-MIB: Module not found
HOST-RESOURCES-MIB: Module not found
SNMPv2-MIB: Module not found
RFC1213-MIB: Module not found
SNMPv2-SMI: Module not found
NOTIFICATION-LOG-MIB: Module not found
UCD-SNMP-MIB: Module not found
UCD-DEMO-MIB: Module not found
SNMP-TARGET-MIB: Module not found
NET-SNMP-AGENT-MIB: Module not found
SNMP-VIEW-BASED-ACM-MIB: Module not found
SNMP-COMMUNITY-MIB: Module not found
UCD-DLMOD-MIB: Module not found
SNMP-FRAMEWORK-MIB: Module not found
SNMP-MPD-MIB: Module not found
SNMP-USER-BASED-SM-MIB: Module not found
SNMP-NOTIFICATION-MIB: Module not found
SNMPv2-TM: Module not found

SNMP Subagent-Main is up and running.

Sending 80 bytes to 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5C 0A B0 59
............\..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...


Resending 80 bytes to 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5C 0A B0 59
............\..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...


Resending 80 bytes to 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5C 0A B0 59
............\..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...


Resending 80 bytes to 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5C 0A B0 59
............\..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...


Resending 80 bytes to 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5C 0A B0 59
............\..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...


Resending 80 bytes to 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5C 0A B0 59
............\..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...


Sending 80 bytes to 127.0.0.1
0000: 01 01 00 00  00 00 00 00  00 00 00 00  5D 0A B0 59
............]..Y
0016: 3C 00 00 00  00 00 00 00  05 04 00 00  01 00 00 00
<...............
0032: 88 1F 00 00  03 00 00 00  02 00 00 00  0A 00 00 00
................
0048: 19 00 00 00  4E 65 74 2D  53 4E 4D 50  20 41 67 65    ....Net-SNMP
Age
0064: 6E 74 58 20  73 75 62 2D  61 67 65 6E  74 00 00 00    ntX
sub-agent...



-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Dave Shield
Sent: Tuesday, December 19, 2006 2:53 AM
To: Srivastava, Namburi (IE10)
Cc: David Arthur; [email protected]
Subject: Re: sending traps from embedded AgentX subagent

On 18/12/06, Srivastava, Namburi (IE10)
<[email protected]> wrote:
> Okay, so in that case if I add the following line of code in my
Subagent
> before init_subagent()
>
> netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID,
>                            NETSNMP_DS_AGENT_X_SOCKET,
> "/var/agentx/master");
>
> Does this change the socket to which my subagent is trying to connect
> to?


Why waste time asking me?
Why not simply try it and see?

Yes - that code should configure the subagent to connect to a local
socket.

Dave

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.