Skip to content
Snippets Groups Projects
Commit 148ceb15 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Merge branch 'develop' of https://labs.etsi.org/rep/tfs/controller into...

Merge branch 'develop' of https://labs.etsi.org/rep/tfs/controller into feat/pathcomp-component-backend
parents f3c0eabf ca74ba7d
No related branches found
No related tags found
2 merge requests!142Release TeraFlowSDN 2.1,!76PathComp_Backend: Resource Context Improvement and Support of Energy Aware Routing Alg.
...@@ -34,6 +34,7 @@ spec: ...@@ -34,6 +34,7 @@ spec:
ports: ports:
- containerPort: 8080 - containerPort: 8080
- containerPort: 9090 - containerPort: 9090
- containerPort: 9192
env: env:
- name: LOG_LEVEL - name: LOG_LEVEL
value: "INFO" value: "INFO"
...@@ -70,3 +71,7 @@ spec: ...@@ -70,3 +71,7 @@ spec:
protocol: TCP protocol: TCP
port: 9090 port: 9090
targetPort: 9090 targetPort: 9090
- name: metrics
protocol: TCP
port: 9192
targetPort: 9192
...@@ -301,3 +301,32 @@ spec: ...@@ -301,3 +301,32 @@ spec:
any: false any: false
matchNames: matchNames:
- tfs # namespace where the app is running - tfs # namespace where the app is running
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
namespace: monitoring # namespace where prometheus is running
name: tfs-computeservice-metric
labels:
app: computeservice
#release: prometheus
#release: prom # name of the release
# ( VERY IMPORTANT: You need to know the correct release name by viewing
# the servicemonitor of Prometheus itself: Without the correct name,
# Prometheus cannot identify the metrics of the Flask app as the target.)
spec:
selector:
matchLabels:
# Target app service
#namespace: tfs
app: computeservice # same as above
#release: prometheus # same as above
endpoints:
- port: metrics # named port in target app
scheme: http
path: /metrics # path to scrape
interval: 5s # scrape interval
namespaceSelector:
any: false
matchNames:
- tfs # namespace where the app is running
This diff is collapsed.
...@@ -25,7 +25,6 @@ from grpc._channel import _MultiThreadedRendezvous ...@@ -25,7 +25,6 @@ from grpc._channel import _MultiThreadedRendezvous
from common.Constants import ServiceNameEnum from common.Constants import ServiceNameEnum
from common.Settings import ( from common.Settings import (
ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, get_env_var_name, get_service_port_grpc) ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, get_env_var_name, get_service_port_grpc)
#from common.logger import getJSONLogger
from common.proto.context_pb2 import DeviceOperationalStatusEnum, EventTypeEnum, DeviceEvent, Device, Empty from common.proto.context_pb2 import DeviceOperationalStatusEnum, EventTypeEnum, DeviceEvent, Device, Empty
from common.proto.context_pb2_grpc import add_ContextServiceServicer_to_server from common.proto.context_pb2_grpc import add_ContextServiceServicer_to_server
from common.proto.kpi_sample_types_pb2 import KpiSampleType from common.proto.kpi_sample_types_pb2 import KpiSampleType
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment