Storage of PM Data in influx
Signed-off-by: PatrikBuhr <patrik.buhr@est.tech>
Issue-ID: NONRTRIC-840
Change-Id: Ie3ebb1cb1ab78c84b39eefbc702b035c47f74a40
diff --git a/influxlogger/api/README.md b/influxlogger/api/README.md
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/influxlogger/api/README.md
diff --git a/influxlogger/api/pmlog-api.json b/influxlogger/api/pmlog-api.json
new file mode 100644
index 0000000..4ad7230
--- /dev/null
+++ b/influxlogger/api/pmlog-api.json
@@ -0,0 +1,255 @@
+{
+ "components": {"schemas": {"Link": {
+ "type": "object",
+ "properties": {
+ "templated": {"type": "boolean"},
+ "href": {"type": "string"}
+ }
+ }}},
+ "openapi": "3.0.1",
+ "paths": {
+ "/actuator/threaddump": {"get": {
+ "summary": "Actuator web endpoint 'threaddump'",
+ "operationId": "threaddump",
+ "responses": {"200": {
+ "description": "OK",
+ "content": {
+ "text/plain;charset=UTF-8": {"schema": {"type": "object"}},
+ "application/vnd.spring-boot.actuator.v3+json": {"schema": {"type": "object"}},
+ "application/json": {"schema": {"type": "object"}},
+ "application/vnd.spring-boot.actuator.v2+json": {"schema": {"type": "object"}}
+ }
+ }},
+ "tags": ["Actuator"]
+ }},
+ "/actuator/info": {"get": {
+ "summary": "Actuator web endpoint 'info'",
+ "operationId": "info",
+ "responses": {"200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {"schema": {"type": "object"}},
+ "application/json": {"schema": {"type": "object"}},
+ "application/vnd.spring-boot.actuator.v2+json": {"schema": {"type": "object"}}
+ }
+ }},
+ "tags": ["Actuator"]
+ }},
+ "/actuator/loggers": {"get": {
+ "summary": "Actuator web endpoint 'loggers'",
+ "operationId": "loggers",
+ "responses": {"200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {"schema": {"type": "object"}},
+ "application/json": {"schema": {"type": "object"}},
+ "application/vnd.spring-boot.actuator.v2+json": {"schema": {"type": "object"}}
+ }
+ }},
+ "tags": ["Actuator"]
+ }},
+ "/actuator/health/**": {"get": {
+ "summary": "Actuator web endpoint 'health-path'",
+ "operationId": "health-path",
+ "responses": {"200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {"schema": {"type": "object"}},
+ "application/json": {"schema": {"type": "object"}},
+ "application/vnd.spring-boot.actuator.v2+json": {"schema": {"type": "object"}}
+ }
+ }},
+ "tags": ["Actuator"]
+ }},
+ "/actuator/shutdown": {"post": {
+ "summary": "Actuator web endpoint 'shutdown'",
+ "operationId": "shutdown",
+ "responses": {"200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {"schema": {"type": "object"}},
+ "application/json": {"schema": {"type": "object"}},
+ "application/vnd.spring-boot.actuator.v2+json": {"schema": {"type": "object"}}
+ }
+ }},
+ "tags": ["Actuator"]
+ }},
+ "/actuator/metrics/{requiredMetricName}": {"get": {
+ "summary": "Actuator web endpoint 'metrics-requiredMetricName'",
+ "operationId": "metrics-requiredMetricName",
+ "responses": {"200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {"schema": {"type": "object"}},
+ "application/json": {"schema": {"type": "object"}},
+ "application/vnd.spring-boot.actuator.v2+json": {"schema": {"type": "object"}}
+ }
+ }},
+ "parameters": [{
+ "schema": {"type": "string"},
+ "in": "path",
+ "name": "requiredMetricName",
+ "required": true
+ }],
+ "tags": ["Actuator"]
+ }},
+ "/actuator": {"get": {
+ "summary": "Actuator root web endpoint",
+ "operationId": "links",
+ "responses": {"200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {"schema": {
+ "additionalProperties": {
+ "additionalProperties": {"$ref": "#/components/schemas/Link"},
+ "type": "object"
+ },
+ "type": "object"
+ }},
+ "application/json": {"schema": {
+ "additionalProperties": {
+ "additionalProperties": {"$ref": "#/components/schemas/Link"},
+ "type": "object"
+ },
+ "type": "object"
+ }},
+ "application/vnd.spring-boot.actuator.v2+json": {"schema": {
+ "additionalProperties": {
+ "additionalProperties": {"$ref": "#/components/schemas/Link"},
+ "type": "object"
+ },
+ "type": "object"
+ }}
+ }
+ }},
+ "tags": ["Actuator"]
+ }},
+ "/actuator/logfile": {"get": {
+ "summary": "Actuator web endpoint 'logfile'",
+ "operationId": "logfile",
+ "responses": {"200": {
+ "description": "OK",
+ "content": {"text/plain;charset=UTF-8": {"schema": {"type": "object"}}}
+ }},
+ "tags": ["Actuator"]
+ }},
+ "/data-consumer/v1/info-jobs/{infoJobId}": {"put": {
+ "requestBody": {
+ "content": {"application/json": {"schema": {"type": "string"}}},
+ "required": true
+ },
+ "operationId": "putIndividualInfoJob",
+ "responses": {"200": {
+ "description": "OK",
+ "content": {"application/json": {"schema": {"type": "object"}}}
+ }},
+ "parameters": [{
+ "schema": {"type": "string"},
+ "in": "path",
+ "name": "infoJobId",
+ "required": true
+ }],
+ "tags": ["Information Coordinator Service Simulator (exists only in test)"]
+ }},
+ "/actuator/loggers/{name}": {
+ "post": {
+ "summary": "Actuator web endpoint 'loggers-name'",
+ "requestBody": {"content": {"application/json": {"schema": {
+ "type": "string",
+ "enum": [
+ "TRACE",
+ "DEBUG",
+ "INFO",
+ "WARN",
+ "ERROR",
+ "FATAL",
+ "OFF"
+ ]
+ }}}},
+ "operationId": "loggers-name_2",
+ "responses": {"200": {
+ "description": "OK",
+ "content": {"*/*": {"schema": {"type": "object"}}}
+ }},
+ "parameters": [{
+ "schema": {"type": "string"},
+ "in": "path",
+ "name": "name",
+ "required": true
+ }],
+ "tags": ["Actuator"]
+ },
+ "get": {
+ "summary": "Actuator web endpoint 'loggers-name'",
+ "operationId": "loggers-name",
+ "responses": {"200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {"schema": {"type": "object"}},
+ "application/json": {"schema": {"type": "object"}},
+ "application/vnd.spring-boot.actuator.v2+json": {"schema": {"type": "object"}}
+ }
+ }},
+ "parameters": [{
+ "schema": {"type": "string"},
+ "in": "path",
+ "name": "name",
+ "required": true
+ }],
+ "tags": ["Actuator"]
+ }
+ },
+ "/actuator/health": {"get": {
+ "summary": "Actuator web endpoint 'health'",
+ "operationId": "health",
+ "responses": {"200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {"schema": {"type": "object"}},
+ "application/json": {"schema": {"type": "object"}},
+ "application/vnd.spring-boot.actuator.v2+json": {"schema": {"type": "object"}}
+ }
+ }},
+ "tags": ["Actuator"]
+ }},
+ "/actuator/metrics": {"get": {
+ "summary": "Actuator web endpoint 'metrics'",
+ "operationId": "metrics",
+ "responses": {"200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {"schema": {"type": "object"}},
+ "application/json": {"schema": {"type": "object"}},
+ "application/vnd.spring-boot.actuator.v2+json": {"schema": {"type": "object"}}
+ }
+ }},
+ "tags": ["Actuator"]
+ }},
+ "/actuator/heapdump": {"get": {
+ "summary": "Actuator web endpoint 'heapdump'",
+ "operationId": "heapdump",
+ "responses": {"200": {
+ "description": "OK",
+ "content": {"application/octet-stream": {"schema": {"type": "object"}}}
+ }},
+ "tags": ["Actuator"]
+ }}
+ },
+ "info": {
+ "license": {
+ "name": "Copyright (C) 2023 Nordix Foundation. Licensed under the Apache License.",
+ "url": "http://www.apache.org/licenses/LICENSE-2.0"
+ },
+ "description": "Receives PM reports from a Kafka topic and writes the PM counters into an Influx database.",
+ "title": "PM Logger",
+ "version": "1.0"
+ },
+ "tags": [{
+ "name": "Actuator",
+ "description": "Monitor and interact",
+ "externalDocs": {
+ "description": "Spring Boot Actuator Web API Documentation",
+ "url": "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/"
+ }
+ }]
+}
\ No newline at end of file
diff --git a/influxlogger/api/pmlog-api.yaml b/influxlogger/api/pmlog-api.yaml
new file mode 100644
index 0000000..638f2bb
--- /dev/null
+++ b/influxlogger/api/pmlog-api.yaml
@@ -0,0 +1,333 @@
+openapi: 3.0.1
+info:
+ title: PM Logger
+ description: Receives PM reports from a Kafka topic and writes the PM counters into
+ an Influx database.
+ license:
+ name: Copyright (C) 2023 Nordix Foundation. Licensed under the Apache License.
+ url: http://www.apache.org/licenses/LICENSE-2.0
+ version: "1.0"
+servers:
+- url: /
+tags:
+- name: Actuator
+ description: Monitor and interact
+ externalDocs:
+ description: Spring Boot Actuator Web API Documentation
+ url: https://docs.spring.io/spring-boot/docs/current/actuator-api/html/
+paths:
+ /actuator/threaddump:
+ get:
+ tags:
+ - Actuator
+ summary: Actuator web endpoint 'threaddump'
+ operationId: threaddump
+ responses:
+ 200:
+ description: OK
+ content:
+ text/plain;charset=UTF-8:
+ schema:
+ type: object
+ application/vnd.spring-boot.actuator.v3+json:
+ schema:
+ type: object
+ application/json:
+ schema:
+ type: object
+ application/vnd.spring-boot.actuator.v2+json:
+ schema:
+ type: object
+ /actuator/info:
+ get:
+ tags:
+ - Actuator
+ summary: Actuator web endpoint 'info'
+ operationId: info
+ responses:
+ 200:
+ description: OK
+ content:
+ application/vnd.spring-boot.actuator.v3+json:
+ schema:
+ type: object
+ application/json:
+ schema:
+ type: object
+ application/vnd.spring-boot.actuator.v2+json:
+ schema:
+ type: object
+ /actuator/loggers:
+ get:
+ tags:
+ - Actuator
+ summary: Actuator web endpoint 'loggers'
+ operationId: loggers
+ responses:
+ 200:
+ description: OK
+ content:
+ application/vnd.spring-boot.actuator.v3+json:
+ schema:
+ type: object
+ application/json:
+ schema:
+ type: object
+ application/vnd.spring-boot.actuator.v2+json:
+ schema:
+ type: object
+ /actuator/health/**:
+ get:
+ tags:
+ - Actuator
+ summary: Actuator web endpoint 'health-path'
+ operationId: health-path
+ responses:
+ 200:
+ description: OK
+ content:
+ application/vnd.spring-boot.actuator.v3+json:
+ schema:
+ type: object
+ application/json:
+ schema:
+ type: object
+ application/vnd.spring-boot.actuator.v2+json:
+ schema:
+ type: object
+ /actuator/shutdown:
+ post:
+ tags:
+ - Actuator
+ summary: Actuator web endpoint 'shutdown'
+ operationId: shutdown
+ responses:
+ 200:
+ description: OK
+ content:
+ application/vnd.spring-boot.actuator.v3+json:
+ schema:
+ type: object
+ application/json:
+ schema:
+ type: object
+ application/vnd.spring-boot.actuator.v2+json:
+ schema:
+ type: object
+ /actuator/metrics/{requiredMetricName}:
+ get:
+ tags:
+ - Actuator
+ summary: Actuator web endpoint 'metrics-requiredMetricName'
+ operationId: metrics-requiredMetricName
+ parameters:
+ - name: requiredMetricName
+ in: path
+ required: true
+ style: simple
+ explode: false
+ schema:
+ type: string
+ responses:
+ 200:
+ description: OK
+ content:
+ application/vnd.spring-boot.actuator.v3+json:
+ schema:
+ type: object
+ application/json:
+ schema:
+ type: object
+ application/vnd.spring-boot.actuator.v2+json:
+ schema:
+ type: object
+ /actuator:
+ get:
+ tags:
+ - Actuator
+ summary: Actuator root web endpoint
+ operationId: links
+ responses:
+ 200:
+ description: OK
+ content:
+ application/vnd.spring-boot.actuator.v3+json:
+ schema:
+ type: object
+ additionalProperties:
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/Link'
+ application/json:
+ schema:
+ type: object
+ additionalProperties:
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/Link'
+ application/vnd.spring-boot.actuator.v2+json:
+ schema:
+ type: object
+ additionalProperties:
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/Link'
+ /actuator/logfile:
+ get:
+ tags:
+ - Actuator
+ summary: Actuator web endpoint 'logfile'
+ operationId: logfile
+ responses:
+ 200:
+ description: OK
+ content:
+ text/plain;charset=UTF-8:
+ schema:
+ type: object
+ /data-consumer/v1/info-jobs/{infoJobId}:
+ put:
+ tags:
+ - Information Coordinator Service Simulator (exists only in test)
+ operationId: putIndividualInfoJob
+ parameters:
+ - name: infoJobId
+ in: path
+ required: true
+ style: simple
+ explode: false
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: string
+ required: true
+ responses:
+ 200:
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: object
+ /actuator/loggers/{name}:
+ get:
+ tags:
+ - Actuator
+ summary: Actuator web endpoint 'loggers-name'
+ operationId: loggers-name
+ parameters:
+ - name: name
+ in: path
+ required: true
+ style: simple
+ explode: false
+ schema:
+ type: string
+ responses:
+ 200:
+ description: OK
+ content:
+ application/vnd.spring-boot.actuator.v3+json:
+ schema:
+ type: object
+ application/json:
+ schema:
+ type: object
+ application/vnd.spring-boot.actuator.v2+json:
+ schema:
+ type: object
+ post:
+ tags:
+ - Actuator
+ summary: Actuator web endpoint 'loggers-name'
+ operationId: loggers-name_2
+ parameters:
+ - name: name
+ in: path
+ required: true
+ style: simple
+ explode: false
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: string
+ enum:
+ - TRACE
+ - DEBUG
+ - INFO
+ - WARN
+ - ERROR
+ - FATAL
+ - OFF
+ responses:
+ 200:
+ description: OK
+ content:
+ '*/*':
+ schema:
+ type: object
+ /actuator/health:
+ get:
+ tags:
+ - Actuator
+ summary: Actuator web endpoint 'health'
+ operationId: health
+ responses:
+ 200:
+ description: OK
+ content:
+ application/vnd.spring-boot.actuator.v3+json:
+ schema:
+ type: object
+ application/json:
+ schema:
+ type: object
+ application/vnd.spring-boot.actuator.v2+json:
+ schema:
+ type: object
+ /actuator/metrics:
+ get:
+ tags:
+ - Actuator
+ summary: Actuator web endpoint 'metrics'
+ operationId: metrics
+ responses:
+ 200:
+ description: OK
+ content:
+ application/vnd.spring-boot.actuator.v3+json:
+ schema:
+ type: object
+ application/json:
+ schema:
+ type: object
+ application/vnd.spring-boot.actuator.v2+json:
+ schema:
+ type: object
+ /actuator/heapdump:
+ get:
+ tags:
+ - Actuator
+ summary: Actuator web endpoint 'heapdump'
+ operationId: heapdump
+ responses:
+ 200:
+ description: OK
+ content:
+ application/octet-stream:
+ schema:
+ type: object
+components:
+ schemas:
+ Link:
+ type: object
+ properties:
+ templated:
+ type: boolean
+ href:
+ type: string