grafana configuration
This commit is contained in:
parent
4b6c866f20
commit
9a5790509f
3 changed files with 83 additions and 11 deletions
17
README.md
17
README.md
|
@ -7,7 +7,22 @@ A beautiful, easy to use and feature rich Graphite dashboard replacement and gra
|
||||||
|
|
||||||
grafana:
|
grafana:
|
||||||
server:
|
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
|
## Read more
|
||||||
|
|
||||||
|
|
51
conf/config.js
Normal file
51
conf/config.js
Normal 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'
|
||||||
|
]
|
||||||
|
});
|
||||||
|
});
|
26
server.sls
26
server.sls
|
@ -10,25 +10,31 @@ include:
|
||||||
- mode: 755
|
- mode: 755
|
||||||
- makedirs: true
|
- makedirs: true
|
||||||
|
|
||||||
|
{% if pillar.grafana.server.source.type == 'git' %}
|
||||||
|
|
||||||
grafana_repository:
|
grafana_repository:
|
||||||
git.latest:
|
git.latest:
|
||||||
- name: https://github.com/torkelo/grafana.git
|
- name: {{ pillar.grafana.server.source.address }}
|
||||||
- rev: master
|
- rev: {{ pillar.grafana.server.source.rev }}
|
||||||
- target: /srv/grafana/site
|
- target: /srv/grafana/site
|
||||||
- require:
|
- require:
|
||||||
- file: /srv/grafana
|
- file: /srv/grafana
|
||||||
- pkg: git_packages
|
- pkg: git_packages
|
||||||
|
|
||||||
{#
|
grafana_install:
|
||||||
/srv/grafana/sites/{{ app.name }}/config/configuration.yml:
|
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:
|
file:
|
||||||
- managed
|
- managed
|
||||||
- source: salt://grafana/conf/configuration.yml
|
- source: salt://grafana/conf/config.js
|
||||||
- template: jinja
|
- template: jinja
|
||||||
- defaults:
|
|
||||||
app_name: "{{ app.name }}"
|
|
||||||
- require:
|
|
||||||
- hg: repo-{{ app.name }}
|
|
||||||
#}
|
|
||||||
|
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
Loading…
Reference in a new issue