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

Show aggregated process metrics in containers/k8s pods #1257

Open
2opremio opened this issue Apr 11, 2016 · 5 comments
Open

Show aggregated process metrics in containers/k8s pods #1257

2opremio opened this issue Apr 11, 2016 · 5 comments
Labels
dogfood Important for the developer's own use of the project feature Indicates that issue is related to new end user functionality
Milestone

Comments

@2opremio
Copy link
Contributor

As a user I would like to see things such as open file descriptors (or plugin metrics), at the container level (and kubernetes pod level) instead of clicking on each process inside the container to view them.

container

screen shot 2016-04-11 at 1 02 54 pm

In fact, obtaining the CPU/memory consumption of the container by aggregating the CPU/memory of processes would also fix #1133

@2opremio 2opremio added the dogfood Important for the developer's own use of the project label Apr 11, 2016
@2opremio 2opremio added this to the Pre-1.0 milestone Apr 11, 2016
@2opremio 2opremio changed the title Show aggregated process metrics in containers/pods Show aggregated process metrics in containers/k8s pods Apr 11, 2016
@rade rade added the feature Indicates that issue is related to new end user functionality label Jul 4, 2016
@rade rade modified the milestone: Pre-1.0 Jul 4, 2016
@2opremio
Copy link
Contributor Author

According to @tomwilkie we probably want to do this sort of aggregations through prometheus.

@alepuccetti
Copy link

alepuccetti commented Oct 31, 2016

Aggregation Proposal

Proposal on how to implementation data sources aggregation in scope.

Aggregation Architecture for Scope

To describe an aggregation type we need 2 attributes:

  • AggregationPolicy: define how to perform the aggregation default, max, min, sum, average, median, list,...
  • AggregationLevel: where to perform the aggregation container, host, pod, replication-controller,...

All the data source types that will allow aggregation must be extended to include these 2 attributes.

type AggregationType {
    AggregationPolicy   string
    AggregationLevel    string
}

type MetricTemplate struct {
    ID              string  `json:"id"`
    Label           string  `json:"label,omitempty"`
    Format          string  `json:"format,omitempty"`
    Priority        float64 `json:"priority,omitempty"`
    Aggregations    []AggregationType `json:"aggregations,omitempty"`
}

Allowing a list of AggregationType makes the aggregation more flexible, it is possible to specify many policies for the same level (or different policies for different levels) for the same data source and as result, the UI could show multiple different aggregate values accordingly with the specified values.
I think that extending the templates is sufficient and the actual data point do not need to be changed because we want to allow aggregate a specific type of measure.

List of data structure to extend:

type MetadataTemplate struct {

type MetricTemplate struct {

type TableTemplate struct {

JSON Example

This example is based on the structure of the HTTP statistics report

{
  "Process": {
    "metric_templates": {
      "http_requests_per_second": {
        "id": "http_requests_per_second",
        "label": "HTTP Req/Second",
        "priority": 0.1,
        "aggregations": [
             {
               "aggregation_policy": "sum",
               "aggregation_level": "container”
             },
             {
               "aggregation_policy": "max",
               "aggregation_level": "container”
             }
          ]
      }
    },
    "nodes": {
      "example.org;29770": {
        "metrics": {
          "http_requests_per_second": {
            "samples": [
              {
                "date": "2016-09-21T07:22:24.293175Z",
                "value": 1.0
              }
            ]
          }
        }
      }
    }
  }
}

At first we can implement the "sum" policy, but the json types are expressive enough to be able to add more later without breaking compatibility (e.g. max, min, avarage, list, ...).

/cc @fons, @alban, @tomwilkie

@rade
Copy link
Member

rade commented Nov 3, 2016

AggregationLevels

That should be singular, right? i.e. the value is the name of a single level.

@alepuccetti
Copy link

alepuccetti commented Nov 3, 2016

That should be singular, right? i.e. the value is the name of a single level.

Yes, that is a typo. Sorry about that.

@rade
Copy link
Member

rade commented Jul 14, 2017

@rndstr I believe your work in #2664 etc will address this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dogfood Important for the developer's own use of the project feature Indicates that issue is related to new end user functionality
Projects
None yet
Development

No branches or pull requests

4 participants