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

[core] Collector and Checks metrics Governor #1468

Closed
wants to merge 1 commit into from

Conversation

yannmh
Copy link
Member

@yannmh yannmh commented Mar 25, 2015

Collector and Checks metrics Governor is ready for review !

What is a Limiter ?

A limiter is a rule set to monitor the metric stream.

It is defined by:

  • a scope: scope where the rule applies
  • a selection: selection where the rule applies
  • an optional limit: limit of selections per scope.

scope and selection are defined as subset of ['name', 'agent', 'check', 'tags'] and allow to define
custom rules.
For instance
'scope' = ('name', 'check') selection = 'tags' monitors number of tags per (metric name, check)
'scope' = 'agent' selection = 'name' monitors globally the number of metrics names

Limiters keep tracks of 'active' selections (see point below), i.e. metrics's met selections on a sliding window, and count the number of metrics exceeding the limit set.

What an 'active' selection ?

A selection is considered as 'active', if it has been met at least once during the last X metrics stream batch processing, where X is a settable parameter.

What is a Governor ?

A Governor supervises multiple limiters: submitting metric stream batches for checks, and reporting when an anomaly is detected.

Governors are split in two categories

  • CheckGovernor.
    Supervise check scoped limiters.
  • AgentGovernor.
    Supervise wide scoped limiters.
    When a limiter hit the active selections limit, a warning is post to Datadog.

Notes

For now the Governor is ready-only and does not alterate any payload.

TO-DO

  • Choose where to get Governor settings from (hardcoded for now)
  • Define Governor settings
  • Enable Governor report endpoint
  • Add a Governor for Dogstatsd metrics

@yannmh yannmh added the core label Mar 25, 2015
@yannmh yannmh self-assigned this Mar 25, 2015
@yannmh yannmh added this to the To be determined milestone Mar 25, 2015
@degemer
Copy link
Member

degemer commented Mar 25, 2015

I think you could use the new utils/ subclass for governor.py.

_METRIC_FORMAT = ['name', 'timestamp', 'value', 'attributes']

# Governor report endpoint
DATADOG_REPORT_GOVERNOR_URL = 'agent_governor/report_too_many_active_contexts'
Copy link
Member

Choose a reason for hiding this comment

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

It would probably me more flexible to have a agent_governor/report endpoint and support different "events" from the governor

@yannmh
Copy link
Member Author

yannmh commented Mar 30, 2015

Good idea @degemer. Moving governor.py to utils/

@remh
Copy link

remh commented May 11, 2015

Won't be implemented.

@remh remh closed this May 11, 2015
@yannmh yannmh deleted the yann/metrics-governor branch June 18, 2015 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants