1
0
Fork 0
mirror of synced 2024-11-22 00:45:34 -05:00

grafana configuration

This commit is contained in:
Ales Komarek 2014-02-24 23:14:45 +01:00
parent 4b6c866f20
commit 9a5790509f
3 changed files with 83 additions and 11 deletions

View file

@ -7,7 +7,22 @@ A beautiful, easy to use and feature rich Graphite dashboard replacement and gra
grafana:
server:
enabled: trues
enabled: true
source:
type: 'git'
address: https://github.com/torkelo/grafana.git
rev: v1.4.0
elasticsearch:
host: localhost
port: 9200
data:
- name: metrics1
type: graphite
host: metrics1.domain.com
ssl: true
port: 443
user: test
name: user
## Read more

51
conf/config.js Normal file
View file

@ -0,0 +1,51 @@
/** @scratch /configuration/config.js/1
* == Configuration
* config.js is where you will find the core Grafana configuration. This file contains parameter that
* must be set before kibana is run for the first time.
*/
define(['settings'],
function (Settings) {
"use strict";
return new Settings({
/**
* elasticsearch url:
* For Basic authentication use: http://username:password@domain.com:9200
*/
elasticsearch: "http://{{ pillar.grafana.server.elasticsearch.host }}:{{ pillar.grafana.server.elasticsearch.port }}",
/**
* graphite-web url:
* For Basic authentication use: http://username:password@domain.com
* Basic authentication requires special HTTP headers to be configured
* in nginx or apache for cross origin domain sharing to work (CORS).
* Check install documentation on github
*/
graphiteUrl: "http://"+window.location.hostname+":8080",
/**
* Multiple graphite servers? Comment out graphiteUrl and replace with
*
* datasources: {
* data_center_us: { type: 'graphite', url: 'http://<graphite_url>', default: true },
* data_center_eu: { type: 'graphite', url: 'http://<graphite_url>' }
* }
*/
default_route: '/dashboard/file/default.json',
/**
* If your graphite server has another timezone than you & users browsers specify the offset here
* Example: "-0500" (for UTC - 5 hours)
*/
timezoneOffset: null,
grafana_index: "grafana-dash",
panel_names: [
'text',
'graphite'
]
});
});

View file

@ -10,25 +10,31 @@ include:
- mode: 755
- makedirs: true
{% if pillar.grafana.server.source.type == 'git' %}
grafana_repository:
git.latest:
- name: https://github.com/torkelo/grafana.git
- rev: master
- name: {{ pillar.grafana.server.source.address }}
- rev: {{ pillar.grafana.server.source.rev }}
- target: /srv/grafana/site
- require:
- file: /srv/grafana
- pkg: git_packages
{#
/srv/grafana/sites/{{ app.name }}/config/configuration.yml:
grafana_install:
cmd.run:
- name: npm install
- cwd: /srv/grafana/site
- unless: test -e /srv/grafana/site/node_modules
- require:
- git: grafana_repository
{% endif %}
/srv/grafana/site/src/config.js:
file:
- managed
- source: salt://grafana/conf/configuration.yml
- source: salt://grafana/conf/config.js
- template: jinja
- defaults:
app_name: "{{ app.name }}"
- require:
- hg: repo-{{ app.name }}
#}
{%- endif %}