Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Lorenzo Martinico
slapos
Commits
163d5ce0
Commit
163d5ce0
authored
Jan 23, 2018
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
grafana: enable instance parameters to send emails
parent
44e5127a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
106 additions
and
10 deletions
+106
-10
software/grafana/README.md
software/grafana/README.md
+0
-1
software/grafana/buildout.hash.cfg
software/grafana/buildout.hash.cfg
+2
-2
software/grafana/grafana-config-file.cfg.in
software/grafana/grafana-config-file.cfg.in
+14
-7
software/grafana/instance-input-schema.json
software/grafana/instance-input-schema.json
+33
-0
software/grafana/instance-output-schema.json
software/grafana/instance-output-schema.json
+42
-0
software/grafana/instance.cfg.in
software/grafana/instance.cfg.in
+1
-0
software/grafana/software.cfg.json
software/grafana/software.cfg.json
+14
-0
No files found.
software/grafana/README.md
View file @
163d5ce0
...
...
@@ -28,7 +28,6 @@ before using grafana, but using proxy seems easier.
## TODO
*
make a configuration option to send emails (to invite users)
*
influxdb and telegraf runs with very low priority, this could become an option
*
make one partition for each service and use switch software type
*
make it easier to add custom configuration (how ?)
software/grafana/buildout.hash.cfg
View file @
163d5ce0
...
...
@@ -16,7 +16,7 @@
[instance-profile]
filename = instance.cfg.in
md5sum =
39bbc8593d030634f51af8baa80b23ed
md5sum =
e056fb1146c1e741e99a4a713cb65767
[influxdb-config-file]
filename = influxdb-config-file.cfg.in
...
...
@@ -28,4 +28,4 @@ md5sum = a1a9c22c2a7829c66a49fc2504604d21
[grafana-config-file]
filename = grafana-config-file.cfg.in
md5sum =
ce89a2a93e3b55adde9bedbea13208a
c
md5sum =
121233d1f376913141aecc44e17f0c5
c
software/grafana/grafana-config-file.cfg.in
View file @
163d5ce0
...
...
@@ -334,16 +334,23 @@ allow_sign_up = true
#################################### SMTP / Emailing #####################
[smtp]
enabled = false
host = localhost:25
user =
#enabled = false
enabled = {{ slapparameter_dict.get('smtp-server') and 'true' or 'false' }}
#host = locahost:25
host = {{ slapparameter_dict.get('smtp-server', '') }}
#user =
user = {{ slapparameter_dict.get('smtp-username', '') }}
# If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
password =
#password =
password = {{ slapparameter_dict.get('smtp-password', '') and '"""%s"""' % slapparameter_dict['smtp-password'] or ""}}
cert_file =
key_file =
skip_verify = false
from_address = admin@grafana.localhost
from_name = Grafana
#skip_verify = false
skip_verify = {{ slapparameter_dict.get('smtp-verify-ssl', True) and 'false' or 'true' }}
#from_address = admin@grafana.localhost
from_address = {{ slapparameter_dict.get('email-from-address', '') }}
#from_name = Grafana
from_name = {{ slapparameter_dict.get('email-from-name', 'Grafana') }}
ehlo_identity =
[emails]
...
...
software/grafana/instance-input-schema.json
0 → 100644
View file @
163d5ce0
{
"$schema"
:
"http://json-schema.org/draft-04/schema#"
,
"description"
:
"Parameters to instantiate Grafana"
,
"additionalProperties"
:
false
,
"properties"
:
{
"smtp-server"
:
{
"description"
:
"SMTP server used by grafana to send emails (in host:port format). Leaving this empty will disable email sending."
,
"type"
:
"string"
},
"smtp-username"
:
{
"description"
:
"Username to connect to SMTP server"
,
"type"
:
"string"
},
"smtp-password"
:
{
"description"
:
"Password to connect to SMTP server"
,
"type"
:
"string"
},
"smtp-verify-ssl"
:
{
"description"
:
"Verify SSL certificate of SMTP server"
,
"type"
:
"boolean"
,
"default"
:
true
},
"email-from-address"
:
{
"description"
:
"Email address used in From: header of emails"
,
"type"
:
"string"
},
"email-from-name"
:
{
"description"
:
"Name used in From: header of emails"
,
"default"
:
"Grafana"
,
"type"
:
"string"
}
}
}
software/grafana/instance-output-schema.json
0 → 100644
View file @
163d5ce0
{
"$schema"
:
"http://json-schema.org/draft-04/schema#"
,
"description"
:
"Values returned by Grafana instantiation"
,
"additionalProperties"
:
false
,
"properties"
:
{
"url"
:
{
"description"
:
"IPv6 URL to access grafana"
,
"pattern"
:
"^https://"
,
"type"
:
"string"
},
"grafana-username"
:
{
"description"
:
"Admin user for grafana"
,
"type"
:
"string"
},
"grafana-password"
:
{
"description"
:
"Password for grafana's admin user"
,
"type"
:
"string"
},
"influxdb-url"
:
{
"description"
:
"IPv6 URL of influxdb HTTP endpoint"
,
"pattern"
:
"^https://"
,
"type"
:
"string"
},
"influxdb-database"
:
{
"description"
:
"database created in influxdb"
,
"type"
:
"string"
},
"influxdb-username"
:
{
"description"
:
"username for influxdb"
,
"type"
:
"string"
},
"influxdb-password"
:
{
"description"
:
"password for influxdb user"
,
"type"
:
"string"
},
"telegraf-extra-config-dir"
:
{
"description"
:
"Directory in telegraf partition where extra configuration file will be loaded. These files must match *.conf pattern"
,
"type"
:
"string"
}
},
"type"
:
"object"
}
software/grafana/instance.cfg.in
View file @
163d5ce0
...
...
@@ -143,6 +143,7 @@ recipe = slapos.cookbook:generate.password
<= config-file
context =
section grafana grafana
key slapparameter_dict slap-configuration:configuration
[grafana-listen-promise]
<= check-port-listening-promise
...
...
software/grafana/software.cfg.json
0 → 100644
View file @
163d5ce0
{
"name"
:
"Grafana"
,
"description"
:
"Grafana, Telegraf and Influxdb"
,
"serialisation"
:
"json-in-xml"
,
"software-type"
:
{
"default"
:
{
"title"
:
"Default"
,
"description"
:
"Grafana, Telegraf and Influxdb in same partition"
,
"request"
:
"instance-input-schema.json"
,
"response"
:
"instance-output-schema.json"
,
"index"
:
0
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment