Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Konstantin A
tower
Commits
972e7b84
Commit
972e7b84
authored
Mar 07, 2018
by
Aleksey Shirokih
Browse files
Add monitoring to migration scripts
parent
2a40bac5
Changes
2
Hide whitespace changes
Inline
Side-by-side
tower/migrations/032_add_default_roles.py
View file @
972e7b84
...
...
@@ -45,6 +45,12 @@ DEFAULT_ROLES = [
"description"
:
"Web interface for NSQd"
,
"link"
:
"git+https://code.getnoc.com/ansible-roles/ansible-role-nsqadmin.git"
,
"is_enabled"
:
False
},
{
"name"
:
"Monitoring"
,
"description"
:
"Self-monitroing"
,
"link"
:
"git+https://code.getnoc.com/ansible-roles/ansible-role-monitoring.git"
,
"is_enabled"
:
False
}
]
...
...
@@ -136,6 +142,15 @@ def migrate(migrator):
n_backup_instances
=
0
,
loglevel
=
"info"
).
save
()
Service
(
environment
=
env
.
id
,
service
=
"monitoring"
,
pool
=
None
,
node
=
n
.
id
,
n_instances
=
1
,
n_backup_instances
=
0
,
loglevel
=
"info"
).
save
()
config
=
yaml
.
load
(
env
.
service_config
)
config
[
None
][
"telegraf"
]
=
{
"telegraf_output_plugin"
:
"influx"
...
...
tower/migrations/035_remove_instances.py
View file @
972e7b84
...
...
@@ -66,7 +66,8 @@ def migrate(migrator):
'nsqadmin'
,
'influxdb'
,
'clickhouse'
,
'consultemplate'
'consultemplate'
,
'monitoring'
)
backaped_services
=
(
'discovery'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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