Skip to content

Commit 90832eb

Browse files
authored
Merge pull request #20 from oracle-devrel/proxygateway
Proxygateway
2 parents 36679a3 + 83dcc1f commit 90832eb

145 files changed

Lines changed: 5261 additions & 127 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The development team are building a grafana plugin that can be used to connect to the time series DB
2+
this is available at https://github.com/oracle-samples/oracle-telemetry-streaming
File renamed without changes.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#SQL Access
2+
## Why ?
3+
Though the primary access will be through promQL that is more for monitoring access. For broader access, for example combining business and IoT data (assuming both are in the same DB) there is also the option to access the data using "normal" SQL which allow access to the individual (not time series) data
4+
##How
5+
You need to connect to the database using your "normal" DB connect mechanisms (JDBC, SQLDeveloper, SQLPlus etc.) then access the TELEMETRY_METRICS data
6+
7+
'select * from TELEMETRY_METRICS order by metric_time_epoch desc fetch first 10 rows only'
8+
9+
|METRIC_NAME|METRIC_TAGS|METRIC_VALUE|METRIC_EPOCH_TIMESTAMP|
10+
|:-----:|:-----:|:-----:|:-----:|
11+
|iot.normalized.inverter_power_watts_point_in_time|{"iot_content_path":"InverterPowerWattsPointInTime","iot_content_type":"DECIMAL","iot_digital_twin_instance_id":"ocid1.iotdigitaltwininstance.oc1.uk-london-1.amaaaaaauevftmr7h6t75eifevhfihvbwazwi43ndgrauaawue22d6svdpna","iot_digital_twin_model_id":"ocid1.iotdigitaltwinmodel.oc1.uk-london-1.amaaaaaauevftmr7wuslrtqim6zflcxhqaprmzib74p76ev64g4zqy7edbva","iot_digital_twin_model_name":"homebattery","service_name":"IoTDBJDBC"}|-1947|1783075316.509|
12+
|iot.normalized.discharge_power |{"iot_content_path":"DischargePower","iot_content_type":"DECIMAL","iot_digital_twin_instance_id":"ocid1.iotdigitaltwininstance.oc1.uk-london-1.amaaaaaauevftmr7h6t75eifevhfihvbwazwi43ndgrauaawue22d6svdpna","iot_digital_twin_model_id":"ocid1.iotdigitaltwinmodel.oc1.uk-london-1.amaaaaaauevftmr7wuslrtqim6zflcxhqaprmzib74p76ev64g4zqy7edbva","iot_digital_twin_model_name":"homebattery","service_name":"IoTDBJDBC"}| 0 |1783075316.509|
13+
|iot.normalized.capacity_remaining |{"iot_content_path":"CapacityRemaining","iot_content_type":"DECIMAL","iot_digital_twin_instance_id":"ocid1.iotdigitaltwininstance.oc1.uk-london-1.amaaaaaauevftmr7h6t75eifevhfihvbwazwi43ndgrauaawue22d6svdpna","iot_digital_twin_model_id":"ocid1.iotdigitaltwinmodel.oc1.uk-london-1.amaaaaaauevftmr7wuslrtqim6zflcxhqaprmzib74p76ev64g4zqy7edbva","iot_digital_twin_model_name":"homebattery","service_name":"IoTDBJDBC"}| 8406 |1783075316.509|
14+
|iot.normalized.reserved_charge_percentage |{"iot_content_path":"ReservedChargePercentage","iot_content_type":"DECIMAL","iot_digital_twin_instance_id":"ocid1.iotdigitaltwininstance.oc1.uk-london-1.amaaaaaauevftmr7h6t75eifevhfihvbwazwi43ndgrauaawue22d6svdpna","iot_digital_twin_model_id":"ocid1.iotdigitaltwinmodel.oc1.uk-london-1.amaaaaaauevftmr7wuslrtqim6zflcxhqaprmzib74p76ev64g4zqy7edbva","iot_digital_twin_model_name":"homebattery","service_name":"IoTDBJDBC"} |5 |1783075316.509|
15+
16+
17+
Important to note. Open Telemetry recommends the use of dot separated namespaces with the names in snake_case, for example 'iot.normalized.inverter_power_watts_point_in_time' the IoTDBJDBC upload code supports this, currently however there is a "feature" in the time series DB code that on ingest converts the names of tags (also known as attributes) into only snake_case (e.g. iot.digital_twin.instance_id, to iot_digital_twin_instance_id) This was implemented to support PromQL (which seems to only like the use of _) but it means that when querying the data the tags may not be what you expect. This is being fixed, but for now when using the tags (which you will need to use to identify the specific devices) remember it's iot_digital_twin_instance_id
18+
19+
Also note that the upload code tries to do C like boolean mappings, so true is 1 and false is 0;
File renamed without changes.

IoTDBJDBC/SetupNotes/TimeSeriesMessageHandlersSetup.txt renamed to IoTDBJDBC/SetupAndDataAccessNotes/TimeSeriesMessageHandlersSetup.txt

File renamed without changes.

IoTDBJDBC/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ SOFTWARE. -->
5353
<packaging>jar</packaging>
5454
<jdk.version>21</jdk.version>
5555
<release.version>21</release.version>
56-
<version.ocisdk>3.74.2</version.ocisdk>
56+
<version.ocisdk>3.91.0</version.ocisdk>
5757
<version.lombok>1.18.46</version.lombok>
5858
<version.slf4j>2.0.7</version.slf4j>
5959
<!-- Oracle JDBC 23ai line (set to the latest approved version) -->

IoTDemoProxyGateway/.classpath

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" output="target/classes" path="src/main/java">
4+
<attributes>
5+
<attribute name="optional" value="true"/>
6+
<attribute name="maven.pomderived" value="true"/>
7+
</attributes>
8+
</classpathentry>
9+
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
10+
<attributes>
11+
<attribute name="maven.pomderived" value="true"/>
12+
<attribute name="optional" value="true"/>
13+
</attributes>
14+
</classpathentry>
15+
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
16+
<attributes>
17+
<attribute name="optional" value="true"/>
18+
<attribute name="maven.pomderived" value="true"/>
19+
<attribute name="test" value="true"/>
20+
</attributes>
21+
</classpathentry>
22+
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
23+
<attributes>
24+
<attribute name="maven.pomderived" value="true"/>
25+
<attribute name="test" value="true"/>
26+
<attribute name="optional" value="true"/>
27+
</attributes>
28+
</classpathentry>
29+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21">
30+
<attributes>
31+
<attribute name="maven.pomderived" value="true"/>
32+
</attributes>
33+
</classpathentry>
34+
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
35+
<attributes>
36+
<attribute name="maven.pomderived" value="true"/>
37+
</attributes>
38+
</classpathentry>
39+
<classpathentry kind="src" path="target/generated-sources/annotations">
40+
<attributes>
41+
<attribute name="optional" value="true"/>
42+
</attributes>
43+
</classpathentry>
44+
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
45+
<attributes>
46+
<attribute name="optional" value="true"/>
47+
<attribute name="test" value="true"/>
48+
</attributes>
49+
</classpathentry>
50+
<classpathentry kind="output" path="target/classes"/>
51+
</classpath>

IoTDemoProxyGateway/.factorypath

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<factorypath>
2+
<factorypathentry kind="VARJAR" id="M2_REPO/org/projectlombok/lombok/1.18.42/lombok-1.18.42.jar" enabled="true" runInBatchMode="false"/>
3+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/micronaut-inject-java/4.10.25/micronaut-inject-java-4.10.25.jar" enabled="true" runInBatchMode="false"/>
4+
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-api/2.0.17/slf4j-api-2.0.17.jar" enabled="true" runInBatchMode="false"/>
5+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/micronaut-core-processor/4.10.25/micronaut-core-processor-4.10.25.jar" enabled="true" runInBatchMode="false"/>
6+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/micronaut-inject/4.10.25/micronaut-inject-4.10.25.jar" enabled="true" runInBatchMode="false"/>
7+
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/inject/jakarta.inject-api/2.0.1/jakarta.inject-api-2.0.1.jar" enabled="true" runInBatchMode="false"/>
8+
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/annotation/jakarta.annotation-api/2.1.1/jakarta.annotation-api-2.1.1.jar" enabled="true" runInBatchMode="false"/>
9+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/micronaut-core/4.10.25/micronaut-core-4.10.25.jar" enabled="true" runInBatchMode="false"/>
10+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/micronaut-aop/4.10.25/micronaut-aop-4.10.25.jar" enabled="true" runInBatchMode="false"/>
11+
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/javaparser/javaparser-symbol-solver-core/3.27.0/javaparser-symbol-solver-core-3.27.0.jar" enabled="true" runInBatchMode="false"/>
12+
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/javaparser/javaparser-core/3.27.0/javaparser-core-3.27.0.jar" enabled="true" runInBatchMode="false"/>
13+
<factorypathentry kind="VARJAR" id="M2_REPO/org/checkerframework/checker-qual/3.49.4/checker-qual-3.49.4.jar" enabled="true" runInBatchMode="false"/>
14+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/sourcegen/micronaut-sourcegen-bytecode-writer/1.8.2/micronaut-sourcegen-bytecode-writer-1.8.2.jar" enabled="true" runInBatchMode="false"/>
15+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/sourcegen/micronaut-sourcegen-model/1.8.2/micronaut-sourcegen-model-1.8.2.jar" enabled="true" runInBatchMode="false"/>
16+
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm-commons/9.8/asm-commons-9.8.jar" enabled="true" runInBatchMode="false"/>
17+
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm-tree/9.8/asm-tree-9.8.jar" enabled="true" runInBatchMode="false"/>
18+
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm-util/9.8/asm-util-9.8.jar" enabled="true" runInBatchMode="false"/>
19+
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm-analysis/9.8/asm-analysis-9.8.jar" enabled="true" runInBatchMode="false"/>
20+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/micronaut-core-reactive/4.10.25/micronaut-core-reactive-4.10.25.jar" enabled="true" runInBatchMode="false"/>
21+
<factorypathentry kind="VARJAR" id="M2_REPO/org/reactivestreams/reactive-streams/1.0.4/reactive-streams-1.0.4.jar" enabled="true" runInBatchMode="false"/>
22+
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm/9.8/asm-9.8.jar" enabled="true" runInBatchMode="false"/>
23+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/micronaut-graal/4.10.25/micronaut-graal-4.10.25.jar" enabled="true" runInBatchMode="false"/>
24+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/micronaut-http-validation/4.10.25/micronaut-http-validation-4.10.25.jar" enabled="true" runInBatchMode="false"/>
25+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/micronaut-http-server/4.10.25/micronaut-http-server-4.10.25.jar" enabled="true" runInBatchMode="false"/>
26+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/micronaut-http/4.10.25/micronaut-http-4.10.25.jar" enabled="true" runInBatchMode="false"/>
27+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/micronaut-context-propagation/4.10.25/micronaut-context-propagation-4.10.25.jar" enabled="true" runInBatchMode="false"/>
28+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/micronaut-router/4.10.25/micronaut-router-4.10.25.jar" enabled="true" runInBatchMode="false"/>
29+
<factorypathentry kind="VARJAR" id="M2_REPO/io/projectreactor/reactor-core/3.7.12/reactor-core-3.7.12.jar" enabled="true" runInBatchMode="false"/>
30+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/micronaut-websocket/4.10.25/micronaut-websocket-4.10.25.jar" enabled="true" runInBatchMode="false"/>
31+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/micronaut-http-client-core/4.10.25/micronaut-http-client-core-4.10.25.jar" enabled="true" runInBatchMode="false"/>
32+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/micronaut-discovery-core/4.10.25/micronaut-discovery-core-4.10.25.jar" enabled="true" runInBatchMode="false"/>
33+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/serde/micronaut-serde-processor/2.16.2/micronaut-serde-processor-2.16.2.jar" enabled="true" runInBatchMode="false"/>
34+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/serde/micronaut-serde-api/2.16.2/micronaut-serde-api-2.16.2.jar" enabled="true" runInBatchMode="false"/>
35+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/micronaut-context/4.9.11/micronaut-context-4.9.11.jar" enabled="true" runInBatchMode="false"/>
36+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/micronaut-json-core/4.9.11/micronaut-json-core-4.9.11.jar" enabled="true" runInBatchMode="false"/>
37+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/validation/micronaut-validation-processor/4.12.0/micronaut-validation-processor-4.12.0.jar" enabled="true" runInBatchMode="false"/>
38+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/validation/micronaut-validation/4.12.0/micronaut-validation-4.12.0.jar" enabled="true" runInBatchMode="false"/>
39+
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/validation/jakarta.validation-api/3.1.1/jakarta.validation-api-3.1.1.jar" enabled="true" runInBatchMode="false"/>
40+
<factorypathentry kind="VARJAR" id="M2_REPO/io/micronaut/reactor/micronaut-reactor/3.9.0/micronaut-reactor-3.9.0.jar" enabled="true" runInBatchMode="false"/>
41+
<factorypathentry kind="PLUGIN" id="org.eclipse.jst.ws.annotations.core" enabled="false" runInBatchMode="false"/>
42+
</factorypath>

IoTDemoProxyGateway/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/config/
2+
/configsecure/
3+
/target/
4+
/samples/

IoTDemoProxyGateway/.project

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>IoTDemoProxyGateway</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.m2e.core.maven2Builder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.jdt.core.javanature</nature>
21+
<nature>org.eclipse.m2e.core.maven2Nature</nature>
22+
</natures>
23+
</projectDescription>

0 commit comments

Comments
 (0)