-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Primarily this records a number of server stats in line with what mcollective recorded so the rpcutil agent can be more compatible In the process it was observed that TTLs are not checked, they are now checked too
- Loading branch information
Showing
9 changed files
with
148 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ ping | |
choria-*-*-* | ||
*.rpm | ||
*.tgz | ||
debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package server | ||
|
||
import ( | ||
"github.com/prometheus/client_golang/prometheus" | ||
) | ||
|
||
var ( | ||
validatedCtr = prometheus.NewCounterVec(prometheus.CounterOpts{ | ||
Name: "choria_server_validated", | ||
Help: "Number of messages that were received and validated succesfully", | ||
}, []string{"identity"}) | ||
|
||
unvalidatedCtr = prometheus.NewCounterVec(prometheus.CounterOpts{ | ||
Name: "choria_server_unvalidated", | ||
Help: "Number of messages that were received but did not pass validation", | ||
}, []string{"identity"}) | ||
|
||
passedCtr = prometheus.NewCounterVec(prometheus.CounterOpts{ | ||
Name: "choria_server_passed", | ||
Help: "Number of messages where this instance matched the filter expression", | ||
}, []string{"identity"}) | ||
|
||
filteredCtr = prometheus.NewCounterVec(prometheus.CounterOpts{ | ||
Name: "choria_server_filtered", | ||
Help: "Number of messages where this instance did not match the filter expression", | ||
}, []string{"identity"}) | ||
|
||
repliesCtr = prometheus.NewCounterVec(prometheus.CounterOpts{ | ||
Name: "choria_server_replies", | ||
Help: "Number of reply messages that were produced", | ||
}, []string{"identity"}) | ||
|
||
ttlExpiredCtr = prometheus.NewCounterVec(prometheus.CounterOpts{ | ||
Name: "choria_server_ttlexpired", | ||
Help: "Number of messages received that were too old and dropped", | ||
}, []string{"identity"}) | ||
) | ||
|
||
func init() { | ||
prometheus.MustRegister(validatedCtr) | ||
prometheus.MustRegister(unvalidatedCtr) | ||
prometheus.MustRegister(passedCtr) | ||
prometheus.MustRegister(filteredCtr) | ||
prometheus.MustRegister(repliesCtr) | ||
prometheus.MustRegister(ttlExpiredCtr) | ||
} |