Skip to content

Commit f39837e

Browse files
committed
feat: expose loki on mycelium
1 parent e060b81 commit f39837e

File tree

6 files changed

+14
-18
lines changed

6 files changed

+14
-18
lines changed

backend/config-example.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,5 @@
7171
"host": ""
7272
}
7373
},
74-
"zlog_output_url": "http://admin:loki123@your-server-ip:3100?tenant_id=zlog-vms",
75-
"telemetry": {
76-
"otlp_endpoint": "jaeger:4317"
77-
}
74+
"zlog_output_url": "http://loki-address?tenant_id=zlog-vms"
7875
}

backend/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ require (
6767
github.com/pierrec/lz4/v4 v4.1.21 // indirect
6868
github.com/segmentio/asm v1.2.0 // indirect
6969
github.com/shopspring/decimal v1.4.0 // indirect
70+
github.com/threefoldtech/zosbase v1.0.7-0.20251223152017-727e292afc8a // indirect
7071
go.opentelemetry.io/proto/otlp v1.9.0 // indirect
7172
google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 // indirect
7273
google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect
@@ -172,7 +173,6 @@ require (
172173
github.com/stretchr/objx v0.5.2 // indirect
173174
github.com/subosito/gotenv v1.6.0 // indirect
174175
github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.17.5 // indirect
175-
github.com/threefoldtech/zosbase v1.0.4 // indirect
176176
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
177177
github.com/ugorji/go/codec v1.3.1 // indirect
178178
github.com/vedhavyas/go-subkey/v2 v2.0.0 // indirect

backend/go.sum

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,8 @@ github.com/threefoldtech/tfgrid-sdk-go/grid-proxy v0.17.6-0.20251209150615-a3bb9
371371
github.com/threefoldtech/tfgrid-sdk-go/grid-proxy v0.17.6-0.20251209150615-a3bb942f9860/go.mod h1:J57xHAagUOddwz2nonrkB91/8T9TJ9IKk/6wzKVB5EM=
372372
github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.17.5 h1:zp5iZOvtvcQrcR7Po3UZBNk2uBYi1i1VxMA/ENIvCZY=
373373
github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.17.5/go.mod h1:T+PZydVl3fxywqoUhCmzs+hUarfE1q9IMRl9xa+GIYo=
374-
github.com/threefoldtech/zosbase v1.0.4 h1:A4kFukh4IO5r5e9F51aqKgXOyTG5cWknxqEVGtQ647w=
375-
github.com/threefoldtech/zosbase v1.0.4/go.mod h1:ZZ1M8SZVr7k4tH2URr5DMEbcwZoQDpBZWgboHdiNE+k=
374+
github.com/threefoldtech/zosbase v1.0.7-0.20251223152017-727e292afc8a h1:JJEY41aZXr7cQkepsBWahvg81PlK8yc+XZD1cX6XzAM=
375+
github.com/threefoldtech/zosbase v1.0.7-0.20251223152017-727e292afc8a/go.mod h1:NQRib2wxtsMdvKpZlosjT9d/76VdxM89Fx5LmlwOP58=
376376
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
377377
github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=
378378
github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI=
@@ -478,8 +478,8 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w
478478
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
479479
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
480480
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
481-
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
482481
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
482+
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
483483
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
484484
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
485485
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

docker-compose.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ services:
1111
- /dev/net/tun:/dev/net/tun
1212
ports:
1313
- "8080:8080" # exposes the backend API
14+
- "3100:3100" # exposes Loki
1415
networks:
1516
- app-network # connect to redis with network
1617
volumes:
@@ -112,14 +113,12 @@ services:
112113
loki:
113114
image: grafana/loki:latest
114115
container_name: loki
115-
ports:
116-
- "3100:3100"
117116
command: -config.file=/etc/loki/loki-config.yaml -target=all
118117
volumes:
119118
- ./loki/loki-config.yaml:/etc/loki/loki-config.yaml
120119
- loki-data:/loki
121-
networks:
122-
- app-network
120+
network_mode: "service:mycelium"
121+
123122
promtail:
124123
image: grafana/promtail:latest
125124
container_name: promtail
@@ -138,8 +137,8 @@ services:
138137
container_name: jaeger
139138
ports:
140139
- "16686:16686" # Jaeger UI
141-
- "4317:4317" # OTLP gRPC receiver
142-
- "4318:4318" # OTLP HTTP receiver
140+
- "4317:4317" # OTLP gRPC receiver
141+
- "4318:4318" # OTLP HTTP receiver
143142
environment:
144143
- COLLECTOR_OTLP_ENABLED=true
145144
- SPAN_STORAGE_TYPE=badger

grafana/provisioning/datasources/datasource.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ datasources:
1111
- name: Loki - KubeCloud
1212
type: loki
1313
access: proxy
14-
url: http://loki:3100
14+
url: http://mycelium:3100
1515
isDefault: false
1616
jsonData:
1717
httpHeaderName1: "X-Scope-OrgID"
1818
secureJsonData:
1919
httpHeaderValue1: "kubecloud"
2020

21-
# Cluster VMs logs
21+
# Cluster VMs logs
2222
- name: Loki - VMs
2323
type: loki
2424
access: proxy
25-
url: http://loki:3100
25+
url: http://mycelium:3100
2626
isDefault: false
2727
jsonData:
2828
httpHeaderName1: "X-Scope-OrgID"

loki/promtail-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ positions:
66
filename: /tmp/positions.yaml
77

88
clients:
9-
- url: http://loki:3100/loki/api/v1/push
9+
- url: http://mycelium:3100/loki/api/v1/push
1010
tenant_id: kubecloud
1111

1212
scrape_configs:

0 commit comments

Comments
 (0)