Skip to content

Comments

Added mountinfo changes to node_exporter#1400

Closed
dipack95 wants to merge 7 commits intoprometheus:masterfrom
dipack95:minfo
Closed

Added mountinfo changes to node_exporter#1400
dipack95 wants to merge 7 commits intoprometheus:masterfrom
dipack95:minfo

Conversation

@dipack95
Copy link
Contributor

Use the extra information gleaned from the mountinfo file to add
a 'mountaddr' field for NFS metrics. This helps prevent prometheus from
ignoring mounts that come from the same URL, but are actually from
different IP addresses.

Follow up from this procfs PR.

Signed-off-by: Dipack P Panjabi dpanjabi@hudson-trading.com

Dipack P Panjabi added 2 commits June 26, 2019 12:15
Use the extra information gleaned from the mountinfo file to add
a 'mountaddr' field for NFS metrics. This helps prevent prometheus from
ignoring mounts that come from the same URL, but are actually from
different IP addresses.

Signed-off-by: Dipack P Panjabi <dpanjabi@hudson-trading.com>
…hange

Signed-off-by: Dipack P Panjabi <dpanjabi@hudson-trading.com>
@dipack95
Copy link
Contributor Author

dipack95 commented Jun 26, 2019

@pgier One of the tests involving mounting /srv/test using UDP seems to be failing as it does not have the right IP address populated in the (newly added) mountaddr field in the NFS metrics. When test the same collector, locally, using a UDP mount, the mountaddr field is filled in correctly. I've also modified the fixtures/proc/10/mountinfo file to reflect the UDP protocol, but the test still fails.

Do you have any idea why that might be?

Edit: I fixed it. Just a missing line in one of the fake /proc/ files.

…he test case issue

Signed-off-by: Dipack P Panjabi <dpanjabi@hudson-trading.com>
Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

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

Minor nitpick, but otherwise LGTM

Signed-off-by: Dipack P Panjabi <dpanjabi@hudson-trading.com>
Copy link
Contributor

@pgier pgier left a comment

Choose a reason for hiding this comment

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

Looks good, just had a couple comments.

Signed-off-by: Dipack P Panjabi <dpanjabi@hudson-trading.com>
@dipack95
Copy link
Contributor Author

dipack95 commented Jul 5, 2019

@pgier I've modified the code to follow your suggestion, but now the buildkite check seems to be breaking, and I cannot see why.

@SuperQ
Copy link
Member

SuperQ commented Jul 9, 2019

It looks like this needs to be rebased against master to pick up the fixes to collector/fixtures/e2e-64k-page-output.txt.

Dipack P Panjabi added 2 commits July 9, 2019 09:40
Use the extra information gleaned from the mountinfo file to add
a 'mountaddr' field for NFS metrics. This helps prevent prometheus from
ignoring mounts that come from the same URL, but are actually from
different IP addresses.

This commit also rebases to current master

Signed-off-by: Dipack P Panjabi <dpanjabi@hudson-trading.com>
…minfo

Signed-off-by: Dipack P Panjabi <dpanjabi@hudson-trading.com>
@dipack95
Copy link
Contributor Author

dipack95 commented Jul 9, 2019

@SuperQ The buildkite build still fails! Is there anyway I can see the output of the failed build?

@SuperQ
Copy link
Member

SuperQ commented Jul 9, 2019

Here's the error, it should be fixed if you fully rebase against node_exporter master.

collector/fixtures/e2e-64k-page-output.txt	2019-07-09 09:50:30.000000000 -0400 | 0s
-- | --
  | /tmp/node_exporter_e2e_test.01LLJb/e2e-output.txt	2019-07-09 10:04:55.527124733 -0400 | 0s
  | @@ -1812,52 +1812,52 @@
  | node_netstat_Udp_OutDatagrams 53028
  | # HELP node_network_address_assign_type address_assign_type value of /sys/class/net/<iface>.
  | # TYPE node_network_address_assign_type gauge
  | -node_network_address_assign_type{interface="eth0"} 3
  | +node_network_address_assign_type{device="eth0"} 3
  | # HELP node_network_carrier carrier value of /sys/class/net/<iface>.
  | # TYPE node_network_carrier gauge
  | -node_network_carrier{interface="eth0"} 1
  | +node_network_carrier{device="eth0"} 1
  | # HELP node_network_carrier_changes_total carrier_changes_total value of /sys/class/net/<iface>.
  | # TYPE node_network_carrier_changes_total counter
  | -node_network_carrier_changes_total{interface="eth0"} 2
  | +node_network_carrier_changes_total{device="eth0"} 2
  | # HELP node_network_carrier_down_changes_total carrier_down_changes_total value of /sys/class/net/<iface>.
  | # TYPE node_network_carrier_down_changes_total counter
  | -node_network_carrier_down_changes_total{interface="eth0"} 1
  | +node_network_carrier_down_changes_total{device="eth0"} 1
  | # HELP node_network_carrier_up_changes_total carrier_up_changes_total value of /sys/class/net/<iface>.
  | # TYPE node_network_carrier_up_changes_total counter
  | -node_network_carrier_up_changes_total{interface="eth0"} 1
  | +node_network_carrier_up_changes_total{device="eth0"} 1
  | # HELP node_network_device_id device_id value of /sys/class/net/<iface>.
  | # TYPE node_network_device_id gauge
  | -node_network_device_id{interface="eth0"} 32
  | +node_network_device_id{device="eth0"} 32
  | # HELP node_network_dormant dormant value of /sys/class/net/<iface>.
  | # TYPE node_network_dormant gauge
  | -node_network_dormant{interface="eth0"} 1
  | +node_network_dormant{device="eth0"} 1
  | # HELP node_network_flags flags value of /sys/class/net/<iface>.
  | # TYPE node_network_flags gauge
  | -node_network_flags{interface="eth0"} 4867
  | +node_network_flags{device="eth0"} 4867
  | # HELP node_network_iface_id iface_id value of /sys/class/net/<iface>.
  | # TYPE node_network_iface_id gauge
  | -node_network_iface_id{interface="eth0"} 2
  | +node_network_iface_id{device="eth0"} 2
  | # HELP node_network_iface_link iface_link value of /sys/class/net/<iface>.
  | # TYPE node_network_iface_link gauge
  | -node_network_iface_link{interface="eth0"} 2
  | +node_network_iface_link{device="eth0"} 2
  | # HELP node_network_iface_link_mode iface_link_mode value of /sys/class/net/<iface>.
  | # TYPE node_network_iface_link_mode gauge
  | -node_network_iface_link_mode{interface="eth0"} 1
  | +node_network_iface_link_mode{device="eth0"} 1
  | # HELP node_network_info Non-numeric data from /sys/class/net/<iface>, value is always 1.
  | # TYPE node_network_info gauge
  | node_network_info{address="01:01:01:01:01:01",broadcast="ff:ff:ff:ff:ff:ff",device="eth0",duplex="full",ifalias="",operstate="up"} 1
  | # HELP node_network_mtu_bytes mtu_bytes value of /sys/class/net/<iface>.
  | # TYPE node_network_mtu_bytes gauge
  | -node_network_mtu_bytes{interface="eth0"} 1500
  | +node_network_mtu_bytes{device="eth0"} 1500
  | # HELP node_network_name_assign_type name_assign_type value of /sys/class/net/<iface>.
  | # TYPE node_network_name_assign_type gauge
  | -node_network_name_assign_type{interface="eth0"} 2
  | +node_network_name_assign_type{device="eth0"} 2
  | # HELP node_network_net_dev_group net_dev_group value of /sys/class/net/<iface>.
  | # TYPE node_network_net_dev_group gauge
  | -node_network_net_dev_group{interface="eth0"} 0
  | +node_network_net_dev_group{device="eth0"} 0
  | # HELP node_network_protocol_type protocol_type value of /sys/class/net/<iface>.
  | # TYPE node_network_protocol_type gauge
  | -node_network_protocol_type{interface="eth0"} 1
  | +node_network_protocol_type{device="eth0"} 1
  | # HELP node_network_receive_bytes_total Network device statistic receive_bytes.
  | # TYPE node_network_receive_bytes_total counter
  | node_network_receive_bytes_total{device="docker0"} 6.4910168e+07
  | @@ -1956,7 +1956,7 @@
  | node_network_receive_packets_total{device="💩0"} 105557
  | # HELP node_network_speed_bytes speed_bytes value of /sys/class/net/<iface>.
  | # TYPE node_network_speed_bytes gauge
  | -node_network_speed_bytes{interface="eth0"} 1.25e+08
  | +node_network_speed_bytes{device="eth0"} 1.25e+08
  | # HELP node_network_transmit_byccctes_total Network device statistic transmit_bytes.
  | # TYPE node_network_transmit_bytes_total counter
  | node_network_transmit_bytes_total{device="docker0"} 2.681662018e+09
  | @@ -2055,7 +2055,7 @@
  | node_network_transmit_packets_total{device="💩0"} 304261
  | # HELP node_network_transmit_queue_length transmit_queue_length value of /sys/class/net/<iface>.
  | # TYPE node_network_transmit_queue_length gauge
  | -node_network_transmit_queue_length{interface="eth0"} 1000
  | +node_network_transmit_queue_length{device="eth0"} 1000
  | # HELP node_network_up Value is 1 if operstate is 'up', 0 otherwise.
  | # TYPE node_network_up gauge
  | node_network_up{device="eth0"} 1

@dipack95 dipack95 closed this Jul 9, 2019
@dipack95 dipack95 deleted the minfo branch July 9, 2019 15:01
@dipack95
Copy link
Contributor Author

dipack95 commented Jul 9, 2019

Accidentally closed this PR; created one with the rebased fork #1417

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants