12-10-2018 01:02 PM
To simplify scripting, I want to invoke another EEM within EEM. Is there a best practice for how it is done?
12-18-2018 01:48 AM
You can do this in a number of ways depending on your use case. But I tend to like application events:
Applet 1:
action X publish-event sub-system 798 type 1 arg1 FOO
Applet 2:
event appl sub-system 798 type 1
action X puts $_application_data1 <== Prints FOO
01-10-2019 05:31 PM
I apologize that I missed your reply earlier. It seems like a cool way to pass control from one applet to another. Can you tell me where I can find documentation to "sub-system 798 type 1". Many advanced EEM scripts have some magic numbers. Is there a document that list all the sub-system or SNMP events that can be used in EEM?
01-11-2019 06:20 AM
You're right that these are magic numbers. Unfortunately, there isn't a list of all subsystems since the rest are internal to IOS. Subsystem 798 is reserved for "user defined" and type 1 is just a convention. You could have different types within 798 if you want different events. That is, consider 798 your user-defined namespace, and use as many types there as you want.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide