Skip to content

Commit

Permalink
Changed type of ArtifactVersion metric
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashritha Goramane committed Feb 13, 2025
1 parent 9520ec6 commit e54f075
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ var (
Help: "UTC Epoch timestamp of last Successful Ansible run",
})

promAnsibleArtifactVersion = prometheus.NewGaugeVec(prometheus.GaugeOpts{
promAnsibleArtifactVersion = prometheus.NewCounterVec(prometheus.CounterOpts{
Name: "ansible_artifact_version",
Help: "Version of the Artifact used for the run",
},
Expand Down Expand Up @@ -280,10 +280,10 @@ func ansibleRun() error {

content, err := os.ReadFile(filepath.Join(aCfg.Cwd, "VERSION"))
if err != nil {
runLogger.Errorln("Unable to get the VERSION of artifact ", err)
runLogger.Errorln("Unable to get the VERSION of artifact", err)
}
artifact_version := string(content)
promAnsibleArtifactVersion.WithLabelValues(artifact_version).Set(1)
promAnsibleArtifactVersion.WithLabelValues(artifact_version).Inc()
promAnsibleRunSummary.WithLabelValues(
runID,
fmt.Sprintf("%v", runOutput.Stats[target].Ok),
Expand Down

0 comments on commit e54f075

Please sign in to comment.