Don't error out if we cannot fetch instance name on GCE. (#623)
Don't error out if we cannot fetch instance name on GCE. (#623)

On some versions of GKE, and when some certain features are enabled, instance name is not available through metadata. Using environment variable HOSTNAME if instance name is not available.

Ref: https://github.com/google/cloudprober/issues/616
PiperOrigin-RevId: 383712025
cloudprober/cloudprober,google/cloudprober,google/cloudprober,cloudprober/cloudprober,cloudprober/cloudprober