9 Replies Latest reply: Jul 17, 2012 7:25 AM by Luis Millán RSS

Manage a variable into mcsnmptrapd file

Luis Millán

Hi,

 

I wanna edit the mcsnmptrapd file to get a variable text from the trap and manage my way.

 

Example:

     CONDITION

          $slot1 "nic: <@.interface> went online"

     SET

          msg = printf ("Interface %s UP", <interface>)

 

If a trap comes in the $slot1 with the text "nic: <...> went online," I wanna save the variable contained in <...> (eg eth0), into another slot or variable for use later in the msg field.

 

Do you have any idea? Any solution?

 

I will rate positively

 

Thanks.