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

Add commandline option to disable schedule-related metrics #19

Closed
wants to merge 1 commit into from

Conversation

wolfmd
Copy link

@wolfmd wolfmd commented Aug 4, 2022

Schedule metrics can be quite verbose for larger pagerduty accounts. Add an option to disable the pagerduty_schedule_* metrics at runtime.

This will allow users to cut down on cardinality and metrics that aren't needed for their usecase.

For an example in my particular environment
Without the disable-schedule flag set

$ curl localhost:8080/metrics | wc -l
    7477

With the disable-schedule flag set

$ curl localhost:8080/metrics | wc -l
     720

Schedule metrics can be quite verbose for larger pagerduty accounts.
Add an option to disable the pagerduty_schedule_* metrics at
runtime.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 4, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@mblaschke
Copy link
Member

i would like to merge the flag --scrape.time.schedule= which then is based by default on --scrape.time= if not set.
So if you set --scrape.time.schedule= to 0 it will disable it.

This could be done for other scrapes as well

@wolfmd
Copy link
Author

wolfmd commented Aug 6, 2022

If you've got a PR for that ready I'd be happy to decline this in favor of whatever you feel makes sense

mblaschke added a commit that referenced this pull request Aug 6, 2022
collectors can be disabled now #19

Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
@mblaschke
Copy link
Member

please try webdevops/pagerduty-exporter:main with env var SCRAPE_TIME_SCHEDULE=0

@mblaschke mblaschke closed this Sep 25, 2022
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

Successfully merging this pull request may close these issues.

2 participants