04-23-2007 07:37 AM
Hello,
is there any way of doing a user-defined task in CiscoWorks that asks you for a parameter?
For example: if I want to shutdown the interface x when a trap is received, I can write this:
# interface $if
but I want the udt to ask me what interface I want to choose, such way I can write "GigabitEthernet 0/3" and the tasks goes on.
Can anyone help me, please?
04-23-2007 08:10 AM
You can easily create parameterized User-Defined Tasks in Netconfig by clicking the "Parameterized" checkbox, and following the instructions at http://server/help/rme/fundamentals/netcfg_ParametTemplates.html .
However, it sounds like you want something more reactionary. That is, you want to trigger an action on the device when an event occurs. You might want to look at the Embedded Event Manager within IOS for this (if your IOS supports it). See http://www.cisco.com/en/US/products/ps6441/products_feature_guide09186a00804aae8c.html for more details on EEM.
04-24-2007 02:25 AM
Thank you very much, jclarke
but I would need something different. I need to choose the device and one of its interfaces to launch a job and apply a user-defined task over those 2 elements (device and interface).
How to choose the device is easy, the first step when defining a new job but I don't know how to indicate the interface. It can vary and depends on the port where the error occurs.
I need the user-defined task could read that port from the trap or syslog message or that task ask me for the port, can this be done?
04-24-2007 07:18 AM
A Netconfig template cannot read input from a syslog message unless you write your own Automated Action script that parses the message, and kicks off a Netconfig job using cwcli.
However, if you follow the instructions I sent previously on enabling parameterized templates, you can specify an XML input file to Netconfig that will allow you to specify the input parameters on a per-device basis.
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