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

Display instance internal IP address on Process Stats endpoint #3378

Merged
merged 2 commits into from
Sep 26, 2023

Conversation

tcdowney
Copy link
Member

@tcdowney tcdowney commented Aug 7, 2023

Experimenting with adding the internal IP address (as the instance_internal_ip field) to the process stats endpoint for #1378. This matches the CF_INSTANCE_INTERNAL_IP=10.255.93.167 env var and I'm open to other names for sure. Maybe just internal_ip?

Example:

{
  "resources": [
    {
      "type": "web",
      "index": 0,
      "state": "RUNNING",
      "host": "10.244.0.139",
      "instance_internal_ip": "10.255.93.167",
      "uptime": 1524,
      "mem_quota": 268435456,
      "disk_quota": 1073741824,
      "log_rate_limit": -1,
      "fds_quota": 16384,
      "isolation_segment": null,
      "details": null,
      "instance_ports": [
        {
          "external": 61000,
          "internal": 8080,
          "external_tls_proxy_port": 61002,
          "internal_tls_proxy_port": 61001
        },
        {
          "external": 61000,
          "internal": 8080,
          "external_tls_proxy_port": null,
          "internal_tls_proxy_port": 61443
        },
        {
          "external": 61001,
          "internal": 2222,
          "external_tls_proxy_port": 61003,
          "internal_tls_proxy_port": 61002
        }
      ],
      "usage": {
        "time": "2023-08-07T22:39:50+00:00",
        "cpu": 0.003555510033188645,
        "mem": 59051576,
        "disk": 175616000,
        "log_rate": 0
      }
    }
  ]
}

I think there are probably some request specs that I didn't account for, but if this is a change we actually want I'm happy to fix those up as well.

@tcdowney tcdowney marked this pull request as ready for review August 9, 2023 23:10
- Allows users to see the internal container IP address for a process
@tcdowney tcdowney force-pushed the add-internal-ip-process-stats branch from 31cc815 to 85430e5 Compare August 9, 2023 23:13
@tcdowney tcdowney changed the title Internal Instance IP on Process Stats - proof of concept Display instance internal IP address on Process Stats endpoint Aug 10, 2023
Copy link
Member

@moleske moleske left a comment

Choose a reason for hiding this comment

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

Thanks for updating the docs along with the change!

@moleske moleske merged commit 0911a46 into cloudfoundry:main Sep 26, 2023
geofffranks added a commit to geofffranks/cloud_controller_ng that referenced this pull request Oct 19, 2023
…foundry#3378)

* Add instance_internal_ip field to ProcessStats endpoint

- Allows users to see the internal container IP address for a process

* Add docs for instance_internal_ip field

Authored-by: Tim Downey <[email protected]>
Co-authored-by: Geoff Franks <[email protected]>
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