Skip to content

Commit

Permalink
Merge pull request #33 from canonical/feature/scrape-timeout
Browse files Browse the repository at this point in the history
add config option for metrics.global.scrape_timeout
  • Loading branch information
lucabello authored Nov 23, 2023
2 parents 26f3916 + fe00923 commit 687a545
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ options:
Loki).
type: boolean
default: false
scrape-timeout-sec:
description: The global metrics scrape timeout (seconds).
type: int
default: 10
3 changes: 3 additions & 0 deletions src/grafana_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,9 @@ def _generate_config(self) -> Dict[str, Any]:
"integrations": self._integrations_config,
"metrics": {
"wal_directory": "/tmp/agent/data",
"global": {
"scrape_timeout": self.model.config.get("global_scrape_timeout"),
},
"configs": [
{
"name": "agent_scraper",
Expand Down

0 comments on commit 687a545

Please sign in to comment.