Skip to content

Commit

Permalink
no engine_otl_endpoint parameter in telegraf config (#1676)
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-christophe81 authored Sep 6, 2024
1 parent cb70ed3 commit d883265
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 21 deletions.
Binary file modified engine/modules/opentelemetry/doc/otel_configuration.odg
Binary file not shown.
Binary file modified engine/modules/opentelemetry/doc/otel_configuration.pdf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class conf_server_config {
unsigned _second_keep_alive_interval;
std::string _certificate_path;
std::string _key_path;
std::string _engine_otl_endpoint;
unsigned _check_interval;

public:
Expand All @@ -54,9 +53,6 @@ class conf_server_config {

const std::string& get_certificate_path() const { return _certificate_path; }
const std::string& get_key_path() const { return _key_path; }
const std::string& get_engine_otl_endpoint() const {
return _engine_otl_endpoint;
}

bool operator==(const conf_server_config& right) const;
};
Expand Down
15 changes: 1 addition & 14 deletions engine/modules/opentelemetry/src/telegraf/conf_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,8 @@ static constexpr std::string_view _config_schema(R"(
"description": "interval in seconds between two checks (param [agent] interval) ",
"type": "integer",
"minimum": 10
},
"engine_otel_endpoint": {
"description": "opentelemetry engine grpc server",
"type": "string",
"minLength": 5
}
},
"required":[
"engine_otel_endpoint"
],
"type": "object"
}
)");
Expand All @@ -105,7 +97,6 @@ conf_server_config::conf_server_config(const rapidjson::Value& json_config_v,
throw;
}

_engine_otl_endpoint = json_config.get_string("engine_otel_endpoint");
_check_interval = json_config.get_unsigned("check_interval", 60);

if (json_config_v.HasMember("http_server")) {
Expand Down Expand Up @@ -396,12 +387,8 @@ void conf_session<connection_class>::answer_to_request(
## Default data collection interval for all inputs
interval = "{}s"
[[outputs.opentelemetry]]
service_address = "{}"
)",
_telegraf_conf->get_check_interval(),
_telegraf_conf->get_engine_otl_endpoint());
_telegraf_conf->get_check_interval());
bool at_least_one_found = _get_commands(host, resp->body());
if (at_least_one_found) {
resp->result(boost::beast::http::status::ok);
Expand Down
3 changes: 0 additions & 3 deletions tests/resources/opentelemetry/telegraf.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
## Default data collection interval for all inputs
interval = "60s"

[[outputs.opentelemetry]]
service_address = "127.0.0.1:4317"


[[inputs.exec]]
name_override = "otel_check_icmp_host_1"
Expand Down

2 comments on commit d883265

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
9 1 0 10 90.00 5m13.161195s

Failed Tests

Name Message ⏱️ Duration Suite
BEOTEL_TELEGRAF_CHECK_HOST hosts table not updated 41.454 s Opentelemetry

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
14 1 0 15 93.33 25m6.979934s

Failed Tests

Name Message ⏱️ Duration Suite
BENCH_1000STATUS_100ENGINE AttributeError: 'NoneType' object has no attribute 'query_read_bytes' 97.628 s Bench

Please sign in to comment.