Skip to content

Commit 038053d

Browse files
committed
Fixes #26
1 parent fff1376 commit 038053d

File tree

3 files changed

+23
-24
lines changed

3 files changed

+23
-24
lines changed

prometheus/config.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (c *Config) InsertAlertManagerURL(alertURL string) error {
7979
amc := &AlertmanagerConfig{
8080
Scheme: url.Scheme,
8181
ServiceDiscoveryConfig: ServiceDiscoveryConfig{
82-
StaticConfigs: []*TargetGroup{&TargetGroup{
82+
StaticConfigs: []*TargetGroup{{
8383
Targets: []string{url.Host},
8484
}},
8585
},
@@ -101,7 +101,7 @@ func (c *Config) InsertScrapes(scrapes map[string]Scrape) {
101101
if s.ScrapeType == "static_configs" {
102102
newScrape = &ScrapeConfig{
103103
ServiceDiscoveryConfig: ServiceDiscoveryConfig{
104-
StaticConfigs: []*TargetGroup{&TargetGroup{
104+
StaticConfigs: []*TargetGroup{{
105105
Targets: []string{fmt.Sprintf("%s:%d", s.ServiceName, s.ScrapePort)},
106106
}},
107107
},
@@ -111,7 +111,7 @@ func (c *Config) InsertScrapes(scrapes map[string]Scrape) {
111111
} else {
112112
newScrape = &ScrapeConfig{
113113
ServiceDiscoveryConfig: ServiceDiscoveryConfig{
114-
DNSSDConfigs: []*DNSSDConfig{&DNSSDConfig{
114+
DNSSDConfigs: []*DNSSDConfig{{
115115
Names: []string{fmt.Sprintf("tasks.%s", s.ServiceName)},
116116
Port: s.ScrapePort,
117117
Type: "A",
@@ -138,7 +138,7 @@ func (c *Config) InsertScrapesFromDir(dir string) {
138138
if content, err := afero.ReadFile(FS, dir+file.Name()); err == nil {
139139
sc := []*ScrapeConfig{}
140140

141-
// Trim for backwards compability
141+
// Trim for backwards compatibility
142142
content = normalizeScrapeFile(content)
143143
err := yaml.Unmarshal(content, &sc)
144144
if err != nil {

stack.yml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ services:
88
- proxy
99
- monitor
1010
environment:
11-
- ARG_STORAGE_LOCAL_PATH=/data
1211
- ARG_WEB_EXTERNAL-URL=http://prometheus.dockerflow.com
1312
- LISTENER_ADDRESS=swarm-listener
1413
- ARG_ALERTMANAGER_URL=http://alert-manager:9093
@@ -28,9 +27,9 @@ services:
2827
- com.df.alertFor=30s
2928
resources:
3029
reservations:
31-
memory: 2500M
30+
memory: 1750M
3231
limits:
33-
memory: 3500M
32+
memory: 2250M
3433

3534
alert-manager:
3635
image: prom/alertmanager
@@ -84,21 +83,21 @@ services:
8483
limits:
8584
memory: 20M
8685

87-
grafana:
88-
image: grafana/grafana:${GRAFANA_TAG:-4.6.0}
89-
networks:
90-
- infra_default
91-
- monitor
92-
environment:
93-
# - GF_SERVER_ROOT_URL=%(protocol)s://%(domain)s:%(http_port)s/grafana/
94-
- GF_SECURITY_ADMIN_USER=${GF_USER:-admin}
95-
- GF_SECURITY_ADMIN_PASSWORD=${GF_PASS:-admin}
96-
deploy:
97-
labels:
98-
- com.df.notify=true
99-
- com.df.distribute=true
100-
- com.df.serviceDomain=grafana.dockerflow.com
101-
- com.df.port=3000
86+
# grafana:
87+
# image: grafana/grafana:${GRAFANA_TAG:-4.6.0}
88+
# networks:
89+
# - infra_default
90+
# - monitor
91+
# environment:
92+
# # - GF_SERVER_ROOT_URL=%(protocol)s://%(domain)s:%(http_port)s/grafana/
93+
# - GF_SECURITY_ADMIN_USER=${GF_USER:-admin}
94+
# - GF_SECURITY_ADMIN_PASSWORD=${GF_PASS:-admin}
95+
# deploy:
96+
# labels:
97+
# - com.df.notify=true
98+
# - com.df.distribute=true
99+
# - com.df.serviceDomain=grafana.dockerflow.com
100+
# - com.df.port=3000
102101

103102
cadvisor:
104103
image: google/cadvisor:${CADVISOR_TAG:-latest}

stacks/docker-flow-monitor-aws.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ services:
55
monitor:
66
image: vfarcic/docker-flow-monitor
77
environment:
8-
- ARG_STORAGE_LOCAL_PATH=/data
8+
- ARG_STORAGE_TSDB_PATH=/prometheus
99
- LISTENER_ADDRESS=swarm-listener
1010
- GLOBAL_SCRAPE_INTERVAL=${SCRAPE_INTERVAL:-10s}
1111
- ARG_WEB_ROUTE-PREFIX=/monitor
1212
- ARG_WEB_EXTERNAL-URL=http://${DOMAIN:-localhost}/monitor
1313
- ARG_ALERTMANAGER_URL=http://alert-manager:9093
1414
volumes:
15-
- prom:/data
15+
- prom:/prometheus
1616
networks:
1717
- proxy
1818
- monitor

0 commit comments

Comments
 (0)