Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming all prometheus metrics to comply with convention #348

Merged
merged 5 commits into from
Mar 20, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ See the [README](README.md) for additional information.
* Bug Fix - [Add logic to dynamically discover primary interface name](https://github.com/aws/amazon-vpc-cni-k8s/pull/196)

## 1.3.0

* Feature - [Add logic to handle multiple VPC CIDRs](https://github.com/aws/amazon-vpc-cni-k8s/pull/234)
* Improvement - [Update instance types](https://github.com/aws/amazon-vpc-cni-k8s/pull/229)
* Improvement - [Add retry for plumbing route entry](https://github.com/aws/amazon-vpc-cni-k8s/pull/223)
Expand All @@ -46,5 +47,14 @@ See the [README](README.md) for additional information.
* Bug Fix - [cleanup the host route when perform CNI delete](https://github.com/aws/amazon-vpc-cni-k8s/pull/228)

## 1.3.1

* Feature - [Add ENI entries for p3dn.24xlarge](https://github.com/aws/amazon-vpc-cni-k8s/pull/295)
* Bug Fix - [Restrict p3dn.24xlarge to 31 IPs/ENI](https://github.com/aws/amazon-vpc-cni-k8s/pull/300)

## 1.3.2

* Bug Fix - [Bump CNI to latest 1.3 version](https://github.com/aws/amazon-vpc-cni-k8s/pull/333)

## 1.3.3

* Improvement - [Renaming Prometheus metrics with "awscni_" prefix](https://github.com/aws/amazon-vpc-cni-k8s/pull/348)
12 changes: 6 additions & 6 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,12 @@ ipamd.log.2018-05-16-01 ipamd.log.2018-05-16-06 ipamd.log.2018-05-16-11 ipamd
```
// get ipamD metrics
root@ip-192-168-188-7 bin]# curl http://localhost:61678/metrics
# HELP assigned_ip_addresses The number of IP addresses assigned
# TYPE assigned_ip_addresses gauge
assigned_ip_addresses 46
# HELP eni_allocated The number of ENI allocated
# TYPE eni_allocated gauge
eni_allocated 4
# HELP awscni_assigned_ip_addresses The number of IP addresses assigned
# TYPE awscni_assigned_ip_addresses gauge
awscni_assigned_ip_addresses 46
# HELP awscni_eni_allocated The number of ENI allocated
# TYPE awscni_eni_allocated gauge
awscni_eni_allocated 4
# HELP eni_max The number of maximum ENIs can be attached to the instance
# TYPE eni_max gauge
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can you update this name here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a nit! Fixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's more under here, called go_xxx. Should I rename those too? I think they come from the prometheus client though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, those come from the prometheus client and should stay as they are. Thanks!

eni_max 4
Expand Down
6 changes: 3 additions & 3 deletions ipamd/datastore/data_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@ var ErrUnknownPodIP = errors.New("datastore: pod using unknown IP address")
var (
enis = prometheus.NewGauge(
prometheus.GaugeOpts{
Name: "eni_allocated",
Name: "awscni_eni_allocated",
Help: "The number of ENIs allocated",
},
)
totalIPs = prometheus.NewGauge(
prometheus.GaugeOpts{
Name: "total_ip_addresses",
Name: "awscni_total_ip_addresses",
Help: "The total number of IP addresses",
},
)
assignedIPs = prometheus.NewGauge(
prometheus.GaugeOpts{
Name: "assigned_ip_addresses",
Name: "awscni_assigned_ip_addresses",
Help: "The number of IP addresses assigned to pods",
},
)
Expand Down
14 changes: 7 additions & 7 deletions ipamd/ipamd.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,46 +91,46 @@ const (
var (
ipamdErr = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "ipamd_error_count",
Name: "awscni_ipamd_error_count",
Help: "The number of errors encountered in ipamd",
},
[]string{"fn", "error"},
)
ipamdActionsInprogress = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "ipamd_action_inprogress",
Name: "awscni_ipamd_action_inprogress",
Help: "The number of ipamd actions inprogress",
},
[]string{"fn"},
)
enisMax = prometheus.NewGauge(
prometheus.GaugeOpts{
Name: "eni_max",
Name: "awscni_eni_max",
Help: "The maximum number of ENIs that can be attached to the instance",
},
)
ipMax = prometheus.NewGauge(
prometheus.GaugeOpts{
Name: "ip_max",
Name: "awscni_ip_max",
Help: "The maximum number of IP addresses that can be allocated to the instance",
},
)
reconcileCnt = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "reconcile_count",
Name: "awscni_reconcile_count",
Help: "The number of times ipamD reconciles on ENIs and IP addresses",
},
[]string{"fn"},
)
addIPCnt = prometheus.NewCounter(
prometheus.CounterOpts{
Name: "add_ip_req_count",
Name: "awscni_add_ip_req_count",
Help: "The number of add IP address request",
},
)
delIPCnt = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "del_ip_req_count",
Name: "awscni_del_ip_req_count",
Help: "The number of delete IP address request",
},
[]string{"reason"},
Expand Down
6 changes: 3 additions & 3 deletions pkg/awsutils/awsutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,21 @@ var ErrENINotFound = errors.New("ENI is not found")
var (
awsAPILatency = prometheus.NewSummaryVec(
prometheus.SummaryOpts{
Name: "aws_api_lantency_ms",
Name: "awscni_aws_api_lantency_ms",
Help: "AWS API call latency in ms",
},
[]string{"api", "error"},
)
awsAPIErr = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "aws_api_error_count",
Name: "awscni_aws_api_error_count",
Help: "The number of times AWS API returns an error",
},
[]string{"api", "error"},
)
awsUtilsErr = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "aws_utils_error_count",
Name: "awscni_aws_utils_error_count",
Help: "The number of errors not handled in awsutils library",
},
[]string{"fn", "error"},
Expand Down