Skip to content

Commit

Permalink
Add ec2 volumes detection to collector configuration (#102)
Browse files Browse the repository at this point in the history
* Add ec2 volumes detection to collector configuration
  • Loading branch information
kaplanelad committed Jul 16, 2020
1 parent d5b6d0a commit 0760484
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion collector/aws/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,14 @@ func (app *Analyze) AnalyzeLambda(sess *session.Session, cloudWatchCLient *Cloud

}

// AnalyzeVolumes analyzes EC22 volumes resources
// AnalyzeVolumes analyzes EC2 volumes resources
func (app *Analyze) AnalyzeVolumes(sess *session.Session, pricing *PricingManager) {

_, err := app.metricManager.IsResourceEnable("ec2_volumes")
if err != nil {
return
}

volumeManager := NewVolumesManager(app.cl, ec2.New(sess), pricing, *sess.Config.Region)

response, err := volumeManager.Detect()
Expand Down
2 changes: 2 additions & 0 deletions configuration/collector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,5 @@ providers:
elasticip:
enable: true
description: Not associated
ec2_volumes:
enable: true

0 comments on commit 0760484

Please sign in to comment.