First post so hello everyone and thanks in advance for the help if i dont kill someone or myself tomorrow 
I'm trying to get alert trap from Vmware infrastructure center using the snmptrap.sh script that everyone knows.
My problem is that the script is done for one payload and i'm totally clueless about what to do to receive the information for the other payloads.
My trap has 6 payload and i need 2 or 3 of them (the host and the alarm)
In the SH script, if i had "read payload" multiple time, the trap received by Zabbix is the last read payload (for example, if i write 5 time "read payload" i will have the 5th payload but not the 4 others)
Echoing the exact same command gives me the full trap (unfiltered information with all OID, all 6 payloads and other useless information)
My guess is that i must edit the SH script but my knowledge is quite limited in this domain so if anyone know what to do, it will be a big help.
edit : was just thinking of something. Would it be right to put something like this
read payload
payload=`echo $payload1`
read payload
payload2=`echo $payload2`
str="HOST=$hostname TRAP OID=$trapoid PAYLOAD=$payload1 PAYLOAD=&payload2"
The syntax if for sure incorrect as i'm a total noob in term of shell programmation but...

I'm trying to get alert trap from Vmware infrastructure center using the snmptrap.sh script that everyone knows.
My problem is that the script is done for one payload and i'm totally clueless about what to do to receive the information for the other payloads.
My trap has 6 payload and i need 2 or 3 of them (the host and the alarm)
In the SH script, if i had "read payload" multiple time, the trap received by Zabbix is the last read payload (for example, if i write 5 time "read payload" i will have the 5th payload but not the 4 others)
Echoing the exact same command gives me the full trap (unfiltered information with all OID, all 6 payloads and other useless information)
My guess is that i must edit the SH script but my knowledge is quite limited in this domain so if anyone know what to do, it will be a big help.
edit : was just thinking of something. Would it be right to put something like this
read payload
payload=`echo $payload1`
read payload
payload2=`echo $payload2`
str="HOST=$hostname TRAP OID=$trapoid PAYLOAD=$payload1 PAYLOAD=&payload2"
The syntax if for sure incorrect as i'm a total noob in term of shell programmation but...

Comment