scheme

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2021 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var APIServerScheme = MetricScheme{
	"apiserver_up_sum": func(obj types.Object) types.MetricQuery {
		return obj.(types.APIServer).Up()
	},
	"apiserver_request_rate": func(obj types.Object) types.MetricQuery {
		return obj.(types.APIServer).RequestRate()
	},
	"apiserver_request_by_verb_rate": func(obj types.Object) types.MetricQuery {
		return obj.(types.APIServer).RequestByVerbRate()
	},
	"apiserver_request_latencies": func(obj types.Object) types.MetricQuery {
		return obj.(types.APIServer).RequestLatencies()
	},
	"apiserver_request_by_verb_latencies": func(obj types.Object) types.MetricQuery {
		return obj.(types.APIServer).RequestByVerbLatencies()
	},
}
View Source
var ClusterScheme = MetricScheme{
	"cluster_cpu_utilisation": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).CPUUtilization()
	},
	"cluster_cpu_usage": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).CPUUsage()
	},
	"cluster_cpu_total": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).CPUTotal()
	},
	"cluster_memory_utilisation": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).MemoryUtilization()
	},
	"cluster_memory_available": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).MemoryAvailable()
	},
	"cluster_memory_total": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).MemoryTotal()
	},
	"cluster_memory_usage_wo_cache": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).MemoryUsageWoCache()
	},
	"cluster_net_utilisation": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).NetUtilization()
	},
	"cluster_net_bytes_transmitted": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).NetBytesTransmitted()
	},
	"cluster_net_bytes_received": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).NetBytesReceived()
	},
	"cluster_disk_read_iops": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).DiskReadIOPS()
	},
	"cluster_disk_write_iops": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).DiskWriteIOPS()
	},
	"cluster_disk_read_throughput": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).DiskReadThroughput()
	},
	"cluster_disk_write_throughput": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).DiskWriteThroughput()
	},
	"cluster_disk_size_usage": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).DiskSizeUsage()
	},
	"cluster_disk_size_utilisation": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).DiskSizeUtilization()
	},
	"cluster_disk_size_capacity": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).DiskSizeCapacity()
	},
	"cluster_disk_size_available": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).DiskSizeAvailable()
	},
	"cluster_disk_inode_total": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).DiskInodeTotal()
	},
	"cluster_disk_inode_usage": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).DiskInodeUsage()
	},
	"cluster_disk_inode_utilisation": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).DiskInodeUtilization()
	},
	"cluster_namespace_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).NamespaceCount()
	},
	"cluster_pod_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).PodCount()
	},
	"cluster_pod_quota": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).PodQuota()
	},
	"cluster_pod_utilisation": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).PodUtilization()
	},
	"cluster_pod_running_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).PodRunning()
	},
	"cluster_pod_succeeded_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).PodSucceed()
	},
	"cluster_pod_abnormal_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).PodAbnormal()
	},
	"cluster_pod_abnormal_ratio": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).PodAbnormalRatio()
	},
	"cluster_node_online": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).NodeOnline()
	},
	"cluster_node_offline": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).NodeOffline()
	},
	"cluster_node_offline_ratio": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).NodeOfflineRatio()
	},
	"cluster_node_total": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).NodeTotal()
	},
	"cluster_cronjob_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).CronJobCount()
	},
	"cluster_pvc_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).PVCCount()
	},
	"cluster_daemonset_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).DaemonSetCount()
	},
	"cluster_deployment_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).DeploymentCount()
	},
	"cluster_endpoint_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).EndpointCount()
	},
	"cluster_hpa_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).HPACount()
	},
	"cluster_job_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).JobCount()
	},
	"cluster_statefulset_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).StatefulSetCount()
	},
	"cluster_replicaset_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).ReplicaSetCount()
	},
	"cluster_service_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).ServiceCount()
	},
	"cluster_secret_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).SecretCount()
	},
	"cluster_pv_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).PVCount()
	},
	"cluster_ingresses_extensions_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).IngressCount()
	},
	"cluster_load1": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).Load1()
	},
	"cluster_load5": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).Load5()
	},
	"cluster_load15": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).Load15()
	},
	"kubesphere_workspace_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).WorkspaceCount()
	},
	"kubesphere_user_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).UserCount()
	},
	"kubesphere_cluser_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Cluster).ClusterCount()
	},
}
View Source
var ContainerScheme = MetricScheme{
	"container_cpu_usage": func(obj types.Object) types.MetricQuery {
		return obj.(types.Container).CPUUsage()
	},
	"container_memory_usage": func(obj types.Object) types.MetricQuery {
		return obj.(types.Container).MemoryUsage()
	},
}
View Source
var EmptyScheme = MetricScheme{}
View Source
var EtcdScheme = MetricScheme{
	"etcd_server_list": func(obj types.Object) types.MetricQuery {
		return obj.(types.Etcd).ServerList()
	},
	"etcd_server_total": func(obj types.Object) types.MetricQuery {
		return obj.(types.Etcd).ServerTotal()
	},
	"etcd_server_up_total": func(obj types.Object) types.MetricQuery {
		return obj.(types.Etcd).ServerUpTotal()
	},
	"etcd_server_has_leader": func(obj types.Object) types.MetricQuery {
		return obj.(types.Etcd).ServerHasLeader()
	},
	"etcd_server_leader_changes": func(obj types.Object) types.MetricQuery {
		return obj.(types.Etcd).ServerLeaderChanges()
	},
	"etcd_server_proposals_failed_rate": func(obj types.Object) types.MetricQuery {
		return obj.(types.Etcd).ServerProposalsFailedRate()
	},
	"etcd_server_proposals_applied_rate": func(obj types.Object) types.MetricQuery {
		return obj.(types.Etcd).ServerProposalsAppliedRate()
	},
	"etcd_server_proposals_committed_rate": func(obj types.Object) types.MetricQuery {
		return obj.(types.Etcd).ServerProposalsCommittedRate()
	},
	"etcd_server_proposals_pending_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Etcd).ServerProposalsPendingCount()
	},
	"etcd_mvcc_db_size": func(obj types.Object) types.MetricQuery {
		return obj.(types.Etcd).MvccDBSize()
	},
	"etcd_network_client_grpc_received_bytes": func(obj types.Object) types.MetricQuery {
		return obj.(types.Etcd).NetworkClientGRPCReceivedBytes()
	},
	"etcd_network_client_grpc_sent_bytes": func(obj types.Object) types.MetricQuery {
		return obj.(types.Etcd).NetworkClientGRPCSentBytes()
	},
	"etcd_grpc_call_rate": func(obj types.Object) types.MetricQuery {
		return obj.(types.Etcd).GRPCCallRate()
	},
	"etcd_grpc_call_failed_rate": func(obj types.Object) types.MetricQuery {
		return obj.(types.Etcd).GRPCCallFailedRate()
	},
	"etcd_grpc_server_msg_received_rate": func(obj types.Object) types.MetricQuery {
		return obj.(types.Etcd).GRPCServerMSGReceivedRate()
	},
	"etcd_grpc_server_msg_sent_rate": func(obj types.Object) types.MetricQuery {
		return obj.(types.Etcd).GRPCServerMSGSentRate()
	},
	"etcd_disk_wal_fsync_duration": func(obj types.Object) types.MetricQuery {
		return obj.(types.Etcd).DiskWALFsyncDuration()
	},
	"etcd_disk_wal_fsync_duration_quantile": func(obj types.Object) types.MetricQuery {
		return obj.(types.Etcd).DiskWALFsyncDurationQuantile()
	},
	"etcd_disk_backend_commit_duration": func(obj types.Object) types.MetricQuery {
		return obj.(types.Etcd).DiskBackendCommitDuration()
	},
	"etcd_disk_backend_commit_duration_quantile": func(obj types.Object) types.MetricQuery {
		return obj.(types.Etcd).DiskBackendCommitDurationQuantile()
	},
}
View Source
var NamespaceScheme = MetricScheme{
	"namespace_cpu_usage": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).CPUUsage()
	},
	"namespace_memory_usage": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).MemoryUsage()
	},
	"namespace_memory_usage_wo_cache": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).MemoryUsageWoCache()
	},
	"namespace_net_bytes_transmitted": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).NetBytesTransmitted()
	},
	"namespace_net_bytes_received": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).NetBytesReceived()
	},
	"namespace_pod_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).PodCount()
	},
	"namespace_pod_count_hard": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).PodCountHard()
	},
	"namespace_pod_running_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).PodRunning()
	},
	"namespace_pod_succeeded_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).PodSucceed()
	},
	"namespace_pod_abnormal_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).PodAbnormal()
	},
	"namespace_pod_abnormal_ratio": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).PodAbnormalRatio()
	},
	"namespace_memory_limit_hard": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).MemoryLimitHard()
	},
	"namespace_cpu_limit_hard": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).CPULimitHard()
	},
	"namespace_cronjob_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).CronJobCount()
	},
	"namespace_pvc_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).PVCCount()
	},
	"namespace_daemonset_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).DaemonSetCount()
	},
	"namespace_deployment_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).DeploymentCount()
	},
	"namespace_endpoint_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).EndpointCount()
	},
	"namespace_hpa_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).HPACount()
	},
	"namespace_job_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).JobCount()
	},
	"namespace_statefulset_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).StatefulSetCount()
	},
	"namespace_replicaset_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).ReplicasetCount()
	},
	"namespace_service_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).ServiceCount()
	},
	"namespace_secret_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).SecretCount()
	},
	"namespace_configmap_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).ConfigMapCount()
	},
	"namespace_ingresses_extensions_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).IngressCount()
	},
	"namespace_s2ibuilder_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Namespace).S2IBuilderCount()
	},
}
View Source
var NodeScheme = MetricScheme{
	"node_cpu_utilisation": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).CPUUtilization()
	},
	"node_cpu_total": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).CPUTotal()
	},
	"node_cpu_usage": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).CPUUsage()
	},
	"node_memory_utilisation": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).MemoryUtilization()
	},
	"node_memory_usage_wo_cache": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).MemoryUsageWoCache()
	},
	"node_memory_available": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).MemoryAvailable()
	},
	"node_memory_total": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).MemoryTotal()
	},
	"node_net_utilisation": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).NetUtilization()
	},
	"node_net_bytes_transmitted": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).NetBytesTransmitted()
	},
	"node_net_bytes_received": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).NetBytesReceived()
	},
	"node_disk_read_iops": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).DiskReadIOPS()
	},
	"node_disk_write_iops": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).DiskWriteIOPS()
	},
	"node_disk_read_throughput": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).DiskReadThroughput()
	},
	"node_disk_write_throughput": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).DiskWriteThroughput()
	},
	"node_disk_size_capacity": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).DiskSizeCapacity()
	},
	"node_disk_size_available": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).DiskSizeAvailable()
	},
	"node_disk_size_usage": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).DiskSizeUsage()
	},
	"node_disk_size_utilisation": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).DiskSizeUtilization()
	},
	"node_disk_inode_total": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).DiskInodeTotal()
	},
	"node_disk_inode_usage": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).DiskInodeUsage()
	},
	"node_disk_inode_utilisation": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).DiskInodeUtilization()
	},
	"node_pod_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).PodCount()
	},
	"node_pod_quota": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).PodQuota()
	},
	"node_pod_utilisation": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).PodUtilization()
	},
	"node_pod_running_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).PodRunning()
	},
	"node_pod_succeeded_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).PodSucceed()
	},
	"node_pod_abnormal_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).PodAbnormal()
	},
	"node_pod_abnormal_ratio": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).PodAbnormalRatio()
	},
	"node_load1": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).Load1()
	},
	"node_load5": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).Load5()
	},
	"node_load15": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).Load15()
	},
	"node_pleg_quantile": func(obj types.Object) types.MetricQuery {
		return obj.(types.Node).PlegQuantile()
	},
}
View Source
var PVCScheme = MetricScheme{
	"pvc_inodes_available": func(obj types.Object) types.MetricQuery {
		return obj.(types.PVC).InodeAvailable()
	},
	"pvc_inodes_used": func(obj types.Object) types.MetricQuery {
		return obj.(types.PVC).InodeUsed()
	},
	"pvc_inodes_total": func(obj types.Object) types.MetricQuery {
		return obj.(types.PVC).InodeTotal()
	},
	"pvc_inodes_utilisation": func(obj types.Object) types.MetricQuery {
		return obj.(types.PVC).InodeUtilization()
	},
	"pvc_bytes_available": func(obj types.Object) types.MetricQuery {
		return obj.(types.PVC).BytesAvailable()
	},
	"pvc_bytes_used": func(obj types.Object) types.MetricQuery {
		return obj.(types.PVC).BytesUsed()
	},
	"pvc_bytes_total": func(obj types.Object) types.MetricQuery {
		return obj.(types.PVC).BytesTotal()
	},
	"pvc_bytes_utilisation": func(obj types.Object) types.MetricQuery {
		return obj.(types.PVC).BytesUtilization()
	},
}
View Source
var PodScheme = MetricScheme{
	"pod_cpu_usage": func(obj types.Object) types.MetricQuery {
		return obj.(types.Pod).CPUUsage()
	},
	"pod_memory_usage": func(obj types.Object) types.MetricQuery {
		return obj.(types.Pod).MemoryUsage()
	},
	"pod_memory_usage_wo_cache": func(obj types.Object) types.MetricQuery {
		return obj.(types.Pod).MemoryUsageWoCache()
	},
	"pod_net_bytes_transmitted": func(obj types.Object) types.MetricQuery {
		return obj.(types.Pod).NetBytesTransmitted()
	},
	"pod_net_bytes_received": func(obj types.Object) types.MetricQuery {
		return obj.(types.Pod).NetBytesReceived()
	},
}
View Source
var SchedulerScheme = MetricScheme{
	"scheduler_up_sum": func(obj types.Object) types.MetricQuery {
		return obj.(types.Scheduler).Up()
	},
	"scheduler_schedule_attempts": func(obj types.Object) types.MetricQuery {
		return obj.(types.Scheduler).ScheduleAttempts()
	},
	"scheduler_schedule_attempt_rate": func(obj types.Object) types.MetricQuery {
		return obj.(types.Scheduler).ScheduleAttemptRate()
	},
	"scheduler_e2e_scheduling_latency": func(obj types.Object) types.MetricQuery {
		return obj.(types.Scheduler).E2ESchedulingLatency()
	},
	"scheduler_e2e_scheduling_latency_quantile": func(obj types.Object) types.MetricQuery {
		return obj.(types.Scheduler).E2ESchedulingLatencyQuantile()
	},
}
View Source
var WorkloadScheme = MetricScheme{
	"workload_cpu_usage": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workload).CPUUsage()
	},
	"workload_memory_usage": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workload).MemoryUsage()
	},
	"workload_memory_usage_wo_cache": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workload).MemoryUsageWoCache()
	},
	"workload_net_bytes_transmitted": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workload).NetBytesTransmitted()
	},
	"workload_net_bytes_received": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workload).NetBytesReceived()
	},
	"workload_deployment_replica": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workload).DeploymentReplica()
	},
	"workload_deployment_replica_available": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workload).DeploymentReplicaAvailable()
	},
	"workload_deployment_unavailable_replicas_ratio": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workload).DeploymentUnavailableReplicasRatio()
	},
	"workload_statefulset_replica": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workload).StatefulSetReplica()
	},
	"workload_statefulset_replica_available": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workload).StatefulSetReplicaAvailable()
	},
	"workload_statefulset_unavailable_replicas_ratio": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workload).StatefulSetUnavailableReplicaRatio()
	},
	"workload_daemonset_replica": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workload).DaemonSetReplica()
	},
	"workload_daemonset_replica_available": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workload).DaemonSetReplicaAvailable()
	},
	"workload_daemonset_unavailable_replicas_ratio": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workload).DaemonSetUnavailableReplicasRatio()
	},
}
View Source
var WorkspaceScheme = MetricScheme{
	"workspace_cpu_usage": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).CPUUsage()
	},
	"workspace_memory_usage": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).MemoryUsage()
	},
	"workspace_memory_usage_wo_cache": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).MemoryUsageWoCache()
	},
	"workspace_net_bytes_transmitted": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).NetBytesTransmitted()
	},
	"workspace_net_bytes_received": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).NetBytesReceived()
	},
	"workspace_pod_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).PodCount()
	},
	"workspace_pod_running_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).PodRunning()
	},
	"workspace_pod_succeeded_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).PodSucceed()
	},
	"workspace_pod_abnormal_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).PodAbnormal()
	},
	"workspace_pod_abnormal_ratio": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).PodAbnormalRatio()
	},
	"workspace_ingresses_extensions_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).IngressCount()
	},
	"workspace_cronjob_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).CronJobCount()
	},
	"workspace_pvc_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).PVCCount()
	},
	"workspace_daemonset_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).DaemonSetCount()
	},
	"workspace_deployment_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).DeploymentCount()
	},
	"workspace_endpoint_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).EndpointCount()
	},
	"workspace_hpa_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).HPACount()
	},
	"workspace_job_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).JobCount()
	},
	"workspace_statefulset_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).StatefulSetCount()
	},
	"workspace_replicaset_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).ReplicaSetCount()
	},
	"workspace_service_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).ServiceCount()
	},
	"workspace_secret_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).SecretCount()
	},
	"workspace_namespace_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).NamespaceCount()
	},
	"workspace_devops_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).DevopsCount()
	},
	"workspace_member_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).MemberCount()
	},
	"workspace_role_count": func(obj types.Object) types.MetricQuery {
		return obj.(types.Workspace).RoleCount()
	},
}

Functions

func QueryForMetric

func QueryForMetric(obj types.Object, metric string) types.MetricQuery

Types

type MetricScheme

type MetricScheme map[string]QueryForObject

func GetScheme

func GetScheme(obj types.Object) MetricScheme

func (MetricScheme) ListMetrics

func (scheme MetricScheme) ListMetrics() (ret []string)

func (MetricScheme) QueryForMetric

func (scheme MetricScheme) QueryForMetric(obj types.Object, metric string) types.MetricQuery

type QueryForObject

type QueryForObject func(obj types.Object) types.MetricQuery

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL