[c-nsp] EEM applets and conditional statements
Justin Shore
justin at justinshore.com
Tue Aug 11 18:16:11 EDT 2009
I'm having trouble figuring out how to use the conditional capabilities
of EEM applets to do something fairly simple. I'd like to check for
DHCP conflicts on a schedule and if any exist I'd like to generate a
syslog message and send an email. What I can't figure out how to do is
parse the output of 'sh ip dh con' and if then perform an action if
there are any conflicts (ie, more than just the single header line in
the output). I've gone through some of the EEM community scripts but
they all seem to be full blown TCL scripts. I'm thinking that I can
handle this with a simple applet. The applets have if, for, and while
capabilities but I haven't figured out how to apply them to parsing
command output?
Any suggestions or pointers? Example scripts that demonstrate how to
use the EEM logic capabilities would be fine too. I can build off that
to do what I need.
Thanks
Justin
More information about the cisco-nsp
mailing list