Learn How We Can Help You Keep Teleworkers Protected During the COVID-19 Crisis

Network Change & Configuration Management

Reply
Highlighted

How do I loop but avoid message *** ERROR: Infinate loop detected

Techie
Posts: 1
2631     0

Final goal: perform "show failover" on a Cisco ASA every 60 seconds, up to 10 times, awaiting the other unit to come up properly.  However, for this test I would be fine doing a "show clock" 10 times in a row with one looping trigger.

So, how do I loop a few times?  Can I scp the file over to the NetMRI box?  Can I upload and save via the perl interface without causing it to check my code for infinite loops?  Thanks for any suggestions. And no, I do NOT want to wait the full 10 minutes and check once, that is a waste of time the process I'm waiting for will probably complete in just a few minutes.

Warning I receive: *** ERROR: Infinate loop detected 'Create User Password Line -> check clock again -> check clock reset -> check clock again' *** 

Example trigger:

#########################################################################
Trigger:
check clock again

Trigger-Description:
Example loop of asking for show clock output 10 times in a row
 
Trigger-Variables:
$EZname2 /.*E[DS]T.*/
 
Trigger-Template:
$EZname2

Trigger-Commands: { $counter < 10 }
show clock
EXPR: $counter = $counter + 1

SLEEP: 60


LOG-INFO: 4. Counter incremented

Output-Triggers:
check clock again

###########################

Regards,

David
Highlighted

David,

Adviser
Posts: 417
2631     0

David,

Can you please email me the script?  I sent you an email yesterday.

 

Thanks,

Sif

Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh
Highlighted

Re: How do I loop but avoid message *** ERROR: Infinate loop detected

Authority
Posts: 21
2631     0

Hello David,

did you receive answer for this question?

Regards

Darek

Highlighted

Re: How do I loop but avoid message *** ERROR: Infinate loop detected

Adviser
Posts: 417
2631     0

It won't let you call it again Smiley Happy

Here is one way

#########################################################################
Trigger:
check clock again

Trigger-Description:
Example loop of asking for show clock output 10 times in a row
 
Trigger-Variables:
$EZname2 /.*E[DS]T.*/
 
Trigger-Template:
$EZname2

Trigger-Commands: { $counter < 10 }
show clock
EXPR: $counter = $counter + 1

SLEEP: 60


LOG-INFO: 4. Counter incremented

 

Trigger:
check clock again2

Trigger-Description:
Example loop of asking for show clock output 10 times in a row
 
Trigger-Variables:
$EZname3 /.*E[DS]T.*/
 
Trigger-Template:
$EZname3

Trigger-Commands: { $counter < 10 }
show clock
EXPR: $counter = $counter + 1

LOG-INFO: 4. Counter incremented

 

###########################

 

 

Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh
Highlighted

Re: How do I loop but avoid message *** ERROR: Infinate loop detected

Authority
Posts: 21
2631     0

Thanks Sif,

but in your example are two different triggers without any output-trigger. I'd like to find a way to use schema like below, for $counter =10 Trigger-Filter condition is not met and trigger example1 is ended.

Trigger example1

 

Trigger-Variables:
$EZname2 /.*E[DS]T.*/
 
Trigger-Template:
$EZname2

 

 

Trigger-filter:

$counter < 10

 

Trigger-command:

show clock

EXPR: $counter = $counter + 1

SLEEP: 60

 

Trigger-output:

example1

 

Thank You

Darek

 

 

Highlighted

Re: How do I loop but avoid message *** ERROR: Infinate loop detected

Adviser
Posts: 417
2631     0

After Actions

 

Trigger-Output:

check clock again

 

check clock again2

 

Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh
Showing results for 
Search instead for 
Do you mean 

Recommended for You