Skip to content

Prometheus URI Builder is double encoded

13:02:15.703 [pool-2-thread-2] INFO  o.e.o.m.prometheus.PrometheusQueries - Sent query at prometheus with URL: http://10.10.10.110:31492 with query: query=sum(rate(nginx_requests_total{path='/'}[1m])) by (remote_addr)
13:02:15.704 [pool-2-thread-2] INFO  o.e.o.m.prometheus.PrometheusQueries - Sent query  builder.toUriString(): http://10.10.10.110:31492/api/v1/query?query=sum(rate(nginx_requests_total%7Bpath%3D'/'%7D%5B1m%5D))%20by%20(remote_addr)
13:02:15.832 [Camel (camel-1) thread #4 - JmsConsumer[EVENT.SERVICE.ATTRCHANGED]] INFO  o.e.o.m.s.MetricoServiceRouteBuilder$$SpringCGLIB$$0 - jms:topic:EVENT.SERVICE.ATTRCHANGED message received!
13:02:15.842 [Camel (camel-1) thread #4 - JmsConsumer[EVENT.SERVICE.ATTRCHANGED]] INFO  DEBUG - Exchange[Headers: {__AMQ_CID=ID:029ab9bce4d8-37571-1763736604163-0:47, CamelMessageTimestamp=1764939735217, eventid=6c3d5f51-1b04-4a4e-8a1b-261f14673fdd, JMSCorrelationID=null, JMSCorrelationIDAsBytes=null, JMSDeliveryMode=2, JMSDestination=topic://EVENT.SERVICE.ATTRCHANGED, JMSExpiration=0, JMSMessageID=ID:029ab9bce4d8-37571-1763736604163-1:47:1:1:54, JMSPriority=4, JMSRedelivered=false, JMSReplyTo=null, JMSTimestamp=1764939735217, JMSType=null, JMSXGroupID=null, JMSXUserID=null, objId=1de577fb-6ad7-40ee-a212-801bda2ef1d1}, BodyType: String, Body: {"eventTime":"2025-12-05T13:02:15.212286817Z","eventId":"6c3d5f51-1b04-4a4e-8a1b-261f14673fdd","eventType":"org.etsi.osl.tmf.sim638.model.ServiceAttributeValueChangeNotification","event":{"service":{"uuid":"1de577fb-6ad7-40ee-a212-801bda2ef1d1","endDate":"2025-12-05T14:01:18Z","startDate":"2025-12-05T13:02:05.127242Z","description":"A Service for Dynamic Network Policy Management","@baseType":"BaseRootNamedEntity","@type":"ResourceFacingService","name":"Dynamic Network Policy Management","id":"1de577fb-6ad7-40ee-a212-801bda2ef1d1","category":"ResourceFacingService","hasStarted":false,"isServiceEnabled":false,"serviceDate":"2025-12-05T13:02:05.127237880Z","serviceType":"Dynamic Network Policy Management","startMode":"AUTOMATICALLY_MANAGED","note":[{"uuid":"03e9e540-2e20-43c7-85c0-fd5b01e50493","date":"2025-12-05T13:02:05.289767Z","@baseType":"BaseEntity","author":"openslice-osom","text":"Service Created by CreateReservedService"},{"uuid":"49bcd387-3770-4799-a20f-7a1efb38962e","date":"2025-12-05T13:02:05.293305Z","@baseType":"BaseEntity","author":"SIM-638","text":"Service reserved"},{"uuid":"337a8a7d-af51-4fa3-9f2c-3393a5ac42e3","date":"2025-12-05T13:02:08.793376Z","@baseType":"BaseEntity","author":"SIM638-API","text":"Supporting Resource 360d285e-9328-46be-890c-87bb34139f6d Added in service"},{"uuid":"5f8ca464-76bc-4ae2-ad6a-322b93bcb074","date":"2025-12-05T13:02:08.045986Z","@baseType":"BaseEntity","author":"openslice-osom","text":"Requesting CRIDGE to deploy crspec"},{"uuid":"74293a05-5621-4d85-8fa9-3b79e72d48da","date":"2025-12-05T13:02:14.446202Z","@baseType":"BaseEntity","author":"SIM-638","text":"Service is active"}],"place":[],"relatedParty":[{"uuid":"826e43f0-5884-4f64-a699-d265bc4f9ce9","@baseType":"BaseRootEntity","@type":"org.etsi.osl.tmf.prm669.model.RelatedParty","name":"ktrantzas","role":"OWNER","@referredType":"SimpleUsername_Individual","id":"ktrantzas","extendedInfo":""}],"serviceCharacteristic":[{"uuid":"e9bc7fa0-1588-48d1-879c-f9992e6da441","value":{"value":""},"@baseType":"BaseEntity","name":"status.operationState.operation.sync.source.directory.jsonnet.tlas","valueType":"TEXT"},{"uuid":"81193160-260b-4b73-b5b4-87ccf9bdff15","value":{"value":""},"@baseType":"BaseEntity","name":"status.operationState.syncResult.source.helm","valueType":"OBJECT"},{"uuid":"c05fa2de-7fd2-4627-a911-2810d3f51cda","value":{"value":""},"@baseType":"BaseEntity","name":"status.operationState.operation.sync.source.kustomize.version","valueType":"TEXT"},{"uuid":"ddf58b5f-d0d6-4883-8e04-0c6df447b4dc","value":{"value":""},"@baseType":"BaseEntity","name":"status.operationState.message","valueType":"TEXT"},{"uuid":"f237964e-1986-4926-b7b5-04e8b2e870ed","value":{"value":""},"@baseType":"BaseEntity","name":"status.operationState.operation.sync.source.kustomize.images","valueType":"TEXT"},{"uuid":"44834ab8-8200-4e8f-be70-5f6a24280584","value":{"value":""},"@baseType":"BaseEntity","name":"status.operationState.operation.sync.source.directory.jsonnet","valueType":"OBJECT"},{"uuid":"37334851-33a4-422b-aa9d-1475c6b9c98c","value":{"value":""},"@baseType":"BaseEntity","name":"spec.sources","valueType":"TEXT"},{"uuid":"7d5d640d-2e80-46f1-9a36-88438f8e762a","value":{"value":""},"@baseType":"BaseEntity","name":"status.operationState.operation.sync.source.kustomize.replicas","valueType":"TEXT"},{"uuid":"922948b9-7fca-4e06-9e82-263513d3f2c0","value":{"value":""},"@baseType":"BaseEntity","name":"status.sync.comparedTo.source.plugin.parameters","valueType":"TEXT"},{"uuid":"c633da8a-59a8-4b6e-b69d-021371c512e3","value":{"value":""},"@baseType":"BaseEntity","name":"status.operationState.syncResult.source.directory.jsonnet.extVars","valueType":"TEXT"},{"uuid":"12100592-f9b4-49a9-90c1-58b59b0c79d3","value":{"value":""},"@baseType":"BaseEntity","name":"status.operationState.operation.sync.source.helm.releaseName","valueType":"TEXT"},{"uuid":"9357f1f6-df31-477b-b4dd-0da7deb271a4","value":{"value":"{\"operation\":{\"initiatedBy\":{\"automated\":true},\"retry\":{\"limit\":5},\"sync\":{\"prune\":true,\"revision\":\"0.1.0\",\"syncOptions\":[\"Validate=false\",\"CreateNamespace=true\",\"PrunePropagationPolicy=foreground\",\"PruneLast=true\",\"RespectIgnoreDifferences=true\"]}},\"spec\":{\"destination\":{\"name\":\"in-cluster\",\"namespace\":\"ingress\"},\"project\":\"default\",\"source\":{\"chart\":\"dynamic-networkpolicy\",\"helm\":{\"values\":\"policyName: block-list\\nblockedIPs: [  ]\\n\"},\"repoURL\":\"https://harbor.patras5g.eu/chartrepo/across\",\"targetRevision\":\"0.1.0\"},\"syncPolicy\":{\"automated\":{\"prune\":true,\"selfHeal\":true},\"syncOptions\":[\"Validate=false\",\"CreateNamespace=true\",\"PrunePropagationPolicy=foreground\",\"PruneLast=true\",\"RespectIgnoreDifferences=true\"]}},\"status\":{\"controllerNamespace\":\"argocd\",\"health\":{\"status\":\"Healthy\"},\"history\":[{\"deployStartedAt\":\"2025-12-05T13:02:13Z\",\"deployedAt\":\"2025-12-05T13:02:13Z\",\"id\":0,\"initiatedBy\":{\"automated\":true},\"revision\":\"0.1.0\",\"source\":{\"chart\":\"dynamic-networkpolicy\",\"helm\":{\"values\":\"policyName: block-list\\nblockedIPs: [  ]\\n\"},\"repoURL\":\"https://harbor.patras5g.eu/chartrepo/across\",\"targetRevision\":\"0.1.0\"}}],\"operationState\":{\"operation\":{\"initiatedBy\":{\"automated\":true},\"retry\":{\"limit\":5},\"sync\":{\"prune\":true,\"revision\":\"0.1.0\",\"syncOptions\":[\"Validate=false\",\"CreateNamespace=true\",\"PrunePropagationPolicy=foreground\",\"PruneLast=true\",\"RespectIgnoreDifferences=true\"]}},\"phase\":\"Running\",\"startedAt\":\"2025-12-05T13:02:13Z\"},\"reconciledAt\":\"2025-12-05T13:02:08Z\",\"resources\":[{\"health\":{\"status\":\"Missing\"},\"kind\":\"ConfigMap\",\"name\":\"block-list\",\"namespace\":\"ingress\",\"status\":\"OutOfSync\",\"version\":\"v1\"},{\"group\":\"networking.k8s.io\",\"health\":{\"status\":\"Missing\"},\"kind\":\"NetworkPolicy\",\"name\":\"block-list\",\"namespace\":\"ingress\",\"status\":\"OutOfSync\",\"version\":\"v1\"}],\"sourceType\":\"Helm\",\"summary\":{},\"sync\":{\"comparedTo\":{\"destination\":{\"name\":\"in-cluster\",\"namespace\":\"ingress\"},\"source\":{\"chart\":\"dynamic-networkpolicy\",\"helm\":{\"values\":\"policyName: block-list\\nblockedIPs: [  ]\\n\"},\"repoURL\":\"https://harbor.patras5g.eu/chartrepo/across\",\"targetRevision\":\"0.1.0\"}},\"revision\":\"0.1.0\",\"status\":\"OutOfSync\"}}}"},"@baseType":"BaseEntity","name":"AdditionPropertiesAsJson"},{"uuid":"6f196ce6-1281-4397-8325-51256e0ecbeb","value":{"value":""},"@baseType":"BaseEntity","name":"spec.source.helm.parameters","valueType":"TEXT"},{"uuid":"73b4b8b0-5e4f-4e57-90e2-1f2f7c2d482d","value":{"value":""},"@baseType":"BaseEntity","name":"status.health.message","valueType":"TEXT"},{"uuid":"1c2da8b1-53cf-4305-aa48-46de1a8d39f4","value":{"value":""},"@baseType":"BaseEntity","name":"status.operationState.syncResult.source.kustomize.components","valueType":"TEXT"},{"uuid":"7c2a7d18-1063-4e65-9d3a-7dbd157a9670","value":{"value":""},"@baseType":"BaseEntity","name":"status.sync.comparedTo.source.helm.ignoreMissingValueFiles","valueType":"BOOLEAN"},{"uuid":"3db0843f-283b-4be2-a513-44bae7999e92","value":{"value":""},"@baseType":"BaseEntity","name":"spec.source.helm.apiVersions","valueType":"TEXT"},{"uuid":"b6dd88c0-8d46-4a1b-8b62-ca2edf5a9e8a","value":{"value":""},"@baseType":"BaseEntity","name":"spec.source.directory.include","valueType":"TEXT"},{"uuid":"696d16e0-6e3e-454f-8657-c03c982095c2","value":{"value":""},"@baseType":"BaseEntity","name":"status.operationState.syncResult.source.kustomize.apiVersions","valueType":"TEXT"},{"uuid":"375ac22e-0ad2-4ff6-8d5f-ebdff9c7d04e","value":{"value":"5"},"@baseType":"BaseEntity","name":"operation.retry.limit"},{"uuid":"7d2ba540-ce47-4b9c-9ace-f367b88a0bba","value":{"value":""},"@baseType":"BaseEntity","name":"status.sync.comparedTo.source.path","valueType":"TEXT"},{"uuid":"590aa325-182a-49ad-b1be-ddb490f06aae","value":{"value":"Progressing"},"@baseType":"BaseEntity","name":"org.etsi.osl.statusCheckValueStandby"},{"uuid":"6f7d82ad-a191-489b-9e34-f65960ec5216","value":{"value":"Healthy"},"@baseType":"BaseEntity","name":"status.health.status","valueType":"TEXT"},{"uuid":"286ca1e5-9399-45cd-85b6-cb7c32cd7ccd","value":{"value":""},"@baseType":"BaseEntity","name":"spec.source.kustomize.forceCommonLabels","valueType":"BOOLEAN"},{"uuid":"70cc7c78-4a11-4098-9a97-52a9bd65871b","value":{"value":""},"@baseType":"BaseEntity","name":"_CR_SPEC_LASTSEND","valueType":"TEXT"},{"uuid":"757b5385-c6da-411b-bd0b-77933f79fdf7","value":{"value":""},"@baseType":"BaseEntity","name":"status.sync.comparedTo.source.helm.apiVersions","valueType":"TEXT"},{"uuid":"704e21db-b7a9-4be7-bf89-fc66ead34351","value":{"value":"[{health={status=Missing}, kind=ConfigMap, name=block-list, namespace=ingress, status=OutOfSync, version=v1}, {group=networking.k8s.io, health={status=Missing}, kind=NetworkPolicy, name=block-list, namespace=ingress, status=OutOfSync, version=v1}]"},"@baseType":"BaseEntity","name":"status.resources","valueType":"TEXT"},{"uuid":"c167daad-c20a-4132-8430-61594c7ca3f8","value":{"value":""},"@baseType":"BaseEntity","name":"spec.source.kustomize.labelWithoutSelector","valueType":"BOOLEAN"},{"uuid":"64c338f6-992a-49c3-b84e-9d74b8fa5f57","value":{"value":""},"@baseType":"BaseEntity","name":"org.etsi.osl.statusCheckValueSuspended"},{"uuid":"141ed5c9-22d1-462f-8ecc-d4b7d2992294","value":{"value":""},"@baseType":"BaseEntity","name":"spec.syncPolicy.mana...]
13:02:16.086 [reactor-http-epoll-3] ERROR o.e.o.m.prometheus.PrometheusQueries - 4xx eror
13:02:16.114 [pool-2-thread-2] ERROR o.e.o.m.prometheus.PrometheusQueries -  error on web client request
java.lang.RuntimeException: 4xx
	at org.etsi.osl.metrico.prometheus.PrometheusQueries.lambda$sendQueryToPrometheus$0(PrometheusQueries.java:54)
	Suppressed: The stacktrace has been enhanced by Reactor, refer to additional information below: 
Error has been observed at the following site(s):
	*__checkpoint ⇢ 400 BAD_REQUEST from GET http://10.10.10.110/api/v1/query [DefaultWebClient]
Original Stack Trace:
		at org.etsi.osl.metrico.prometheus.PrometheusQueries.lambda$sendQueryToPrometheus$0(PrometheusQueries.java:54)
		at org.springframework.web.reactive.function.client.DefaultWebClient$DefaultResponseSpec$StatusHandler.apply(DefaultWebClient.java:732)