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

Send all metrics and remove typesDB config option #35

Merged
merged 4 commits into from
Sep 8, 2021

Conversation

sumo-drosiek
Copy link
Contributor

@sumo-drosiek sumo-drosiek commented Sep 7, 2021

Use collectd.get_dataset to obtain dataset definition instead of usint typesDb

Dominik Rosiek added 3 commits September 7, 2021 12:48
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
@sumo-drosiek sumo-drosiek requested a review from a team as a code owner September 7, 2021 12:28
@sumo-drosiek sumo-drosiek changed the title Send all metric and remove typesDB config option Send all metrics and remove typesDB config option Sep 7, 2021
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
@@ -51,7 +51,12 @@ def write_callback(self, raw_data, _=None):
Write callback
"""

metrics = convert_to_metrics(raw_data, self.met_config.types)
try:
data_set = self.collectd.get_dataset(raw_data.type)
Copy link

Choose a reason for hiding this comment

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

Do we need to handle the None case as well as mentioned in get_datset return values here https://collectd.org/documentation/manpages/collectd-python.5.shtml ?

Copy link
Contributor Author

@sumo-drosiek sumo-drosiek Sep 8, 2021

Choose a reason for hiding this comment

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

min and max has not been taken into account so far, and in case dataset gets invalid metric type it raises TypeError

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I open new issue to track this: #36

@sumo-drosiek sumo-drosiek merged commit 8b079b3 into main Sep 8, 2021
@sumo-drosiek sumo-drosiek deleted the drosiek-send-all-types branch September 8, 2021 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants