diff options
author | Ben Kochie <superq@gmail.com> | 2018-03-29 11:20:21 -0700 |
---|---|---|
committer | Brian Brazil <brian.brazil@robustperception.io> | 2018-03-29 22:00:02 +0100 |
commit | cf3edadcbbd7064a7671e2c1467de90298faef66 (patch) | |
tree | 3fb1de9dadd3aa44fe572cbd6045b0ac07516816 | |
parent | 499c342fed469de88a6c102d50bfc61853520d2d (diff) | |
download | prometheus_node_collector-cf3edadcbbd7064a7671e2c1467de90298faef66.tar.bz2 prometheus_node_collector-cf3edadcbbd7064a7671e2c1467de90298faef66.tar.xz prometheus_node_collector-cf3edadcbbd7064a7671e2c1467de90298faef66.zip |
Update fixtures
* Add oom_kill to fixture.
* Update e2e outputs.
* Put regexp in order.
Signed-off-by: Ben Kochie <superq@gmail.com>
-rw-r--r-- | collector/fixtures/e2e-output.txt | 3 | ||||
-rw-r--r-- | collector/fixtures/e2e-ppc64le-output.txt | 22 | ||||
-rw-r--r-- | collector/fixtures/proc/vmstat | 1 | ||||
-rw-r--r-- | collector/vmstat_linux.go | 2 |
4 files changed, 27 insertions, 1 deletions
diff --git a/collector/fixtures/e2e-output.txt b/collector/fixtures/e2e-output.txt index 03db85a..472e34f 100644 --- a/collector/fixtures/e2e-output.txt +++ b/collector/fixtures/e2e-output.txt | |||
@@ -2790,6 +2790,9 @@ node_sockstat_sockets_used 229 | |||
2790 | # HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise | 2790 | # HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise |
2791 | # TYPE node_textfile_scrape_error gauge | 2791 | # TYPE node_textfile_scrape_error gauge |
2792 | node_textfile_scrape_error 0 | 2792 | node_textfile_scrape_error 0 |
2793 | # HELP node_vmstat_oom_kill /proc/vmstat information field oom_kill. | ||
2794 | # TYPE node_vmstat_oom_kill untyped | ||
2795 | node_vmstat_oom_kill 0 | ||
2793 | # HELP node_vmstat_pgfault /proc/vmstat information field pgfault. | 2796 | # HELP node_vmstat_pgfault /proc/vmstat information field pgfault. |
2794 | # TYPE node_vmstat_pgfault untyped | 2797 | # TYPE node_vmstat_pgfault untyped |
2795 | node_vmstat_pgfault 2.320168809e+09 | 2798 | node_vmstat_pgfault 2.320168809e+09 |
diff --git a/collector/fixtures/e2e-ppc64le-output.txt b/collector/fixtures/e2e-ppc64le-output.txt index 784ffbd..e52e196 100644 --- a/collector/fixtures/e2e-ppc64le-output.txt +++ b/collector/fixtures/e2e-ppc64le-output.txt | |||
@@ -2739,6 +2739,7 @@ node_scrape_collector_success{collector="qdisc"} 1 | |||
2739 | node_scrape_collector_success{collector="sockstat"} 1 | 2739 | node_scrape_collector_success{collector="sockstat"} 1 |
2740 | node_scrape_collector_success{collector="stat"} 1 | 2740 | node_scrape_collector_success{collector="stat"} 1 |
2741 | node_scrape_collector_success{collector="textfile"} 1 | 2741 | node_scrape_collector_success{collector="textfile"} 1 |
2742 | node_scrape_collector_success{collector="vmstat"} 1 | ||
2742 | node_scrape_collector_success{collector="wifi"} 1 | 2743 | node_scrape_collector_success{collector="wifi"} 1 |
2743 | node_scrape_collector_success{collector="xfs"} 1 | 2744 | node_scrape_collector_success{collector="xfs"} 1 |
2744 | node_scrape_collector_success{collector="zfs"} 1 | 2745 | node_scrape_collector_success{collector="zfs"} 1 |
@@ -2789,6 +2790,27 @@ node_sockstat_sockets_used 229 | |||
2789 | # HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise | 2790 | # HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise |
2790 | # TYPE node_textfile_scrape_error gauge | 2791 | # TYPE node_textfile_scrape_error gauge |
2791 | node_textfile_scrape_error 0 | 2792 | node_textfile_scrape_error 0 |
2793 | # HELP node_vmstat_oom_kill /proc/vmstat information field oom_kill. | ||
2794 | # TYPE node_vmstat_oom_kill untyped | ||
2795 | node_vmstat_oom_kill 0 | ||
2796 | # HELP node_vmstat_pgfault /proc/vmstat information field pgfault. | ||
2797 | # TYPE node_vmstat_pgfault untyped | ||
2798 | node_vmstat_pgfault 2.320168809e+09 | ||
2799 | # HELP node_vmstat_pgmajfault /proc/vmstat information field pgmajfault. | ||
2800 | # TYPE node_vmstat_pgmajfault untyped | ||
2801 | node_vmstat_pgmajfault 507162 | ||
2802 | # HELP node_vmstat_pgpgin /proc/vmstat information field pgpgin. | ||
2803 | # TYPE node_vmstat_pgpgin untyped | ||
2804 | node_vmstat_pgpgin 7.344136e+06 | ||
2805 | # HELP node_vmstat_pgpgout /proc/vmstat information field pgpgout. | ||
2806 | # TYPE node_vmstat_pgpgout untyped | ||
2807 | node_vmstat_pgpgout 1.541180581e+09 | ||
2808 | # HELP node_vmstat_pswpin /proc/vmstat information field pswpin. | ||
2809 | # TYPE node_vmstat_pswpin untyped | ||
2810 | node_vmstat_pswpin 1476 | ||
2811 | # HELP node_vmstat_pswpout /proc/vmstat information field pswpout. | ||
2812 | # TYPE node_vmstat_pswpout untyped | ||
2813 | node_vmstat_pswpout 35045 | ||
2792 | # HELP node_wifi_interface_frequency_hertz The current frequency a WiFi interface is operating at, in hertz. | 2814 | # HELP node_wifi_interface_frequency_hertz The current frequency a WiFi interface is operating at, in hertz. |
2793 | # TYPE node_wifi_interface_frequency_hertz gauge | 2815 | # TYPE node_wifi_interface_frequency_hertz gauge |
2794 | node_wifi_interface_frequency_hertz{device="wlan0"} 2.412e+09 | 2816 | node_wifi_interface_frequency_hertz{device="wlan0"} 2.412e+09 |
diff --git a/collector/fixtures/proc/vmstat b/collector/fixtures/proc/vmstat index 29b3f58..d431eb4 100644 --- a/collector/fixtures/proc/vmstat +++ b/collector/fixtures/proc/vmstat | |||
@@ -117,3 +117,4 @@ thp_zero_page_alloc_failed 20 | |||
117 | balloon_inflate 0 | 117 | balloon_inflate 0 |
118 | balloon_deflate 0 | 118 | balloon_deflate 0 |
119 | balloon_migrate 0 | 119 | balloon_migrate 0 |
120 | oom_kill 0 | ||
diff --git a/collector/vmstat_linux.go b/collector/vmstat_linux.go index 13dd192..50268dd 100644 --- a/collector/vmstat_linux.go +++ b/collector/vmstat_linux.go | |||
@@ -32,7 +32,7 @@ const ( | |||
32 | ) | 32 | ) |
33 | 33 | ||
34 | var ( | 34 | var ( |
35 | vmStatFields = kingpin.Flag("collector.vmstat.fields", "Regexp of fields to return for vmstat collector.").Default("^(pgpg|pswp|pg.*fault|oom_kill).*").String() | 35 | vmStatFields = kingpin.Flag("collector.vmstat.fields", "Regexp of fields to return for vmstat collector.").Default("^(oom_kill|pgpg|pswp|pg.*fault).*").String() |
36 | ) | 36 | ) |
37 | 37 | ||
38 | type vmStatCollector struct { | 38 | type vmStatCollector struct { |