|
@@ -4,7 +4,9 @@
|
|
|
|
|
|
## Configure Kong
|
|
## Configure Kong
|
|
|
|
|
|
-- sudo cp /etc/kong/kong.conf.default /etc/kong/kong.conf
|
|
|
|
|
|
+```
|
|
|
|
+sudo cp /etc/kong/kong.conf.default /etc/kong/kong.conf
|
|
|
|
+```
|
|
|
|
|
|
add the following:
|
|
add the following:
|
|
|
|
|
|
@@ -18,11 +20,16 @@ pg_password = kong
|
|
pg_database = kong
|
|
pg_database = kong
|
|
|
|
|
|
```
|
|
```
|
|
-
|
|
|
|
sudo kong migrations up
|
|
sudo kong migrations up
|
|
sudo kong start
|
|
sudo kong start
|
|
|
|
+```
|
|
|
|
|
|
|
|
+Then on local box run
|
|
```
|
|
```
|
|
|
|
+./setup_api.sh
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+## Configure Statsd Exporter
|
|
cat <<EOF > /tmp/statsd_exporter-0.6.0.linux-amd64/statsd.rules
|
|
cat <<EOF > /tmp/statsd_exporter-0.6.0.linux-amd64/statsd.rules
|
|
mappings:
|
|
mappings:
|
|
#proxied requests
|
|
#proxied requests
|
|
@@ -66,6 +73,7 @@ Run the exporter
|
|
/tmp/statsd_exporter-0.6.0.linux-amd64$ ./statsd_exporter -statsd.mapping-config statsd.rules
|
|
/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
|
|
Add the following lines to the end of /etc/prometheus/prometheus.yml and sudo systemctl restart prometheus
|
|
|
|
|
|
```
|
|
```
|
|
@@ -74,9 +82,13 @@ Add the following lines to the end of /etc/prometheus/prometheus.yml and sudo sy
|
|
- targets: ['localhost:9102']
|
|
- targets: ['localhost:9102']
|
|
```
|
|
```
|
|
|
|
|
|
|
|
+Restart Prometheus
|
|
|
|
+```
|
|
sudo /etc/init.d/prometheus restart
|
|
sudo /etc/init.d/prometheus restart
|
|
|
|
+```
|
|
|
|
|
|
|
|
+## Configure Grafana
|
|
|
|
|
|
-0) Login to localhost:3000 admin/admin
|
|
|
|
-1) Setup the prometheus data source ( Type: prometheus / URL http://localhost:9090/ / Access proxy )
|
|
|
|
-2) import the example dashboard (dashboard.json)
|
|
|
|
|
|
+- Login to localhost:3000 admin/admin
|
|
|
|
+- Setup the prometheus data source ( Type: prometheus / URL http://localhost:9090/ / Access proxy )
|
|
|
|
+- import the example dashboard (dashboard.json)
|