Created
August 1, 2014 06:36
-
-
Save kidach1/baaa53b1601ceb6df99b to your computer and use it in GitHub Desktop.
運用中のAPIに対するリクエストがこけていた場合にログから抜き出してリトライするワンライナー ref: http://qiita.com/kidachi_/items/7568739f4a566e3ec8ad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93.184.216.119 - - [08/Apr/2014:11:30:15 +0900] "GET /api/v1/items HTTP/1.1" 500 4373 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat /var/log/nginx/access.log |grep "/api/v1/items" | awk '{print "curl -i \"http://example.com" $7 "\" >/dev/null"}' | bash | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
105 1270 105 1270 0 0 6337 0 --:--:-- --:--:-- --:--:-- 12828 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment