Skip to content

Instantly share code, notes, and snippets.

@ryan-williams
Last active June 9, 2016 08:11
Show Gist options
  • Save ryan-williams/21fe3d602e6e83c76063 to your computer and use it in GitHub Desktop.
Save ryan-williams/21fe3d602e6e83c76063 to your computer and use it in GitHub Desktop.
Grafana quick-start files
worker_processes 1;
pid <home>/logs/nginx.pid;
events {
worker_connections 1024;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
server_tokens off;
server_names_hash_bucket_size 32;
include <nginx install dir>/conf/mime.types;
default_type application/octet-stream;
access_log <nginx install dir>/access.log;
error_log <nginx install dir>/error.log;
gzip on;
gzip_disable "msie6";
server {
listen 8090 default_server;
server_name <hostname grafana will run on>;
root <grafana source root>/src/;
location / {
index index.html;
}
}
// Use port 8091 as a proxy to YARN RM JSON API.
server {
listen 8091;
server_name <hostname grafana will run on>; // in my case this is demeter-login2.demeter.hpc.mssm.edu
add_header Access-Control-Allow-Origin "<hostname grafana will run on>";
location / {
proxy_pass http://demeter-mgmt1.demeter.hpc.mssm.edu:8088;
}
}
}
// == Configuration
// config.js is where you will find the core Grafana configuration. This file contains parameter that
// must be set before Grafana is run for the first time.
define(['settings'], function(Settings) {
"use strict";
return new Settings({
// Graphite & Elasticsearch example setup
datasources: {
graphite: {
type: 'graphite',
url: "https://<graphite host>:<graphite port>"
},
elasticsearch: {
type: 'elasticsearch',
url: "http://<elasticsearch host>:<elasticsearch port>",
index: 'grafana-dash',
grafanaDB: true
}
},
/* Global configuration options
* ========================================================
*/
// specify the limit for dashboard search results
search: {
max_results: 100
},
// default home dashboard
default_route: '/dashboard/file/default.json',
// set to false to disable unsaved changes warning
unsaved_changes_warning: true,
// set the default timespan for the playlist feature
// Example: "1m", "1h"
playlist_timespan: "1m",
// If you want to specify password before saving, please specify it below
// The purpose of this password is not security, but to stop some users from accidentally changing dashboards
admin: {
password: ''
},
// Change window title prefix from 'Grafana - <dashboard title>'
window_title_prefix: 'Grafana - ',
// Add your own custom panels
plugins: {
// list of plugin panels
panels: [],
// requirejs modules in plugins folder that should be loaded
// for example custom datasources
dependencies: [],
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment