pagerduty-exporter
pagerduty-exporter copied to clipboard
code 400 when collector=Summary
When I test pagerduty exporter, there is always this error in the running log:
HTTP response failed with status code 400, message: Arguments Caused Error (code: 2002) collector=Summary
ERRO[0195] &{0xc00021a000 map[collector:Summary] 2021-11-01 14:05:32.236131 +0800 CST m=+195.528282675 panic
can you provide the whole log? is there a stack trace?
can you also please deliver all settings/environment variables (except the token)?
can you provide the whole log? is there a stack trace?
can you also please deliver all settings/environment variables (except the token)?
it is my running log :
tarting pagerduty-exporter v
can you provide the whole log? is there a stack trace?
can you also please deliver all settings/environment variables (except the token)?
This log will appear after running for more than ten seconds:
NFO[0180] starting metrics collection collector=Incident
INFO[0180] starting metrics collection collector=OnCall
PANI[0182] HTTP response failed with status code 400, message: Arguments Caused Error (code: 2002) collector=Summary
ERRO[0182] &{0xc0001825b0 map[collector:Summary] 2021-11-02 09:30:12.007774 +0800 CST m=+182.873421728 panic
can you provide the whole log? is there a stack trace?
can you also please deliver all settings/environment variables (except the token)?
I only use the arguments is the authtoken,my start command is : go run .go --pagerduty.authtoken=*****
You are building the exporter on your own, right? You dont use the docker images?
can you also run it with --debug
?
Yes, I run locally,and my go version is 1.16
and I want to select all incident(include:triggered、acknowledged、resolved,currently only triggered and acknowledged),so I add "resolved" in listOpts.Statuses = []string{"triggered", "acknowledged"}, and an error occurred while running:
PANI[0316] HTTP response failed with status code 400, message: Arguments Caused Error (code: 2002) collector=Incident
ERRO[0316] &{0xc0001f91f0 map[collector:Incident] 2021-11-03 13:49:43.614487 +0800 CST m=+316.890111869 panic
i've added the possibility to define the incident status filter with env var PAGERDUTY_INCIDENT_STATUS
or --pagerduty.incident.status
is that solving your issue?
for all statuses use: --pagerduty.incident.status=acknowledged --pagerduty.incident.status=triggered --pagerduty.incident.status=resolved
or use --pagerduty.incident.status=all
i've added the possibility to define the incident status filter with env var
PAGERDUTY_INCIDENT_STATUS
or--pagerduty.incident.status
is that solving your issue? for all statuses use:
--pagerduty.incident.status=acknowledged --pagerduty.incident.status=triggered --pagerduty.incident.status=resolved
or use
--pagerduty.incident.status=all
I update the code to the latest, and then use the parameter you changed -- pagerduty. Increment. Status = all. Then I run it locally, and the result still appears
HTTP response failed with status code 400, message: Arguments Caused Error (code: 2002) collector=Incident
Just like the error when I put listopts. Statuses = {"triggered", "acknowledged", "resolved"}, can you successfully request incident in all statuses when running locally? I checked the official API of pagerduty. The parameter statuses should support three status queries,it's strange
please check if you made any other changes in the code via git status
and then post the full log when running the exporter with --debug
I only change is the go version 1.17 to 1.16
and my pageduty do not use team ,so I comment out the indicators related to team in main.go.Otherwise, it will report an error if he can't find the part about the team
you can disable team support with --pagerduty.disable-teams
please first try it without any code changes and resync vendor folder please.
or in best case try the docker container image.
docker run --rm -ti -p 8080:8080 webdevops/pagerduty-exporter:main —pagerduty.authtoken=xxx --pagerduty.incident.status=all --debug --pagerduty.disable-teams {"file":"main.go:44","func":"main","level":"info","msg":"starting pagerduty-exporter vb5f01cd (b5f01cd; go1.17.2; by webdevops.io)"} {"file":"main.go:45","func":"main","level":"info","msg":"{"Logger":{"Debug":true,"Verbose":false,"LogJson":true},"PagerDuty":{"MaxConnections":4,"Schedule":{"OverrideTimeframe":172800000000000,"EntryTimeframe":259200000000000,"EntryTimeFormat":"Mon, 02 Jan 15:04 MST"},"Incident":{"Statuses":["all"],"TimeFormat":"Mon, 02 Jan 15:04 MST"},"Teams":{"Disable":true,"Filter":null},"Summary":{"Since":2628000000000000}},"ServerBind":":8080","ScrapeTime":{"General":300000000000,"Summary":900000000000,"Live":60000000000}}"} {"file":"main.go:47","func":"main","level":"info","msg":"init PagerDuty client"} {"file":"main.go:50","func":"main","level":"info","msg":"starting metrics collection"} {"file":"main.go:53","func":"main","level":"info","msg":"starting http server on :8080"} {"collector":"User","file":"collector_base.go:122","func":"sleepUntilNextCollection","level":"debug","msg":"sleeping 5m0s"} {"collector":"User","file":"collector_base.go:105","func":"collectionStart","level":"info","msg":"starting metrics collection"} {"collector":"OnCall","file":"collector_base.go:122","func":"sleepUntilNextCollection","level":"debug","msg":"sleeping 1m0s"} {"collector":"OnCall","file":"collector_base.go:105","func":"collectionStart","level":"info","msg":"starting metrics collection"} {"collector":"Schedule","file":"collector_base.go:122","func":"sleepUntilNextCollection","level":"debug","msg":"sleeping 5m0s"} {"collector":"OnCall","file":"metrics_oncall.go:46","func":"Collect","level":"debug","msg":"fetch schedule oncalls (offset: 0, limit:100)"} {"collector":"Schedule","file":"collector_base.go:105","func":"collectionStart","level":"info","msg":"starting metrics collection"} {"collector":"Schedule","file":"metrics_schedule.go:112","func":"Collect","level":"debug","msg":"fetch schedules (offset: 0, limit:100)"} {"collector":"User","file":"metrics_user.go:59","func":"Collect","level":"debug","msg":"fetch users (offset: 0, limit:100)"} {"collector":"Service","file":"collector_base.go:122","func":"sleepUntilNextCollection","level":"debug","msg":"sleeping 5m0s"} {"collector":"Service","file":"collector_base.go:105","func":"collectionStart","level":"info","msg":"starting metrics collection"} {"collector":"Incident","file":"collector_base.go:122","func":"sleepUntilNextCollection","level":"debug","msg":"sleeping 1m0s"} {"collector":"Service","file":"metrics_service.go:55","func":"Collect","level":"debug","msg":"fetch services (offset: 0, limit:100)"} {"collector":"Incident","file":"collector_base.go:105","func":"collectionStart","level":"info","msg":"starting metrics collection"} {"collector":"Incident","file":"metrics_incident.go:81","func":"Collect","level":"debug","msg":"fetch incidents (offset: 0, limit:100)"} {"collector":"MaintenanceWindow","file":"collector_base.go:122","func":"sleepUntilNextCollection","level":"debug","msg":"sleeping 5m0s"} {"collector":"MaintenanceWindow","file":"collector_base.go:105","func":"collectionStart","level":"info","msg":"starting metrics collection"} {"collector":"MaintenanceWindow","file":"metrics_maintenance_window.go:70","func":"Collect","level":"debug","msg":"fetch maintenance windows (offset: 0, limit:100)"} {"collector":"Summary","file":"collector_base.go:122","func":"sleepUntilNextCollection","level":"debug","msg":"sleeping 15m0s"} {"collector":"Summary","file":"collector_base.go:105","func":"collectionStart","level":"info","msg":"starting metrics collection"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 0, limit:100)"} {"collector":"User","duration":7.2921344,"file":"collector_base.go:116","func":"collectionFinish","level":"info","msg":"finished metrics collection (duration: 7.2921344s)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: PFCUH1P, offset: 0, limit:100)"} {"collector":"OnCall","file":"metrics_oncall.go:46","func":"Collect","level":"debug","msg":"fetch schedule oncalls (offset: 100, limit:100)"} {"collector":"Service","duration":7.5326882,"file":"collector_base.go:116","func":"collectionFinish","level":"info","msg":"finished metrics collection (duration: 7.5326882s)"} {"collector":"MaintenanceWindow","duration":7.5678659,"file":"collector_base.go:116","func":"collectionFinish","level":"info","msg":"finished metrics collection (duration: 7.5678659s)"} {"collector":"Incident","file":"metrics_incident.go:87","func":"Collect","level":"panic","msg":"HTTP response failed with status code 400, message: Invalid Input Provided (code: 2001)"} {"collector":"Incident","file":"collector_general.go:37","func":"func1","level":"error","msg":"\u0026{0xc00021a000 map[collector:Incident] 2021-11-04 07:53:26.7813223 +0000 UTC m=+7.698768101 panic 0xc0001b41e0 HTTP response failed with status code 400, message: Invalid Input Provided (code: 2001) \u003cnil\u003e \u003cnil\u003e }"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: PFCUH1P, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: PEFUSUI, offset: 0, limit:100)"} {"collector":"OnCall","file":"metrics_oncall.go:46","func":"Collect","level":"debug","msg":"fetch schedule oncalls (offset: 200, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: PEFUSUI, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: PRRWVM7, offset: 0, limit:100)"} {"collector":"OnCall","file":"metrics_oncall.go:46","func":"Collect","level":"debug","msg":"fetch schedule oncalls (offset: 300, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 100, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: PRRWVM7, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: PIKKTZ1, offset: 0, limit:100)"} {"collector":"OnCall","file":"metrics_oncall.go:46","func":"Collect","level":"debug","msg":"fetch schedule oncalls (offset: 400, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: PIKKTZ1, offset: 0, limit:100)"} {"collector":"OnCall","duration":9.8371263,"file":"collector_base.go:116","func":"collectionFinish","level":"info","msg":"finished metrics collection (duration: 9.8371263s)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: PTVSSHR, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: PTVSSHR, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: PGFPDG5, offset: 0, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 200, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: PGFPDG5, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: PYR7E61, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: PYR7E61, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: P5FREVN, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: P5FREVN, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: PYALC66, offset: 0, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 300, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: PYALC66, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: PMV8IHP, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: PMV8IHP, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: PWGS8ZH, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: PWGS8ZH, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: PK7G8JY, offset: 0, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 400, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: PK7G8JY, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: PQ51YKK, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: PQ51YKK, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: PEGT0KW, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: PEGT0KW, offset: 0, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 500, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: PSFR8CX, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: PSFR8CX, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: P5XGCHD, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: P5XGCHD, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: P7HFQT7, offset: 0, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 600, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: P7HFQT7, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: PGC4YY6, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: PGC4YY6, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: PD6YO6B, offset: 0, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 700, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: PD6YO6B, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: P6A9J46, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: P6A9J46, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: PB7UTWW, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: PB7UTWW, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: P2OL5NE, offset: 0, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 800, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: P2OL5NE, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: PM2E6F3, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: PM2E6F3, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: PKHECSX, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: PKHECSX, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: P8UX66L, offset: 0, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 900, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: P8UX66L, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: P7YUHRA, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: P7YUHRA, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: P48KECS, offset: 0, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 1000, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: P48KECS, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: PQU3WC9, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: PQU3WC9, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: P0BJGTI, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: P0BJGTI, offset: 0, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 1100, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: PQOSWGT, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: PQOSWGT, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:155","func":"collectScheduleInformation","level":"debug","msg":"fetch schedule information (schedule: PIT3UL9, offset: 0, limit:100)"} {"collector":"Schedule","file":"metrics_schedule.go:260","func":"collectScheduleOverrides","level":"debug","msg":"fetch schedule overrides (schedule: PIT3UL9, offset: 0, limit:100)"} {"collector":"Schedule","duration":27.2108624,"file":"collector_base.go:116","func":"collectionFinish","level":"info","msg":"finished metrics collection (duration: 27.2108624s)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 1200, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 1300, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 1400, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 1500, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 1600, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 1700, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 1800, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 1900, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 2000, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 2100, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 2200, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 2300, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 2400, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 2500, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 2600, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 2700, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 2800, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 2900, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 3000, limit:100)"} {"collector":"Incident","file":"collector_base.go:122","func":"sleepUntilNextCollection","level":"debug","msg":"sleeping 1m0s"} {"collector":"OnCall","file":"collector_base.go:122","func":"sleepUntilNextCollection","level":"debug","msg":"sleeping 1m0s"} {"collector":"OnCall","file":"collector_base.go:105","func":"collectionStart","level":"info","msg":"starting metrics collection"} {"collector":"OnCall","file":"metrics_oncall.go:46","func":"Collect","level":"debug","msg":"fetch schedule oncalls (offset: 0, limit:100)"} {"collector":"Incident","file":"collector_base.go:105","func":"collectionStart","level":"info","msg":"starting metrics collection"} {"collector":"Incident","file":"metrics_incident.go:81","func":"Collect","level":"debug","msg":"fetch incidents (offset: 0, limit:100)"} {"collector":"Incident","file":"metrics_incident.go:87","func":"Collect","level":"panic","msg":"HTTP response failed with status code 400, message: Invalid Input Provided (code: 2001)"} {"collector":"Incident","file":"collector_general.go:37","func":"func1","level":"error","msg":"\u0026{0xc00021a000 map[collector:Incident] 2021-11-04 07:54:19.2826565 +0000 UTC m=+60.268837901 panic 0xc000469540 HTTP response failed with status code 400, message: Invalid Input Provided (code: 2001) \u003cnil\u003e \u003cnil\u003e }"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 3100, limit:100)"} {"collector":"OnCall","file":"metrics_oncall.go:46","func":"Collect","level":"debug","msg":"fetch schedule oncalls (offset: 100, limit:100)"} {"collector":"OnCall","file":"metrics_oncall.go:46","func":"Collect","level":"debug","msg":"fetch schedule oncalls (offset: 200, limit:100)"} {"collector":"OnCall","file":"metrics_oncall.go:46","func":"Collect","level":"debug","msg":"fetch schedule oncalls (offset: 300, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 3200, limit:100)"} {"collector":"OnCall","file":"metrics_oncall.go:46","func":"Collect","level":"debug","msg":"fetch schedule oncalls (offset: 400, limit:100)"} {"collector":"OnCall","duration":3.067371,"file":"collector_base.go:116","func":"collectionFinish","level":"info","msg":"finished metrics collection (duration: 3.067371s)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 3300, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 3400, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 3500, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 3600, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:110","func":"collectIncidents","level":"debug","msg":"fetch incidents (offset: 3700, limit:100)"}
2021年11月4日 下午3:43,Markus Blaschke @.***> 写道:
you can disable team support with --pagerduty.disable-teams please first try it without any code changes and resync vendor folder please.
or in best case try the docker container image.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/webdevops/pagerduty-exporter/issues/18#issuecomment-960522751, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUWOCFHLFHI2U3MI7PWBD23UKI2SDANCNFSM5HDJ4HGA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
And I still not find the incidents detail in localhost:808/metrics,just like I running it local
2021年11月4日 下午3:43,Markus Blaschke @.***> 写道:
you can disable team support with --pagerduty.disable-teams please first try it without any code changes and resync vendor folder please.
or in best case try the docker container image.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/webdevops/pagerduty-exporter/issues/18#issuecomment-960522751, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUWOCFHLFHI2U3MI7PWBD23UKI2SDANCNFSM5HDJ4HGA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
the docker stop with this log: goroutine 337 [running]: github.com/sirupsen/logrus.(*Entry).log(0xc0004094d0, 0x0, {0xc000028900, 0x2a}) /go/pkg/mod/github.com/sirupsen/[email protected]/entry.go:259 +0x26f github.com/sirupsen/logrus.(*Entry).Log(0xc00021b730, 0x0, {0xc0004094d0, 0x8000101, 0x8eb880}) /go/pkg/mod/github.com/sirupsen/[email protected]/entry.go:293 +0x4f github.com/sirupsen/logrus.(*Entry).Panic(...) /go/pkg/mod/github.com/sirupsen/[email protected]/entry.go:331 main.(*CollectorGeneral).Collect.func1() /go/src/github.com/webdevops/pagerduty-exporter/collector_general.go:39 +0xa9 panic({0x8f7220, 0xc000afe5b0}) /usr/local/go/src/runtime/panic.go:1038 +0x215 github.com/sirupsen/logrus.(*Entry).log(0xc000409918, 0x0, {0xc000273560, 0x57}) /go/pkg/mod/github.com/sirupsen/[email protected]/entry.go:259 +0x26f github.com/sirupsen/logrus.(*Entry).Log(0xc00021b730, 0x0, {0xc000409918, 0x0, 0x0}) /go/pkg/mod/github.com/sirupsen/[email protected]/entry.go:293 +0x4f github.com/sirupsen/logrus.(*Entry).Panic(...) /go/pkg/mod/github.com/sirupsen/[email protected]/entry.go:331 main.(*MetricsCollectorIncident).Collect(0xc00022da00, {0xc00002b320, 0xc00046a480}, 0xc0002720c0) /go/src/github.com/webdevops/pagerduty-exporter/metrics_incident.go:87 +0x318 main.(*CollectorGeneral).Collect(0xc000200a20) /go/src/github.com/webdevops/pagerduty-exporter/collector_general.go:71 +0x153 main.(*CollectorGeneral).Run.func1.1() /go/src/github.com/webdevops/pagerduty-exporter/collector_general.go:25 +0x1d created by main.(*CollectorGeneral).Run.func1 /go/src/github.com/webdevops/pagerduty-exporter/collector_general.go:24 +0x29
I want to sure that if I make any mistakes in the process
2021年11月4日 下午3:43,Markus Blaschke @.***> 写道:
you can disable team support with --pagerduty.disable-teams please first try it without any code changes and resync vendor folder please.
or in best case try the docker container image.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/webdevops/pagerduty-exporter/issues/18#issuecomment-960522751, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUWOCFHLFHI2U3MI7PWBD23UKI2SDANCNFSM5HDJ4HGA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Can you see any conclusions about the status from the log? I hope to find out that the status contains the resolved increment. Thank you
Can you find out the resolved incident on your side? This is very important to me, thank you
Github build from the previous commit was taking longer so it pushed the previous version, the newest docker tag is fine again
please retry but first do a docker pull webdevops/pagerduty-exporter:main
and ensure that the version of the exporter matches:
{"file":"main.go:44","func":"main","level":"info","msg":"starting pagerduty-exporter v8834c32 (8834c32; go1.17.2; by webdevops.io)"}
I'm sure I've used the latest docker image and run commands as you said. When there's a problem getting the summary and resolved incident
docker run --rm -ti -p 8080:8080 webdevops/pagerduty-exporter:main --pagerduty.authtoken=xxxxxxx --pagerduty.incident.status=all --pagerduty.disable-teams
{"file":"main.go:44","func":"main","level":"info","msg":"starting pagerduty-exporter v8834c32 (8834c32; go1.17.2; by webdevops.io)"}
{"file":"main.go:45","func":"main","level":"info","msg":"{\"Logger\":{\"Debug\":false,\"Verbose\":false,\"LogJson\":true},\"PagerDuty\":{\"MaxConnections\":4,\"Schedule\":{\"OverrideTimeframe\":172800000000000,\"EntryTimeframe\":259200000000000,\"EntryTimeFormat\":\"Mon, 02 Jan 15:04 MST\"},\"Incident\":{\"Statuses\":[\"triggered\",\"acknowledged\",\"resolved\"],\"TimeFormat\":\"Mon, 02 Jan 15:04 MST\"},\"Teams\":{\"Disable\":true,\"Filter\":null},\"Summary\":{\"Since\":2628000000000000}},\"ServerBind\":\":8080\",\"ScrapeTime\":{\"General\":300000000000,\"Summary\":900000000000,\"Live\":60000000000}}"}
Incident and the summary are same error : Arguments Caused Error (code: 2002) {"collector":"OnCall","file":"metrics_oncall.go:46","func":"Collect","level":"debug","msg":"fetch schedule oncalls (offset: 0, limit:100)"} {"collector":"Summary","file":"metrics_summary.go:116","func":"collectIncidents","level":"panic","msg":"HTTP response failed with status code 400, message: Arguments Caused Error (code: 2002)"} {"collector":"Summary","file":"collector_general.go:37","func":"func1","level":"error","msg":"\u0026{0xc000136bd0 map[collector:Summary] 2021-11-05 05:36:30.9047973 +0000 UTC m=+180.192211501 panic 0xc00030de50 HTTP response failed with status code 400, message: Arguments Caused Error (code: 2002) \u003cnil\u003e \u003cnil\u003e }"} {"collector":"Incident","file":"metrics_incident.go:81","func":"Collect","level":"debug","msg":"fetch incidents (offset: 3300, limit:100)"}
with the docker container this only happen for the summary collector?
if you now use webdevops/pagerduty-exporter:main@sha256:e6034052004cafe271211e333832619762c99668e0c9ba8d03632ac059bc37ee
and start it with --debug
the exporter now logs all request URLs.. maybe that's helping
For the debug log and URL information of the incident part, compared with the official API, I think there is no problem with this path, but I don't know why it reports the error of parameter error, which is really strange
{"file":"main.go:233","func":"pagerdutyRequestLogger","level":"debug","msg":"send request to https://api.pagerduty.com/incidents?limit=100\u0026offset=100\u0026statuses%5B%5D=triggered\u0026statuses%5B%5D=acknowledged\u0026statuses%5B%5D=resolved"}
This is really strange. For the same API, I can return correct results by querying through postman, but whether it is the latest docker or I pull the latest code to run locally, parameter errors will be reported when statuses includes resolved. Even if I manually change the query increment part in the local code to:
c.get(ctx,"/incidents?"+"statses[]=triggered&statses[]=acknowledged&statses[]=resolved")
This really makes me autistic
even with offset and limit?
Whether I add the limit and offset parameters or not, parameter errors will be reported: limit=100&offset=100&statuses%5B%5D=triggered&statuses%5B%5D=acknowledged&statuses%5B%5D=resolved
ping
are you executing it with the same PagerDuty token in postman and for the exporter? i'm executing the same queries against my developer account and a bigger account without issues 🤔
be aware that the query log might have a delay as the queries are queued in the collection run to reduce stress on PagerDuty API. are there any other queries in the log?
i currently don't have a clue from where the error is coming from or what this is causing 🤔
PS: i'm taking this issue serious, but as this is a FOSS project i can only invest my free time to handle issues (and there are more projects) so please be patient.