https://github.com/iot-salzburg/pantarhei_nimble
integrate PantaRhei data to a database as it could have been negotiated through the nimble platform.
https://github.com/iot-salzburg/pantarhei_nimble
Last synced: about 2 months ago
JSON representation
integrate PantaRhei data to a database as it could have been negotiated through the nimble platform.
- Host: GitHub
- URL: https://github.com/iot-salzburg/pantarhei_nimble
- Owner: iot-salzburg
- License: apache-2.0
- Created: 2019-07-08T14:01:54.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-05-23T05:34:34.000Z (almost 3 years ago)
- Last Synced: 2024-05-02T04:04:07.970Z (about 1 year ago)
- Language: Java
- Size: 13.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PantaRhei_nimble
Integrate PantaRhei data to a database as it could have been negotiated through the nimble platform.
### Params of the PantaRhei Stack:
```java
private static final String BOOTSTRAPSERVERS = "192.168.48.71:9092,192.168.48.72:9092,192.168.48.73:9092,192.168.48.74:9092,192.168.48.75:9092";
private static final String GROUPID = "nimble-forwarder";
private static final String[] TOPICS = {"at.srfg.iot.nimbledc.data", "at.srfg.iot.nimbledc.external"};
```### Params of the DB:
```
"jdbc:postgresql://localhost:5432/nimbledc"
```### Params of the StreamHub Application:
```java
final String INPUT_TOPIC = "at.srfg.iot.dtz.data";
final String [] OUTPUT_TOPICS = {"at.srfg.iot.nimbledc.external"};
final String BOOTSTRAP_SERVERS_CONFIG = "192.168.48.71:9092,192.168.48.72:9092,192.168.48.73:9092,192.168.48.74:9092,192.168.48.75:9092";
```### Useful commands to extract data from the DB:
```sql
sudo -u postgres psql -d nimbledc -c "SELECT count(*) FROM data;"
sudo -u postgres psql -d nimbledc -c "SELECT * FROM data WHERE timestamp >= CAST(NOW()- interval '1 hour' AS text) AND id=69 ORDER BY timestamp DESC;"
```