diff options
Diffstat (limited to 'opendc-common/src/main/resources')
| -rw-r--r-- | opendc-common/src/main/resources/consumer.toml | 6 | ||||
| -rw-r--r-- | opendc-common/src/main/resources/database.toml | 5 | ||||
| -rw-r--r-- | opendc-common/src/main/resources/log4j2.xml | 1 | ||||
| -rw-r--r-- | opendc-common/src/main/resources/producer.toml | 5 | ||||
| -rw-r--r-- | opendc-common/src/main/resources/schema.proto | 14 |
5 files changed, 31 insertions, 0 deletions
diff --git a/opendc-common/src/main/resources/consumer.toml b/opendc-common/src/main/resources/consumer.toml new file mode 100644 index 00000000..0f4a2d1d --- /dev/null +++ b/opendc-common/src/main/resources/consumer.toml @@ -0,0 +1,6 @@ +"bootstrap.servers" = "127.0.0.1:9092" +"key.deserializer" = "org.apache.kafka.common.serialization.VoidDeserializer" +"value.deserializer" = "io.confluent.kafka.serializers.protobuf.KafkaProtobufDeserializer" +"group.id" = "connect-postgresql-sink" +"enable.auto.commit" = "true" +"auto.commit.interval.ms" = "1000" diff --git a/opendc-common/src/main/resources/database.toml b/opendc-common/src/main/resources/database.toml new file mode 100644 index 00000000..35e1d159 --- /dev/null +++ b/opendc-common/src/main/resources/database.toml @@ -0,0 +1,5 @@ +"address" = "127.0.0.1:5432" +"username" = "matt" +"password" = "admin" +"database" = "opendc" +"table" = "postgres_topic"
\ No newline at end of file diff --git a/opendc-common/src/main/resources/log4j2.xml b/opendc-common/src/main/resources/log4j2.xml index 07389360..d79ec204 100644 --- a/opendc-common/src/main/resources/log4j2.xml +++ b/opendc-common/src/main/resources/log4j2.xml @@ -29,6 +29,7 @@ <PatternLayout pattern="%d{HH:mm:ss.SSS} [%highlight{%-5level}] %logger{36} - %msg%n" disableAnsi="false"/> </Console> </Appenders> + <Loggers> <Logger name="org.opendc" level="warn" additivity="false"> <AppenderRef ref="Console"/> diff --git a/opendc-common/src/main/resources/producer.toml b/opendc-common/src/main/resources/producer.toml new file mode 100644 index 00000000..33a09284 --- /dev/null +++ b/opendc-common/src/main/resources/producer.toml @@ -0,0 +1,5 @@ +"bootstrap.servers" = "127.0.0.1:9092" +"key.serializer" = "org.apache.kafka.common.serialization.VoidSerializer" +"value.serializer" = "io.confluent.kafka.serializers.protobuf.KafkaProtobufSerializer" +"schema.registry.url" = "http://localhost:8081" +"auto.register.schemas" = "true"
\ No newline at end of file diff --git a/opendc-common/src/main/resources/schema.proto b/opendc-common/src/main/resources/schema.proto new file mode 100644 index 00000000..d0aa18d5 --- /dev/null +++ b/opendc-common/src/main/resources/schema.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +package proto; + +option java_package = "org.opendc.common"; +option java_outer_classname = "ProtobufMetrics"; + +message ProtoExport { + string timestamp = 1; + string host_id = 2; + int32 tasksactive = 3; + double cpuutilization = 4; + double energyusage = 5; +}
\ No newline at end of file |
