Slide 21
Slide 21 text
---
name: http_status_codes
description: Show sorted http status codes from nginx logs
runner_type: local-shell-cmd
entry_point: ""
enabled: true
parameters:
sudo:
immutable: true
default: true
kwarg_op:
immutable: true
cmd:
description: "Command to run"
type: string
immutable: true
default: "/opt/stackstorm/virtualenvs/ansible/bin/ansible {{hosts|replace('http://','')}}
--become -m shell -a \"awk '{print \\$9}' /var/log/nginx/access.log
|sort |uniq -c |sort -k1,1nr 2>/dev/null|column -t\""
hosts:
description: "Ansible hosts"
type: string
required: true
actions/http_status_codes.yaml
実行の内容
"/opt/stackstorm/virtualenvs/ansible/bin/ansible
{{hosts|replace('http://','')}} --become -m shell -a \
"awk '{print \\$9}' /var/log/nginx/access.log
|sort |uniq -c |sort -k1,1nr 2>/dev/null|column -t\""