Created
November 7, 2014 01:22
-
-
Save itorres/e8f242e292689d1ae6c2 to your computer and use it in GitHub Desktop.
Count wrong registrations by IP in an asterisk logfile
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
# model: | |
# [Nov 4 12:26:52] NOTICE[416] chan_sip.c: Registration from '"x" <sip:[email protected]:5060>' failed for '1.2.3.4' - No matching peer found | |
awk '/failed for/ {count[$12]++}END{for (j in count) printf "%8i %s\n", count[j],j }' messages|sort -n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment