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

chi_clickhouse_metric_DetachedParts does not report zero #1620

Closed
filimonov opened this issue Jan 20, 2025 · 3 comments
Closed

chi_clickhouse_metric_DetachedParts does not report zero #1620

filimonov opened this issue Jan 20, 2025 · 3 comments
Assignees

Comments

@filimonov
Copy link
Member

missing metric instead

@Slach Slach self-assigned this Jan 21, 2025
@Slach
Copy link
Collaborator

Slach commented Jan 21, 2025

current query for fetch metric

		SELECT
			count() AS detached_parts,
			database,
			table,
			disk,
			if(coalesce(reason,'unknown')='','detached_by_user',coalesce(reason,'unknown')) AS detach_reason
		FROM system.detached_parts
		GROUP BY
			database,
			table,
			disk,
			reason

do you propose use system.tables LEFT JOIN system.detached_parts?

@Slach
Copy link
Collaborator

Slach commented Jan 21, 2025

why do you need zero metric value?

@filimonov
Copy link
Member Author

OK, probably that does not make too much sense, we just need to look on some other metric.

In short the problem is that it's hard to distinguish if the metric disappeared because it get zeroed, or because the scaping failed, and things like 'min_over_time' and similar work in a bit confusing way when the metric appears for a short a period of time, and then disappears again.

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

No branches or pull requests

2 participants