cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3547
Views
0
Helpful
17
Replies

Event manager with large output (how to filter???)

pabloayala
Level 1
Level 1

Hello experts,

 

I'm trying to figure it out a way that I can manipulate an output in a way that I can store 2 variables, here's my output:

 

SW-CLOSET_3-100#show cts interface summary | in MANUAL
Te5/2      MANUAL  OPEN      unknown    unknown    invalid  Invalid
Te6/2      MANUAL  OPEN      unknown    unknown    invalid  Invalid
SW-CLOSET_3-100#

 

I need to grab Te5/2 and Te6/2 from that output since I need to make some configurations after the device reloads since I have a BUG that everytime that these devices (Catalyst 9400) reload CTS fails so I need to remove CTS and re-apply it back.

 

I have another example where I'm trying to manipulate a big output:

RTR_CISCO#ssh sshmyip.com
Translating "sshmyip.com"...domain server (8.8.8.8) [OK]
{


"comment": "##     Your IP Address is XXX.XXX.XXX.XXX (43683)     ##",


"family": "ipv4",
"ip": "XXX.XXX.XXX.XXX",
"port": "43683",
"protocol": "ssh",
"version": "v1.0.0",
"website": "https://github.com/packetsar/checkmyip"
}
[Connection to sshmyip.com closed by foreign host]
RTR_CISCO#

 

I'm using this output to build another EEM that works with DDNS on a DMZ area, but I have no idea how to just grab the IP part.

 

Any ideas on both solutions???

 

Thanks as always and appreciate the time that you take to read my post.

17 Replies 17

Joe Clarke
Cisco Employee
Cisco Employee

For the first one:

cli command "show cts interface summary | in MANUAL"

set intfs ""

foreach line "$_cli_result" "\n"

 regexp "^([A-Z][a-z0-9/]+)[[:space:]]+MANUAL" "$line" match intf

 if $_regexp_result eq "1"

  append intfs "$intf "

 end

end

foreach intf $intfs

 puts "Interface is $intf"

end

 

For the second one:

cli command "ssh sshmyip.com"

regexp "Your IP Address is ([0-9.]+)" "$_cli_result" match ip

puts "IP is $ip"

Joe,

 

As always you rock doing Scripting, just one question, I'm having issues on the second Script, the IP related:

 

This is my config:RTR_CISCO#show run | sec event manager
event manager directory user policy "flash:/TCL_Scripts/"
event manager directory user library "flash:/TCL_Scripts/"
event manager policy Login_SSH_VPN_HTTP_HTTPS.tcl
event manager applet ddns authorization bypass
 event none
 action 001 cli command "ssh sshmyip.com"
 action 005 wait 15
 action 010 regexp "Your IP Address is ([0-9.]+)" "$_cli_result" match ip
 action 015 puts "IP is $ip"
RTR_CISCO#

 

I added a delay, 15 seconds because that's the time that the ssh takes to respond and get the information to the console.

 

Feb  9 16:18:11.959 CST: %HA_EM-6-LOG: ddns : DEBUG(cli_lib) : : CTL : cli_open called.
Feb  9 16:18:11.979 CST: %HA_EM-6-LOG: ddns : DEBUG(cli_lib) : : IN  : RTR_CISCO#ssh sshmyip.com
Feb  9 16:18:12.191 CST: %HA_EM-6-LOG: ddns : DEBUG(cli_lib) : : OUT : RTR_CISCO#
Feb  9 16:18:27.202 CST: %HA_EM-3-FMPD_UNKNOWN_ENV: fh_parse_var: could not find environment variable: ip
Feb  9 16:18:27.202 CST: %HA_EM-3-FMPD_ERROR: Error executing applet ddns statement 015
Feb  9 16:18:27.202 CST: %HA_EM-6-LOG: ddns : DEBUG(cli_lib) : : CTL : cli_close called.
Feb  9 16:18:27.206 CST: tty is now going through its death sequence
!

 

I already checked the regex and should work, I'm not sure what I'm missing.

First, you absolutely cannot add a wait 15.  That does nothing other than ensure your applet won't finish.  Second, EEM doesn't have a pre-configured username.  If you do not specify the CLI username, then commands like SSH will fail.  Something like this will work:

 

event manager applet ddns authorization bypass
 event none maxrun 35

 action 000 cli command "enable"
 action 001 cli command "ssh -l bogus sshmyip.com" pattern "}"
 action 010 regexp "Your IP Address is ([0-9.]+)" "$_cli_result" match ip
 action 015 puts "IP is $ip"

Joe,

 

Thanks again for your help, the main reason why I'm trying to get my IP is because I would like to send an http request from my router to a website to update my public IP, I already know that the router is not capable to do that so I need to use TCL, actually I found a post where you posted a solution:

 

https://supportforums.cisco.com/t5/eem-scripting/dyndns-update-script/td-p/2240108

 

The problem that I'm facing is when I try to merge bot solutions, everytime that I make a request for the new IP my router it freezes, this just sumple Script that I'm using is to retrieve the information:

 

::cisco::eem::event_register_none maxrun 300 queue_priority low nice 0

namespace import ::cisco::eem::*

if [catch {cli_open} result] {
    error $result $errorInfo
} else {
    array set cli1 $result
}
if [catch {cli_exec $cli1(fd) "ssh sshmyip.com" } _cli_result] {
    error $_cli_result $errorInfo
}
set _regexp_result [regexp {Your IP Address is ([0-9.]+)} $_cli_result match ip]
if { $_regexp_result == 0 } {
    puts "Error retrieving information from sshmyip.com"
    exit 1
}
puts $ip
exit 0
}

 

And if I want to use both:

::cisco::eem::event_register_none maxrun 300 queue_priority low nice 0
#::cisco::eem::event_register_timer cron name queue_priority low nice 0
#
#TCL created to retrieve public IP from sshmyip.com
#TCL also will send an email with the information provided
#
namespace import ::cisco::eem::*
namespace import ::cisco::lib::*
source my_smtp_lib.tcl
namespace import ::custom::lib::*

set user "NO-IP USERNAME"
set pass "NO-IP PASSWORD"
set fqdn "NO-IP FQDN"
if [catch {cli_open} result] {
    error $result $errorInfo
} else {
    array set cli1 $result
}
if [catch {cli_exec $cli1(fd) "ssh -l bogus sshmyip.com" pattern "website"} _cli_result] {
    error $_cli_result $errorInfo
}
set _regexp_result [regexp {Your IP Address is ([0-9.]+)} $_cli_result match ip]
if { $_regexp_result == 0 } {
    puts "Error retrieving information from sshmyip.com"
    exit 1
}
set ipinterface $ip
set url  "http://$user:$pass@dynupdate.no-ip.com/nic/update?hostname=$fqdn&myip=$ip"
# Close open cli before exit.
catch {cli_close $cli1(fd) $cli1(tty_id)} result
set auth "Basic [base64::encode $user:$pass]"
set headerl [list Authorization $auth]
if {[catch {http::geturl $url -headers $headerl -queryblocksize 50 -type "text/plain" } token]} {
  action_syslog priority info msg "http request failed"
} else {
  action_syslog priority info msg "Response: [http::data $token]"
}

 

I tried using telnetmyip.com and sshmyip.com with the exact same result. What do I'm missing? Also I would like to know if I use the cron function I can ask for my new IP every X time, right?

 

Thanks a lot Joe.

 

BTW. Do you recommend a book where I can study EEM or TCL Scripting? I already bought the one from Cisco but do you have a second one?

Take the applet I provided in my previous example and convert it to Tcl at https://www.marcuscom.com/convert_applet .  Use that as a base to add the HTTP call.  I'm not sure where you're getting the customer::lib and SMTP library from.  They are not needed.

 

Thanks Joe, I already changed to TCL, the Script that you sent and I'm receiving an error on the pattern that we use (}), it looks like TCL is taking that character a close of a function:

 

WS-C3560CG(config)#event manager policy ddns.tcl
EEM Register event failed:extra characters after close-brace
    while compiling
"if [catch {cli_read_pattern $cli1(fd) ""

EEM configuration: failed to retrieve intermediate registration result for policy ddns.tcl
WS-C3560CG(config)#

 

The pattern is:

if [catch {cli_read_pattern $cli1(fd) "}"} _cli_result] {
    error $_cli_result $errorInfo

 

Now I change it to use different output like:

if [catch {cli_read_pattern $cli1(fd) "website"} _cli_result] {
    error $_cli_result $errorInfo

 

and now works but every time that I try to run the tcl looks like I'm getting stuck in the process:

WS-C3560CG#event manager run ddns.tcl
invalid command name "Connection"
    while executing
"Connection to sshmyip.com closed by foreign host"
    invoked from within
"$slave eval $Contents"
    (procedure "eval_script" line 7)
    invoked from within
"eval_script slave $scriptname"
    invoked from within
"if {$security_level == 1} {       #untrusted script
     interp create -safe slave
     interp share {} stdin slave
     interp share {} stdout slave
..."
    (file "tmpsys:/lib/tcl/base.tcl" line 50)
Tcl policy execute failed: invalid command name "Connection"

WS-C3560CG#

 

Based on "if {$security_level == 1} {       #untrusted script I found:

https://supportforums.cisco.com/t5/network-management/eem-applet-help-appreciated/td-p/1411434

 

I think that my Script stucks on getting the IP since it takes between 2 to 3 seconds, what do you think?

 

Regards and thanks as always.

Try this:

::cisco::eem::event_register_none maxrun 35

#
# This EEM tcl policy was generated by the EEM applet conversion
# utility at http://www.marcuscom.com/convert_applet/
# using the following applet:
#
# event manager applet ddns authorization bypass
#  event none maxrun 35
#  action 000 cli command "enable"
#  action 001 cli command "ssh -l bogus sshmyip.com" pattern "}"
#  action 010 regexp "Your IP Address is ([0-9.]+)" "$_cli_result" match ip
#  action 015 puts "IP is $ip"
#

namespace import ::cisco::eem::*
namespace import ::cisco::lib::*

array set arr_einfo [event_reqinfo]


if [catch {cli_open} result] {
    error $result $errorInfo
} else {
    array set cli1 $result
}

if [catch {cli_exec $cli1(fd) "enable"} _cli_result] {
    error $_cli_result $errorInfo
}

if [catch {cli_write $cli1(fd) "ssh -l bogus sshmyip.com"} _cli_result] {
    error $_cli_result $errorInfo
}

if [catch {cli_read_pattern $cli1(fd) "\}"} _cli_result] {
    error $_cli_result $errorInfo
}

set _regexp_result [regexp {Your IP Address is ([0-9.]+)} $_cli_result match ip]
puts "IP is $ip"

# Close open cli before exit.
catch {cli_close $cli1(fd) $cli1(tty_id)} result

Hey Joe,

 

Thanks for the support. I added the TCL that you suggested but I don't see any result, actually when I run the applet I lose ssh prompt for about 15 seconds, I think because the script is running, here's my output from the log:

 

Log Buffer (16384 bytes):
.670 ET: [fh_tty_read_cmd] read not ready
Feb 20 09:43:16.769 ET: [fh_tty_read_cmd]
Feb 20 09:43:16.769 ET: [fh_tty_read_cmd] read not ready
Feb 20 09:43:16.874 ET: [fh_tty_read_cmd]
Feb 20 09:43:16.874 ET: [fh_tty_read_cmd] read not ready
Feb 20 09:43:16.974 ET: [fh_tty_read_cmd]

<<< SNIP >>>

Feb 20 09:43:33.468 ET: [fh_tty_read_cmd] read not ready
Feb 20 09:43:33.568 ET: [fh_tty_read_cmd]
WS-C3560CG#            Process Forced Exit- MAXRUN timer expired.
    while executing
"error $_cli_result $errorInfo"
    invoked from within
"$slave eval $Contents"
    (procedure "eval_script" line 7)
    invoked from within
"eval_script slave $scriptname"
    invoked from within
"if {$security_level == 1} {       #untrusted script
     interp create -safe slave
     interp share {} stdin slave
     interp share {} stdout slave
..."
    (file "tmpsys:/lib/tcl/base.tcl" line 50)
Tcl policy execute failed: Process Forced Exit- MAXRUN timer expired

 

Thanks

You have to increase the maxrun time of your Tcl policy.  The Tcl policy worked for me with a maxrun of 35.

Hello Joe,

 

By mistake, I forgot to apply authorization bypass. After I add that option on the policy everything went perfectly. Now I have 2 questions, I've been trying to manipulate the ddns with the update from the script that you sent:

 

::cisco::eem::event_register_none maxrun 35
#
#
# This EEM tcl policy was generated by the EEM applet conversion
# utility at http://www.marcuscom.com/convert_applet/
# using the following applet:
#
# event manager applet ddns authorization bypass
# event none maxrun 35
# action 000 cli command "enable"
# action 001 cli command "ssh -l bogus sshmyip.com" pattern "}"
# action 010 regexp "Your IP Address is ([0-9.]+)" "$_cli_result" match ip
# action 015 puts "IP is $ip"
#
#
#
namespace import ::cisco::eem::*
namespace import ::cisco::lib::*

array set arr_einfo [event_reqinfo]

set user "no-ip user"
set pass "no-ip password"
set fqdn "no-ip fqdn"

if [catch {cli_open} result] {
error $result $errorInfo
} else {
array set cli1 $result
}

if [catch {cli_exec $cli1(fd) "enable"} _cli_result] {
error $_cli_result $errorInfo
}

if [catch {cli_write $cli1(fd) "ssh -l bogus sshmyip.com"} _cli_result] {
error $_cli_result $errorInfo
}

if [catch {cli_read_pattern $cli1(fd) "\}"} _cli_result] {
error $_cli_result $errorInfo
}

set _regexp_result [regexp {Your IP Address is ([0-9.]+)} $_cli_result match ip]
#next line for troubleshooting purposes
puts "IP is $ip"

# Close open cli before exit.
#catch {cli_close $cli1(fd) $cli1(tty_id)} result

#
# Second part, get the no-ip http request
#

set ipinterface $ip
set url "http://$user:$pass@dynupdate.no-ip.com/nic/update?hostname=$fqdn&myip=$ip"
#next line for troubleshooting purposes
puts "http://$user:$pass@dynupdate.no-ip.com/nic/update?hostname=$fqdn&myip=$ip"

#
# Close open cli before exit.
#

catch {cli_close $cli1(fd) $cli1(tty_id)} result

set auth "Basic [base64::encode $user:$pass]"
set headerl [list Authorization $auth]

if {[catch {http::geturl $url -headers $headerl -queryblocksize 50 -type "text/plain" } token]} {
action_syslog priority info msg "http request failed"
} else {
action_syslog priority info msg "Response: [http::data $token]"
}

exit 0

 

The logs that I see when I run the TCL are:

 Feb 20 15:50:21.162 ET: fh_tcl_get_mode: mode = 1, StartupScript = tmpsys:/lib/tcl/base.tcl, RealScript = tmpsys:/eem_policy/ddns_full.tcl
Feb 20 15:50:21.162 ET: fh_set_tclpath_global: tcl_library is set to tmpsys:/lib/tcl
Feb 20 15:50:21.167 ET: fh_set_tclpath_global: auto_path is set to tmpsys:/eem_lib_user tmpsys:/eem_lib_system
Feb 20 15:50:21.225 ET: fh_register_evreg_cmds: tctx=7BE1E08, dummy=1
Feb 20 15:50:21.225 ET: fh_tcl_compile_policy: evaluating policy: startup_scriptname=tmpsys:/lib/tcl/base.tcl, real_scriptname=tmpsys:/eem_policy/ddns_full.tcl
Feb 20 15:50:21.235 ET: fh_tcl_slave_interp_init: interp=7968778, tctx=7BE1E08, fh_mode=1, real=tmpsys:/eem_policy/ddns_full.tcl, curr=ddns_full.tcl
Feb 20 15:50:21.267 ET: fh_register_evreg_cmds: tctx=7BE1E08, dummy=1
Feb 20 15:50:22.866 ET: [fh_event_reqinfo_cmd]
Feb 20 15:50:22.866 ET: [fh_process_event_reqinfo]
Feb 20 15:50:22.871 ET: [fh_event_reqinfo_cmd] event_trigger_num 1 event_id 9 job_id 2888 event_pub_sec 1519159821 event_pub_msec 157 event_pub_time 1519159821.157 event_type {131} event_type_string {none} event_severity {severity-normal} argc {0}
Feb 20 15:50:22.876 ET: [fh_cli_debug_cmd]
Feb 20 15:50:22.876 ET: [fh_tty_open_cmd]
Feb 20 15:50:22.887 ET: [fh_sys_reqinfo_routername_cmd]
Feb 20 15:50:22.903 ET: [fh_tty_read_cmd]
Feb 20 15:50:22.903 ET: [fh_tty_read_cmd] size= 2267
Feb 20 15:50:22.903 ET: [fh_tty_prompt_cmd]
Feb 20 15:50:23.128 ET: [fh_cli_debug_cmd]
Feb 20 15:50:23.133 ET: [fh_cli_debug_cmd]
Feb 20 15:50:23.133 ET: [fh_tty_write_cmd]
Feb 20 15:50:23.133 ET: [fh_tty_write_cmd] cmd = enable, cmdsize = 6
Feb 20 15:50:23.133 ET: [fh_sys_reqinfo_routername_cmd]
Feb 20 15:50:23.149 ET: [fh_tty_read_cmd]
Feb 20 15:50:23.149 ET: [fh_tty_read_cmd] size= 13
Feb 20 15:50:23.149 ET: [fh_tty_prompt_cmd]
Feb 20 15:50:23.254 ET: [fh_cli_debug_cmd]
Feb 20 15:50:23.254 ET: [fh_cli_debug_cmd]
Feb 20 15:50:23.254 ET: [fh_tty_write_cmd]
Feb 20 15:50:23.254 ET: [fh_tty_write_cmd] cmd = ssh -l bogus sshmyip.com, cmdsize = 24
Feb 20 15:50:23.264 ET: [fh_tty_read_cmd]
Feb 20 15:50:23.264 ET: [fh_tty_read_cmd] read not ready
Feb 20 15:50:23.364 ET: [fh_tty_read_cmd]
Feb 20 15:50:23.364 ET: [fh_tty_read_cmd] read not ready
Feb 20 15:50:23.469 ET: [fh_tty_read_cmd]
Feb 20 15:50:23.469 ET: [fh_tty_read_cmd] read not ready
Feb 20 15:50:23.610 ET: [fh_tty_read_cmd]
Feb 20 15:50:23.610 ET: [fh_tty_read_cmd] read not ready
Feb 20 15:50:23.736 ET: [fh_tty_read_cmd]
Feb 20 15:50:23.736 ET: [fh_tty_read_cmd] read not ready
Feb 20 15:50:23.836 ET: [fh_tty_read_cmd]
Feb 20 15:50:23.836 ET: [fh_tty_read_cmd] read not ready
Feb 20 15:50:23.993 ET: [fh_tty_read_cmd]
Feb 20 15:50:23.993 ET: [fh_tty_read_cmd] read not ready
Feb 20 15:50:24.108 ET: [fh_tty_read_cmd]
Feb 20 15:50:24.108 ET: [fh_tty_read_cmd] read not ready
Feb 20 15:50:24.234 ET: [fh_tty_read_cmd]
Feb 20 15:50:24.234 ET: [fh_tty_read_cmd] read not ready
Feb 20 15:50:24.334 ET: [fh_tty_read_cmd]
Feb 20 15:50:24.334 ET: [fh_tty_read_cmd] read not ready
Feb 20 15:50:24.439 ET: [fh_tty_read_cmd]
Feb 20 15:50:24.439 ET: [fh_tty_read_cmd] read not ready
Feb 20 15:50:24.549 ET: [fh_tty_read_cmd]
Feb 20 15:50:24.549 ET: [fh_tty_read_cmd] read not ready
Feb 20 15:50:24.654 ET: [fh_tty_read_cmd]
Feb 20 15:50:24.654 ET: [fh_tty_read_cmd] read not ready
Feb 20 15:50:24.753 ET: [fh_tty_read_cmd]
Feb 20 15:50:24.753 ET: [fh_tty_read_cmd] read not ready
Feb 20 15:50:24.853 ET: [fh_tty_read_cmd]
Feb 20 15:50:24.853 ET: [fh_tty_read_cmd] size= 236
Feb 20 15:50:24.968 ET: [fh_cli_debug_cmd]
Feb 20 15:50:24.984 ET: [fh_cli_debug_cmd]
Feb 20 15:50:24.984 ET: [fh_tty_close_cmd]
Feb 20 15:50:24.984 ET: [fh_cli_debug_cmd]
Feb 20 15:50:24.984 ET: [fh_tty_close_cmd]
Feb 20 15:50:25.802 ET: [fh_action_syslog_cmd]
Feb 20 15:50:25.802 ET: priority: 6
Feb 20 15:50:25.802 ET: %HA_EM-6-LOG: ddns_full.tcl: http request failed
Feb 20 15:50:25.802 ET: [fh_tcl_exit_cmd]
Feb 20 15:50:25.802 ET: [fh_tcl_exit_cmd] set _exit_code=0
Feb 20 15:50:25.823 ET: fh_tcl_assoc_data_delproc: freeing tctx=0x7BE1E08

 

 

Also how can I configure a timer that this TCL should run every 4 hours?

 

Thanks, I really appreciate your help.

I've never used this service, so I have no idea how the URLs are supposed to be constructed.  You might try using this URL in a tool like cURL to see what it gives you.  You might also try printing http::code and http:error to see what the server returns.

 

Note: if this is supposed to be a GET, you should omit -queryblocksize and -type.

Joe,

 

The base of the update is (example update request string):

http://username:password@dynupdate.no-ip.com/nic/update?hostname=mytest.testdomain.com&myip=1.2.3.4

 

This is kind of the same tool like dyndns: https://www.noip.com/integrate/request

 

If you use that URL that I sent (update request string) and put your credentials, automatically no-ip will update your public IP, for example, I use my credentials and when I hit enter the webpage responds as good with the IP that you just configured and their system will be updated:

 

Next webpage when I hit enter:

good 1.2.3.4

 

 Here's some output from the debugs:

Feb 21 10:30:29.240 ET: %HA_EM-6-LOG: ddns_full.tcl : DEBUG(cli_lib) : OUT : {
Feb 21 10:30:29.240 ET: %HA_EM-6-LOG: ddns_full.tcl : DEBUG(cli_lib) : OUT :
Feb 21 10:30:29.240 ET: %HA_EM-6-LOG: ddns_full.tcl : DEBUG(cli_lib) : OUT :

Feb 21 10:30:29.240 ET: %HA_EM-6-LOG: ddns_full.tcl : DEBUG(cli_lib) : OUT : "comment": "## Your IP Address is <<<OUTPUT OMMITED>>> (27139) ##",
Feb 21 10:30:29.240 ET: %HA_EM-6-LOG: ddns_full.tcl : DEBUG(cli_lib) : OUT :
Feb 21 10:30:29.240 ET: %HA_EM-6-LOG: ddns_full.tcl : DEBUG(cli_lib) : OUT :
Feb 21 10:30:29.240 ET: %HA_EM-6-LOG: ddns_full.tcl : DEBUG(cli_lib) : OUT : "family": "ipv4",
Feb 21 10:30:29.240 ET: %HA_EM-6-LOG: ddns_full.tcl : DEBUG(cli_lib) : OUT : "ip": "<<<OUTPUT OMMITED>>>",
Feb 21 10:30:29.240 ET: %HA_EM-6-LOG: ddns_full.tcl : DEBUG(cli_lib) : OUT : "port": "27139",
Feb 21 10:30:29.240 ET: %HA_EM-6-LOG: ddns_full.tcl : DEBUG(cli_lib) : OUT : "protocol": "ssh",
Feb 21 10:30:29.240 ET: %HA_EM-6-LOG: ddns_full.tcl : DEBUG(cli_lib) : OUT : "version": "v1.1.0",
Feb 21 10:30:29.240 ET: %HA_EM-6-LOG: ddns_full.tcl : DEBUG(cli_lib) : OUT : "website": "https://github.com/packetsar/checkmyip"
Feb 21 10:30:29.240 ET: %HA_EM-6-LOG: ddns_full.tcl : DEBUG(cli_lib) : OUT : }
Feb 21 10:30:29.261 ET: [fh_cli_debug_cmd]
Feb 21 10:30:29.261 ET: %HA_EM-6-LOG: ddns_full.tcl : DEBUG(cli_lib) : CTL : cli_close called.
Feb 21 10:30:29.261 ET: [fh_tty_close_cmd]
Feb 21 10:30:29.261 ET: [fh_cli_debug_cmd]
Feb 21 10:30:29.261 ET: %HA_EM-6-LOG: ddns_full.tcl : DEBUG(cli_lib) : CTL : cli_close called.
Feb 21 10:30:29.261 ET: [fh_tty_close_cmd]
Feb 21 10:30:29.712 ET:
Feb 21 10:30:29.712 ET: tty is now going through its death sequence
Feb 21 10:30:30.079 ET: [fh_action_syslog_cmd]
Feb 21 10:30:30.079 ET: priority: 6
Feb 21 10:30:30.079 ET: %HA_EM-6-LOG: ddns_full.tcl: http request failed
Feb 21 10:30:30.079 ET: [fh_tcl_exit_cmd]
Feb 21 10:30:30.079 ET: [fh_tcl_exit_cmd] set _exit_code=0
Feb 21 10:30:30.079 ET: fh_server: fh_io_ipc_msg: received msg FH_MSG_API_CLOSE from client 3273 pclient 3273
Feb 21 10:30:30.079 ET: fh_io_ipc_msg: received FH_MSG_API_CLOSE client=3273
Feb 21 10:30:30.100 ET: fh_tcl_assoc_data_delproc: freeing tctx=0x7AF8E4C
Feb 21 10:30:30.488 ET: received SIGCHLD pulse from child death pid=223
Feb 21 10:30:30.488 ET: received pulse from child death code=1; epc=0x7BE141C
Feb 21 10:30:30.488 ET: EEM policy ddns_full.tcl has completed with normal exit status of 0x0 exec_status=2 event_completion=0
Feb 21 10:30:30.488 ET: fh_reg_send_msg_to_fd server sending FH_MSG_EVENT_PUBLISH_DONE message to FD:none xos_ipc_sync_send to fdc->eph = 1245202)

Beyond what I already said, you don't need the username and password in the URL if you're passing a Basic auth header.  If you've fixed your use of the Tcl as I've said, and you still have problems you'll need to print those additional diagnostics or use a packet capture tool to figure out why it's not working.

Review Cisco Networking for a $25 gift card