I want to show the largest report sizes for agents. Please write a script to scrape Puppet server access logs for the largest report submitted per agent.
awk '$7 ~ "/report/" { split($7,s,"?"); n = split(s[1], t, "/"); if ($(NF-1) > seen[t[n]]) { seen[t[n]] = $(NF-1) }} END { for (i in seen) { print seen[i], i} }' logs/puppetserver/puppetserver-access.log | sort -rn | head
I want to show the largest report sizes for agents. Please write a script to scrape Puppet server access logs for the largest report submitted per agent.