sudo cp /etc/kong/kong.conf.default /etc/kong/kong.conf
add the following:
admin_listen = 0.0.0.0:8001
database = postgres
pg_host = 127.0.0.1
pg_port = 5432
pg_user = kong
pg_password = kong
pg_database = kong
Run Kong migrations and Kong
sudo kong migrations up
sudo kong start
Then on local box run
./setup_api.sh
cat < /tmp/statsd_exporter-0.6.0.linux-amd64/statsd.rules mappings: #proxied requests
match: kong...*.size name: "size" labels: job: "kong" api: "$2" phase: "$3" environment: "$1" EOF
Run the exporter
/tmp/statsd_exporter-0.6.0.linux-amd64$ ./statsd_exporter -statsd.mapping-config statsd.rules
## Configure prometheus
Add the following lines to the end of /etc/prometheus/prometheus.yml and sudo systemctl restart prometheus
job_name: 'statsd' target_groups:
targets: ['localhost:9102']
Restart Prometheus
sudo /etc/init.d/prometheus restart ```