Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature #4151551: TFS plugin refactor streamer.py file #278

Merged
merged 20 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/fluentd_telemetry_plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ Usage
| [fluentd-endpoint.timeout](conf/fluentd_telemetry_plugin.cfg#L9) | True | Timeout in seconds for Fluentd endpoint streaming | 120 |
| [ufm-telemetry-endpoint.host](conf/fluentd_telemetry_plugin.cfg#L2) | True | Hostname or IPv4 or IPv6 for The UFM Telemetry Endpoint | 127.0.0.1 |
| [ufm-telemetry-endpoint.port](conf/fluentd_telemetry_plugin.cfg#L3) | True | Port for The UFM Telemetry Endpoint | 9001 |
| [ufm-telemetry-endpoint.url](conf/fluentd_telemetry_plugin.cfg#L4) | True | URL for The UFM Telemetry Endpoint, for Prometheus format you can use 'metrics' | 'csv/metrics' |
| [ufm-telemetry-endpoint.url](conf/fluentd_telemetry_plugin.cfg#L4) | True | URL for The UFM Telemetry Endpoint. | 'csv/metrics' |
| [ufm-telemetry-endpoint.interval](conf/fluentd_telemetry_plugin.cfg#L13) | True | Streaming interval in seconds | 30 |
| [ufm-telemetry-endpoint.message_tag_name](conf/fluentd_telemetry_plugin.cfg#L10) | False | Message Tag Name for Fluentd endpoint message | ufm-telemetry-endpoint.host:ufm-telemetry-endpoint.port |
| [ufm-telemetry-endpoint.xdr_mode](conf/fluentd_telemetry_plugin.cfg#7) | True | If True for a specific UFM telemetry endpoint, the TFS will start collecting/streaming the configured ports types specified under “xdr_ports_types” | False |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ interval = 30
message_tag_name =
xdr_mode=False
xdr_ports_types=legacy;aggregated;plane
timeout=60
Miryam-Schwartz marked this conversation as resolved.
Show resolved Hide resolved

[fluentd-endpoint]
host =
Expand Down
10 changes: 3 additions & 7 deletions plugins/fluentd_telemetry_plugin/src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,12 @@
# pylint: disable=wrong-import-position
import logging
from web_service import UFMTelemetryFluentdStreamingAPI
from streamer import \
UFMTelemetryStreaming,\
UFMTelemetryStreamingConfigParser,\
UFMTelemetryConstants
from streamer import UFMTelemetryStreaming
from streaming_config_parser import UFMTelemetryStreamingConfigParser
from streaming_scheduler import StreamingScheduler

# pylint: disable=no-name-in-module,import-error
from utils.flask_server import run_api
from utils.args_parser import ArgsParser
from utils.logger import Logger
from utils.utils import Utils

Expand All @@ -46,8 +43,7 @@ def _init_logs(config_parser):
if __name__ == '__main__':

# init app config parser & load config files
args = ArgsParser.parse_args("UFM Telemetry Streaming to fluentd", UFMTelemetryConstants.args_list)
_config_parser = UFMTelemetryStreamingConfigParser(args)
_config_parser = UFMTelemetryStreamingConfigParser()

_init_logs(_config_parser)

Expand Down
Loading