Skip to content
Snippets Groups Projects
Unverified Commit cbe5fc1d authored by capossele's avatar capossele
Browse files

:chart_with_upwards_trend: Update Prometheus

parent 6a1ec92f
Branches
No related tags found
No related merge requests found
...@@ -17,9 +17,9 @@ func init() { ...@@ -17,9 +17,9 @@ func init() {
registry.MustRegister(messagesPerSecond) registry.MustRegister(messagesPerSecond)
addCollect(collectServer) addCollect(collectMetrics)
} }
func collectServer() { func collectMetrics() {
messagesPerSecond.Set(float64(metrics.ReceivedMessagesPerSecond())) messagesPerSecond.Set(float64(metrics.ReceivedMessagesPerSecond()))
} }
...@@ -16,7 +16,7 @@ const ( ...@@ -16,7 +16,7 @@ const (
) )
func init() { func init() {
flag.String(CfgPrometheusBindAddress, "localhost:9311", "the bind address on which the Prometheus exporter listens on") flag.String(CfgPrometheusBindAddress, "0.0.0.0:9311", "the bind address on which the Prometheus exporter listens on")
flag.Bool(CfgPrometheusGoMetrics, false, "include go metrics") flag.Bool(CfgPrometheusGoMetrics, false, "include go metrics")
flag.Bool(CfgPrometheusProcessMetrics, false, "include process metrics") flag.Bool(CfgPrometheusProcessMetrics, false, "include process metrics")
flag.Bool(CfgPrometheusPromhttpMetrics, false, "include promhttp metrics") flag.Bool(CfgPrometheusPromhttpMetrics, false, "include promhttp metrics")
......
...@@ -40,14 +40,15 @@ services: ...@@ -40,14 +40,15 @@ services:
command: > command: >
--config-dir=/tmp --config-dir=/tmp
--database.directory=/tmp/mainnetdb --database.directory=/tmp/mainnetdb
--node.enablePlugins=bootstrap
--node.disablePlugins=valuetransfers --node.disablePlugins=valuetransfers
--node.enablePlugins=bootstrap,prometheus
volumes: volumes:
- ./config.docker.json:/tmp/config.json:ro - ./config.docker.json:/tmp/config.json:ro
- goshimmer-cache:/go - goshimmer-cache:/go
ports: ports:
- "127.0.0.1:8080:8080/tcp" # web API - "127.0.0.1:8080:8080/tcp" # web API
- "127.0.0.1:8081:8081/tcp" # dashboard - "127.0.0.1:8081:8081/tcp" # dashboard
- "127.0.0.1:9311:9311/tcp" # prometheus
depends_on: depends_on:
- entry_node - entry_node
...@@ -67,6 +68,18 @@ services: ...@@ -67,6 +68,18 @@ services:
depends_on: depends_on:
- entry_node - entry_node
prometheus:
image: prom/prometheus:latest
container_name: prometheus
ports:
- 9090:9090
command:
- --config.file=/etc/prometheus/prometheus.yml
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
depends_on:
- peer_master
volumes: volumes:
goshimmer-cache: goshimmer-cache:
name: goshimmer-cache name: goshimmer-cache
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment