Need bash solution which logs only the pertinent results of down hops during a network outage.
-When network outage occurs, run continuously. check for target IP during outage. End once target IP is back and outage is over.
-Monitor hop/s down and/or loss details.
In the following example from another question posted on this site;
-An outage occurs, cannot reach the target IP anymore
-Hop 6 goes down but then comes back
-Hop 5 goes down but then comes back
-Hop 7 goes down but then comes back
-Target IP is back, outage is over, end of function/script
Script should strip everything but the following;
-id1 timestamp - outage
-id2 timestamp - 5. ae-1.ebr1.Washington1.Level3.ne (last hop reachable) or hop 6 down and/or loss%
-id3 timestamp - 4. ae-2.ebr2.Washington1.Level3.ne (last hop reachable) or hop 5 down and/or loss%
-id4 timestamp - 6. ge-3-0-0-53.gar1.Washington1.Le (last hop reachable) or hop 7 down and/or loss%
-id5 timestamp -end of outage
I only have ping and paris-traceroute available to me on the OS.
There must be someone on this site who can accomplish this. I've tried paying people, I've tried various things myself, I've tried posting here and I've been pulling my hair out.