Introduction
Consul is a tool developed by HashiCorp that provides service discovery, configuration management, and a key-value store. It is commonly used for microservices architectures, especially in environments like Kubernetes (K8s), where services can dynamically scale and change.
Consul can be deployed to manage service discovery and health checking, and it can be integrated with other tools like Prometheus for monitoring and metrics collection.
Kubernetes 2.0 ConfigMap
Users should update or append the existing ConfigMap named opsramp-workload-metric-user-config
by adding application-specific fields. These fields may include authentication credentials, collection frequency, and other relevant configurations.
apiVersion: v1
kind: ConfigMap
metadata:
name: opsramp-workload-metric-user-config
namespace: opsramp-agent
data:
workloads: |
consul:
- name: consul
collectionFrequency: 10s
port: 9107
targetPodSelector:
matchLabels:
- key: app.kubernetes.io/name
operator: ==
value:
- consul
---
Supported Metrics
Supported metrics for this workload as provided by the Kubernetes 2.0 Agent.
Metric | Meaning | Labels |
---|---|---|
consul_up | Was the last query of Consul successful. | |
consul_raft_peers | How many peers (servers) are in the Raft cluster. | |
consul_serf_lan_members | How many members are in the cluster. | |
consul_serf_lan_member_info | Information of member in the cluster. | member, role, version |
consul_serf_lan_member_status | Status of member in the cluster. 1=Alive, 2=Leaving, 3=Left, 4=Failed. | member |
consul_serf_wan_member_info | Information of member in the wan cluster. | member, dc, role, version |
consul_serf_wan_member_status | Status of member in the wan cluster. 1=Alive, 2=Leaving, 3=Left, 4=Failed. | member, dc |
consul_catalog_services | How many services are in the cluster. | |
consul_service_tag | Tags of a service. | service_id, node, tag |
consul_catalog_service_node_healthy | Is this service healthy on this node. | service_id, node, service_name |
consul_health_node_status | Status of health checks associated with a node. | check, node, status |
consul_health_service_status | Status of health checks associated with a service. | check, node, service_id, service_name, status |
consul_catalog_kv | The values for selected keys in Consul's key/value catalog. Keys with non-numeric values are omitted. | key |
consul_service_checks | Link the Consul service ID with check name if available. | service_id,service_name, check_id, check_name, node |