5 years ago
FirePower Config Source
The current Cisco IOS config source does not work for firepower. I tried my own hand at writing a config source for the FirePower series of Cisco Firewalls but ran into a snag and could never get ...
Hey, you have comments. Your coding is better than 80% of the code out there. ?
Take a look at https://github.com/sweenig/monitoring-recipes/blob/master/DataSources/Groovy/Expect/Groovy_Expect_Example.groovy
You've got "ssh_connection.expect("> ");" commented out, but I would look to see if you can use that as it helps your script gain landmarks to know where it is at any point (and avoids guessing that 20 seconds is long enough to get the output). You should then be able to use the .before() method to grab everything between .expect() calls.
Yes, your output should just be printed ("println(output)") instead of just setting the value of the printline variable to 1.