Skip to content
Permalink
Browse files

Code for step 5

  • Loading branch information...
akoutmos committed Aug 21, 2019
1 parent 070bee0 commit 70161da2e0ce749312f155c8630d8034fcb43e3b
@@ -30,7 +30,45 @@ services:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres

grafana:
image: grafana/grafana:6.3.3
depends_on:
- prometheus
ports:
- '3000:3000'
volumes:
- grafana-data:/var/lib/grafana
- ./docker/grafana/:/etc/grafana/provisioning/
env_file:
- ./docker/grafana/.env

prometheus:
image: prom/prometheus:v2.11.2
ports:
- '9090:9090'
volumes:
- ./docker/prometheus/:/etc/prometheus/
- prometheus-data:/prometheus
command:
- '--config.file=/etc/prometheus/config.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'

postgres_exporter:
image: wrouesnel/postgres_exporter:v0.5.1
ports:
- '9187:9187'
depends_on:
- postgres
environment:
DATA_SOURCE_USER: postgres
DATA_SOURCE_PASS: postgres
DATA_SOURCE_URI: postgres:5432/?sslmode=disable

volumes:
elixir-deps: {}
elixir-build: {}
postgres-data: {}
prometheus-data: {}
grafana-data: {}
@@ -0,0 +1,3 @@
GF_SECURITY_ADMIN_PASSWORD=admin
GF_USERS_ALLOW_SIGN_UP=false
GF_INSTALL_PLUGINS=grafana-worldmap-panel
@@ -0,0 +1,157 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"description": "Dashboard for application specific Statistics.",
"editable": true,
"gnetId": null,
"graphTooltip": 1,
"links": [],
"panels": [
{
"cards": {
"cardPadding": null,
"cardRound": null
},
"color": {
"cardColor": "#b4ff00",
"colorScale": "sqrt",
"colorScheme": "interpolateOranges",
"exponent": 0.5,
"mode": "spectrum"
},
"dataFormat": "tsbuckets",
"datasource": "prometheus",
"description": "Within what radius are users commonly searching",
"gridPos": {
"h": 12,
"w": 24,
"x": 0,
"y": 0
},
"heatmap": {},
"hideZeroBuckets": true,
"highlightCards": true,
"id": 4,
"legend": {
"show": false
},
"options": {},
"reverseYBuckets": false,
"targets": [
{
"expr": "sum(increase(elixir_app_radius_search_bucket[5m])) by (le)",
"format": "heatmap",
"instant": false,
"legendFormat": "{{ le }}",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Zip code search radius",
"tooltip": {
"show": true,
"showHistogram": false
},
"type": "heatmap",
"xAxis": {
"show": true
},
"xBucketNumber": null,
"xBucketSize": null,
"yAxis": {
"decimals": null,
"format": "lengthmi",
"logBase": 1,
"max": null,
"min": null,
"show": true,
"splitFactor": null
},
"yBucketBound": "auto",
"yBucketNumber": null,
"yBucketSize": null
},
{
"circleMaxSize": "10",
"circleMinSize": "2",
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
"datasource": "prometheus",
"decimals": 0,
"description": "Within what zip codes are users commonly searching",
"esMetric": "Count",
"gridPos": {
"h": 16,
"w": 24,
"x": 0,
"y": 12
},
"hideEmpty": false,
"hideZero": false,
"id": 2,
"initialZoom": "7",
"locationData": "table",
"mapCenter": "custom",
"mapCenterLatitude": "47.4",
"mapCenterLongitude": "-120.7401",
"maxDataPoints": 1,
"mouseWheelZoom": true,
"options": {},
"showLegend": false,
"stickyLabels": false,
"tableQueryOptions": {
"geohashField": "geohash",
"labelField": "zip_code",
"latitudeField": "latitude",
"longitudeField": "longitude",
"metricField": "Value",
"queryType": "geohash"
},
"targets": [
{
"expr": "elixir_app_zip_code_search",
"format": "table",
"instant": true,
"refId": "A"
}
],
"thresholds": "0,10",
"timeFrom": null,
"timeShift": null,
"title": "Zip code search map",
"type": "grafana-worldmap-panel",
"unitPlural": "",
"unitSingle": "",
"valueName": "total"
}
],
"refresh": "5s",
"schemaVersion": 19,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-1h",
"to": "now"
},
"timepicker": {
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
},
"timezone": "",
"title": "Brewery Search",
"uid": "vuTsSjdWk",
"version": 3
}

0 comments on commit 70161da

Please sign in to comment.
You can’t perform that action at this time.