Skip to content

Commit

Permalink
Workaround for incident.Id or incident.ID
Browse files Browse the repository at this point in the history
see PagerDuty/go-pagerduty#218

Signed-off-by: Markus Blaschke <[email protected]>
  • Loading branch information
mblaschke committed Jun 21, 2020
1 parent e1c4321 commit a73168c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ func (e *PagerdutyElasticsearchExporter) runScrape() {
}

for _, incident := range incidentResponse.Incidents {
// workaround for https://github.com/PagerDuty/go-pagerduty/issues/218
if incident.Id == "" {
incident.Id = incident.ID
}

daemonLogger.Verbosef(" - Incident %v", incident.Id)
e.indexIncident(incident, esIndexRequestChannel)

Expand Down

0 comments on commit a73168c

Please sign in to comment.