Class GCESDConfig
- java.lang.Object
-
- io.fabric8.openshift.api.model.monitoring.v1alpha1.GCESDConfig
-
- All Implemented Interfaces:
Editable<GCESDConfigBuilder>,KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class GCESDConfig extends Object implements Editable<GCESDConfigBuilder>, KubernetesResource
GCESDConfig configures scrape targets from GCP GCE instances. The private IP address is used by default, but may be changed to the public IP address with relabeling. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#gce_sd_configThe GCE service discovery will load the Google Cloud credentials from the file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable. See https://cloud.google.com/kubernetes-engine/docs/tutorials/authenticating-to-cloud-platform
A pre-requisite for using GCESDConfig is that a Secret containing valid Google Cloud credentials is mounted into the Prometheus or PrometheusAgent pod via the `.spec.secrets` field and that the GOOGLE_APPLICATION_CREDENTIALS environment variable is set to /etc/prometheus/secrets/<secret-name>/<credentials-filename.json>.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GCESDConfig()No args constructor for use in serializationGCESDConfig(String filter, Integer port, String project, String refreshInterval, String tagSeparator, String zone)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GCESDConfigBuilderedit()Map<String,Object>getAdditionalProperties()StringgetFilter()filter defines the filter that can be used optionally to filter the instance list by other criteria Syntax of this filter is described in the filter query parameter section: https://cloud.google.com/compute/docs/reference/latest/instances/listIntegergetPort()port defines the port to scrape metrics from.StringgetProject()project defines the Google Cloud Project IDStringgetRefreshInterval()refreshInterval defines the time after which the provided names are refreshed.StringgetTagSeparator()tagSeparator defines the tag separator is used to separate the tags on concatenationStringgetZone()zone defines the zone of the scrape targets.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetFilter(String filter)filter defines the filter that can be used optionally to filter the instance list by other criteria Syntax of this filter is described in the filter query parameter section: https://cloud.google.com/compute/docs/reference/latest/instances/listvoidsetPort(Integer port)port defines the port to scrape metrics from.voidsetProject(String project)project defines the Google Cloud Project IDvoidsetRefreshInterval(String refreshInterval)refreshInterval defines the time after which the provided names are refreshed.voidsetTagSeparator(String tagSeparator)tagSeparator defines the tag separator is used to separate the tags on concatenationvoidsetZone(String zone)zone defines the zone of the scrape targets.GCESDConfigBuildertoBuilder()
-
-
-
Method Detail
-
getFilter
public String getFilter()
filter defines the filter that can be used optionally to filter the instance list by other criteria Syntax of this filter is described in the filter query parameter section: https://cloud.google.com/compute/docs/reference/latest/instances/list
-
setFilter
public void setFilter(String filter)
filter defines the filter that can be used optionally to filter the instance list by other criteria Syntax of this filter is described in the filter query parameter section: https://cloud.google.com/compute/docs/reference/latest/instances/list
-
getPort
public Integer getPort()
port defines the port to scrape metrics from. If using the public IP address, this must instead be specified in the relabeling rule.
-
setPort
public void setPort(Integer port)
port defines the port to scrape metrics from. If using the public IP address, this must instead be specified in the relabeling rule.
-
getProject
public String getProject()
project defines the Google Cloud Project ID
-
setProject
public void setProject(String project)
project defines the Google Cloud Project ID
-
getRefreshInterval
public String getRefreshInterval()
refreshInterval defines the time after which the provided names are refreshed. If not set, Prometheus uses its default value.
-
setRefreshInterval
public void setRefreshInterval(String refreshInterval)
refreshInterval defines the time after which the provided names are refreshed. If not set, Prometheus uses its default value.
-
getTagSeparator
public String getTagSeparator()
tagSeparator defines the tag separator is used to separate the tags on concatenation
-
setTagSeparator
public void setTagSeparator(String tagSeparator)
tagSeparator defines the tag separator is used to separate the tags on concatenation
-
getZone
public String getZone()
zone defines the zone of the scrape targets. If you need multiple zones use multiple GCESDConfigs.
-
setZone
public void setZone(String zone)
zone defines the zone of the scrape targets. If you need multiple zones use multiple GCESDConfigs.
-
edit
public GCESDConfigBuilder edit()
- Specified by:
editin interfaceEditable<GCESDConfigBuilder>
-
toBuilder
public GCESDConfigBuilder toBuilder()
-
-