forked from Technofy/cloudwatch_exporter
-
Couldn't load subscription status.
- Fork 87
PMM-5058 Update node_exporter-like metrics. #33
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,12 @@ | ||
| --- | ||
| # Shared configuration for all tests. | ||
|
|
||
| instances: | ||
| - region: us-east-1 | ||
| instance: rds-aurora1 | ||
| - region: us-east-1 | ||
| instance: rds-aurora57 | ||
| - region: us-east-1 | ||
| instance: rds-mysql56 | ||
| - region: us-west-1 | ||
| instance: rds-mysql57 |
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -98,22 +98,22 @@ type loadAverageMinute struct { | |
|
|
||
| //nolint:lll | ||
| type memory struct { | ||
| Active int `json:"active" node:"Active" m:"1024" help:"The amount of assigned memory, in kilobytes."` | ||
| Buffers int `json:"buffers" node:"Buffers" m:"1024" help:"The amount of memory used for buffering I/O requests prior to writing to the storage device, in kilobytes."` | ||
| Cached int `json:"cached" node:"Cached" m:"1024" help:"The amount of memory used for caching file system–based I/O."` | ||
| Dirty int `json:"dirty" node:"Dirty" m:"1024" help:"The amount of memory pages in RAM that have been modified but not written to their related data block in storage, in kilobytes."` | ||
| Free int `json:"free" node:"MemFree" m:"1024" help:"The amount of unassigned memory, in kilobytes."` | ||
| HugePagesFree int `json:"hugePagesFree" node:"HugePages_Free" m:"1" help:"The number of free huge pages. Huge pages are a feature of the Linux kernel."` | ||
| HugePagesRsvd int `json:"hugePagesRsvd" node:"HugePages_Rsvd" m:"1" help:"The number of committed huge pages."` | ||
| HugePagesSize int `json:"hugePagesSize" node:"Hugepagesize" m:"1024" help:"The size for each huge pages unit, in kilobytes."` | ||
| HugePagesSurp int `json:"hugePagesSurp" node:"HugePages_Surp" m:"1" help:"The number of available surplus huge pages over the total."` | ||
| HugePagesTotal int `json:"hugePagesTotal" node:"HugePages_Total" m:"1" help:"The total number of huge pages for the system."` | ||
| Inactive int `json:"inactive" node:"Inactive" m:"1024" help:"The amount of least-frequently used memory pages, in kilobytes."` | ||
| Mapped int `json:"mapped" node:"Mapped" m:"1024" help:"The total amount of file-system contents that is memory mapped inside a process address space, in kilobytes."` | ||
| PageTables int `json:"pageTables" node:"PageTables" m:"1024" help:"The amount of memory used by page tables, in kilobytes."` | ||
| Slab int `json:"slab" node:"Slab" m:"1024" help:"The amount of reusable kernel data structures, in kilobytes."` | ||
| Total int `json:"total" node:"MemTotal" m:"1024" help:"The total amount of memory, in kilobytes."` | ||
| Writeback int `json:"writeback" node:"Writeback" m:"1024" help:"The amount of dirty pages in RAM that are still being written to the backing storage, in kilobytes."` | ||
| Active int `json:"active" node:"Active_bytes" m:"1024" help:"The amount of assigned memory, in kilobytes."` | ||
| Buffers int `json:"buffers" node:"Buffers_bytes" m:"1024" help:"The amount of memory used for buffering I/O requests prior to writing to the storage device, in kilobytes."` | ||
| Cached int `json:"cached" node:"Cached_bytes" m:"1024" help:"The amount of memory used for caching file system–based I/O."` | ||
| Dirty int `json:"dirty" node:"Dirty_bytes" m:"1024" help:"The amount of memory pages in RAM that have been modified but not written to their related data block in storage, in kilobytes."` | ||
| Free int `json:"free" node:"MemFree_bytes" m:"1024" help:"The amount of unassigned memory, in kilobytes."` | ||
| HugePagesFree int `json:"hugePagesFree" node:"HugePages_Free" m:"1" help:"The number of free huge pages. Huge pages are a feature of the Linux kernel."` | ||
| HugePagesRsvd int `json:"hugePagesRsvd" node:"HugePages_Rsvd" m:"1" help:"The number of committed huge pages."` | ||
| HugePagesSize int `json:"hugePagesSize" node:"Hugepagesize_bytes" m:"1024" help:"The size for each huge pages unit, in kilobytes."` | ||
| HugePagesSurp int `json:"hugePagesSurp" node:"HugePages_Surp" m:"1" help:"The number of available surplus huge pages over the total."` | ||
| HugePagesTotal int `json:"hugePagesTotal" node:"HugePages_Total" m:"1" help:"The total number of huge pages for the system."` | ||
| Inactive int `json:"inactive" node:"Inactive_bytes" m:"1024" help:"The amount of least-frequently used memory pages, in kilobytes."` | ||
| Mapped int `json:"mapped" node:"Mapped_bytes" m:"1024" help:"The total amount of file-system contents that is memory mapped inside a process address space, in kilobytes."` | ||
| PageTables int `json:"pageTables" node:"PageTables_bytes" m:"1024" help:"The amount of memory used by page tables, in kilobytes."` | ||
| Slab int `json:"slab" node:"Slab_bytes" m:"1024" help:"The amount of reusable kernel data structures, in kilobytes."` | ||
| Total int `json:"total" node:"MemTotal_bytes" m:"1024" help:"The total amount of memory, in kilobytes."` | ||
| Writeback int `json:"writeback" node:"Writeback_bytes" m:"1024" help:"The amount of dirty pages in RAM that are still being written to the backing storage, in kilobytes."` | ||
| } | ||
|
|
||
| type network struct { | ||
|
|
@@ -136,9 +136,9 @@ type processList struct { | |
|
|
||
| //nolint:lll | ||
| type swap struct { | ||
| Cached float64 `json:"cached" node:"node_memory_SwapCached" m:"1024" help:"The amount of swap memory, in kilobytes, used as cache memory." nodehelp:"Memory information field SwapCached."` | ||
| Free float64 `json:"free" node:"node_memory_SwapFree" m:"1024" help:"The total amount of swap memory free, in kilobytes." nodehelp:"Memory information field SwapFree."` | ||
| Total float64 `json:"total" node:"node_memory_SwapTotal" m:"1024" help:"The total amount of swap memory available, in kilobytes." nodehelp:"Memory information field SwapTotal."` | ||
| Cached float64 `json:"cached" node:"node_memory_SwapCached_bytes" m:"1024" help:"The amount of swap memory, in kilobytes, used as cache memory." nodehelp:"Memory information field SwapCached."` | ||
| Free float64 `json:"free" node:"node_memory_SwapFree_bytes" m:"1024" help:"The total amount of swap memory free, in kilobytes." nodehelp:"Memory information field SwapFree."` | ||
| Total float64 `json:"total" node:"node_memory_SwapTotal_bytes" m:"1024" help:"The total amount of swap memory available, in kilobytes." nodehelp:"Memory information field SwapTotal."` | ||
|
|
||
| // we use multiplier 0.25 to convert a number of kilobytes to a number of 4k pages (what our dashboards assume) | ||
| In float64 `json:"in" node:"node_vmstat_pswpin" m:"0.25" help:"The total amount of memory, in kilobytes, swapped in from disk." nodehelp:"/proc/vmstat information field pswpin"` | ||
|
|
@@ -259,12 +259,12 @@ func makeNodeDiskMetrics(s *diskIO, constLabels prometheus.Labels) []prometheus. | |
| res := make([]prometheus.Metric, 0, 2) | ||
|
|
||
| if s.ReadKb != nil { | ||
| desc := prometheus.NewDesc("node_disk_bytes_read", "The total number of bytes read successfully.", labelKeys, constLabels) | ||
| desc := prometheus.NewDesc("node_disk_read_bytes_total", "The total number of bytes read successfully.", labelKeys, constLabels) | ||
| m := prometheus.MustNewConstMetric(desc, prometheus.CounterValue, float64(*s.ReadKb*1024), labelValues...) | ||
| res = append(res, m) | ||
| } | ||
| if s.WriteKb != nil { | ||
| desc := prometheus.NewDesc("node_disk_bytes_written", "The total number of bytes written successfully.", labelKeys, constLabels) | ||
| desc := prometheus.NewDesc("node_disk_written_bytes_total", "The total number of bytes written successfully.", labelKeys, constLabels) | ||
| m := prometheus.MustNewConstMetric(desc, prometheus.CounterValue, float64(*s.WriteKb*1024), labelValues...) | ||
| res = append(res, m) | ||
| } | ||
|
|
@@ -310,11 +310,11 @@ func makeNodeFilesystemMetrics(s *fileSys, constLabels prometheus.Labels) []prom | |
| res = append(res, prometheus.MustNewConstMetric(desc, prometheus.GaugeValue, float64((s.MaxFiles-s.UsedFiles)*1024), labelValues...)) | ||
|
|
||
| // report the same value for node_filesystem_free and node_filesystem_avail because we use both metrics in our dashboards | ||
| desc = prometheus.NewDesc("node_filesystem_size", "Filesystem size in bytes.", labelKeys, constLabels) | ||
| desc = prometheus.NewDesc("node_filesystem_size_bytes", "Filesystem size in bytes.", labelKeys, constLabels) | ||
| res = append(res, prometheus.MustNewConstMetric(desc, prometheus.GaugeValue, float64(s.Total*1024), labelValues...)) | ||
| desc = prometheus.NewDesc("node_filesystem_free", "Filesystem free space in bytes.", labelKeys, constLabels) | ||
| desc = prometheus.NewDesc("node_filesystem_free_bytes", "Filesystem free space in bytes.", labelKeys, constLabels) | ||
| res = append(res, prometheus.MustNewConstMetric(desc, prometheus.GaugeValue, float64((s.Total-s.Used)*1024), labelValues...)) | ||
| desc = prometheus.NewDesc("node_filesystem_avail", "Filesystem space available to non-root users in bytes.", labelKeys, constLabels) | ||
| desc = prometheus.NewDesc("node_filesystem_avail_bytes", "Filesystem space available to non-root users in bytes.", labelKeys, constLabels) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. line is 142 characters (from |
||
| res = append(res, prometheus.MustNewConstMetric(desc, prometheus.GaugeValue, float64((s.Total-s.Used)*1024), labelValues...)) | ||
|
|
||
| return res | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line is 142 characters (from
lll)