This run-anywhere query should get you started.
| makeresults
| eval _raw="Source of attack Country count
50.17.98.189 Ireland 9602
159.89.48.18 Canada 2200
221.151.26.232 Republic of Korea 1437
84.39.116.10 United Kingdom 1372
"
| multikv
```Above just sets up test data```
| sort - count
```Add average and total fields to the results```
| appendpipe
[ stats avg(count) as Avg, sum(count) as Total ]
```Put the Total field on top so the filldown command works```
| reverse
```Put the Total field in every event```
| filldown Total
```Calculate the percentage for each source
| eval pct=round(count*100/Total,2)
```Restore the original order```
| reverse
```Remove unneeded field```
| fields - Total
Here's your query combined with mine
index=abc
| iplocation src_IP
| stats count by src ,Country
| sort - count
| head 1000
| appendpipe
[ stats avg(count) as Avg, sum(count) as Total ]
| reverse
| filldown Total
| eval pct=round(count*100/Total,2)
| reverse
| fields - Total