Skip to content

Commit 5eb3202

Browse files
authored
[OMON-584] Use full InfluxDB URL (#294)
1 parent 736839b commit 5eb3202

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ endif()
3131

3232
# Define project
3333
project(Monitoring
34-
VERSION 3.12.7
34+
VERSION 3.12.10
3535
DESCRIPTION "O2 Monitoring library"
3636
LANGUAGES CXX
3737
)

examples/12-KafkaToInfluxDb.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ int main(int argc, char* argv[])
2222
boost::program_options::options_description desc("Program options");
2323
desc.add_options()
2424
("kafka-host", boost::program_options::value<std::string>()->required(), "Kafka broker hostname")
25-
("influxdb-host", boost::program_options::value<std::string>()->required(), "InfluxDB hostname")
25+
("influxdb-url", boost::program_options::value<std::string>()->required(), "InfluxDB hostname")
2626
("influxdb-token", boost::program_options::value<std::string>()->required(), "InfluxDB token")
2727
("influxdb-org", boost::program_options::value<std::string>()->default_value("cern"), "InfluxDB organisation")
2828
("influxdb-bucket", boost::program_options::value<std::string>()->default_value("aliecs"), "InfluxDB bucket");
@@ -33,7 +33,7 @@ int main(int argc, char* argv[])
3333
std::vector<std::string> topics = {"aliecs.env_leave_state.RUNNING"};
3434
auto kafkaConsumer = std::make_unique<transports::KafkaConsumer>(vm["kafka-host"].as<std::string>() + ":9092", topics, "aliecs-run-times");
3535
auto httpTransport = std::make_unique<transports::HTTP>(
36-
"http://" + vm["influxdb-host"].as<std::string>() + ":8086/api/v2/write?" +
36+
vm["influxdb-url"].as<std::string>() + "/api/v2/write?" +
3737
"org=" + vm["influxdb-org"].as<std::string>() + "&" +
3838
"bucket=" + vm["influxdb-bucket"].as<std::string>()
3939
);

0 commit comments

Comments
 (0)