Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

remove usage reporting from MT #666

Merged
merged 4 commits into from
Jul 19, 2017
Merged

remove usage reporting from MT #666

merged 4 commits into from
Jul 19, 2017

Conversation

woodsaj
Copy link
Member

@woodsaj woodsaj commented Jun 22, 2017

  • include a "shardID" in the series name used for usage reporting.
    this will allow usage of each shard to be aggregated at query time.
    the shardID is just each partition concatenated together in the form
    "shard-<partition>[-<partition>...]"

  • when writing usage metrics set the "partition" of the metric to one of
    the partition numbers the node is handling

  • issue make per org usage stats work on multinode clusters #665

usage/usage.go Outdated
metrics = m
metricIndex = i
Clock = cl
partition := partitions[0]
Copy link
Contributor

@replay replay Jun 27, 2017

Choose a reason for hiding this comment

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

That's an edge case, but I can't see anything that guarantees that there is >=1 partitions and not 0

usage/usage.go Outdated
period: period,
now: make(map[int]orgstat),
stop: make(chan struct{}),
shardID: shardID,
Copy link
Contributor

Choose a reason for hiding this comment

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

There is also nothing which sorts the partition IDs after they've been parsed out of the file: https://github.com/raintank/metrictank/blob/master/input/kafkamdm/kafkamdm.go#L147-L164
But considering that the list of partition IDs is part of the shardID i think it might make sense to sort them in order to guarantee that the same combination of partitions results in the same shardID

@Dieterbe
Copy link
Contributor

see #665 (comment)

@woodsaj
Copy link
Member Author

woodsaj commented Jul 17, 2017

ok, i have come to the realisation that this just can't be done nicely from within MT. So let's just get rid of these usage stats and extend tsdb-gw to collect them.

@woodsaj woodsaj changed the title make usage reporting per shard remove usage reporting from MT Jul 17, 2017
- metrictank is designed as an at-scale TSDB.  Therefore it should
  always be run as a cluster. The usage reporting doesnt work in
  a clustered environment.  Usage reporting should be done from
  the ingestion tool (carbon-relay-ng or tsdb-gw)
@Dieterbe
Copy link
Contributor

ok, i have come to the realisation that this just can't be done nicely from within MT. So let's just get rid of these usage stats and extend tsdb-gw to collect them.

can you elaborate on this?

@woodsaj
Copy link
Member Author

woodsaj commented Jul 17, 2017

can you elaborate on this?

see #665 (comment)

@Dieterbe
Copy link
Contributor

Dieterbe commented Jul 19, 2017

Well, i'm glad we're finally in agreement to take this out of MT.
this means fix #665 #225 #342 #419

Copy link
Contributor

@Dieterbe Dieterbe left a comment

Choose a reason for hiding this comment

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

there's more stuff to remove. just run grep -Ri usage . | grep -v vendor in the MT dir.

@woodsaj
Copy link
Member Author

woodsaj commented Jul 19, 2017

@Dieter can this be merged now?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants