You could use a timer event and periodically check the output bytes to see if you hit the 10GB limit. The logic would be to run something like:
show int cell0 | inc packets output
Then parse the result to get the byte:
regexp {output, (\d+) bytes} $_cli_result -> bytes
Then set bytes to a floating point number:
set bytes "${bytes}.0"
Then divide to get GB:
set gbytes [expr $bytes / 1024.0 / 1024.0 / 1024.0]
Then test to see if it's above your threshold:
if { $bytes >= 10.0 } {
# Perform CLI to fail over to backup link
}
Given the potential for large numbers, I think you'll need Tcl for this solution.