Consul is a service mesh solution providing a full featured control plane with service discovery, configuration, and segmentation functionality. Each of these features can be used individually as needed, or they can be used together to build a full service mesh. Consul requires a data plane and supports both a proxy and native integration model.
Prerequisite
Enable promethus metrics in Consul. To enable prometheus, add prometheus_retention_time
in telemetry in the config.json
file.
Configuring the credentials
Configure the credentials in the directory /opt/opsramp/agent/conf/app.d/creds.yaml
consul:
- name: consul
user: <username>
pwd: <Password>
encoding-type: plain
labels:
key1: val1
key2: val2
Configuring the application
Docker environment
Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-container-detection.yaml
- name: consul
container-checks:
image-check:
- consul
port-check:
- 8500
- 8301
Kubernetes environment
Configure the application in config.yaml
- name: consul
container-checks:
image-check:
- consul
port-check:
- 8500
- 8301
Validate
Go to Resources under the Infrastructure tab to check if your resources are onboarded and the metrics are collected.
Metrics
OpsRamp Metric | Metric Display Name | Unit | Description |
---|---|---|---|
consul_kvs_apply | Kvs Apply | This measures the time it takes to complete an update to the KV store | |
consul_kvs_apply_sum | Kvs Apply Sum | Measures the time it takes to complete an update to the KV store | |
consul_kvs_apply_count | Kvs Apply Count | Measures the time it takes to complete an update to the KV store | |
consul_txn_apply | Txn Apply | Measures the time spent applying a transaction operation | |
consul_txn_apply_sum | Txn Apply Sum | Sum of the time spent applying a transaction operation | |
consul_txn_apply_count | Txn Apply Count | Time spent applying a transaction operation | |
consul_raft_apply | Raft Apply | Number of Raft transactions occurring over the interval | |
consul_raft_commitTime | Raft Commit Time | seconds | Time it takes to commit a new entry to the Raft log on the leader |
consul_raft_commitTime_sum | Raft Commit Time Sum | seconds | Raft commitTime sum |
consul_raft_commitTime_count | Raft Commit Time Count | seconds | Raft commitTime count |
consul_raft_leader_lastContact | Raft Leader Lastcontact | Time since the leader was last able to contact the follower nodes | |
consul_raft_leader_lastContact_sum | Raft Leader Lastcontact Sum | Measure of raft leader last contact sum | |
consul_raft_leader_lastContact_count | Raft Leader Lastcontact Count | Raft leader last contact count | |
consul_autopilot_healthy | Autopilot Healthy | Tracks the overall health of the local server cluster. 1 if all servers are healthy, 0 if one or more are unhealthy | |
consul_runtime_alloc_bytes | Runtime Alloc Bytes | bytes | Measures the number of bytes allocated by the Consul process |
consul_runtime_sys_bytes | Runtime Sys Bytes | bytes | Measures the number of bytes allocated by the os |
consul_runtime_total_gc_pause_ns | Runtime Total Gc Pause Ns | nanoseconds | Number of nanoseconds consumed by stop-the-world garbage collection (GC) pauses since Consul started |
consul_client_rpc | Client Rpc | Increments whenever a Consul agent in client mode makes an RPC request to a Consul server | |
consul_client_rpc_exceeded | Client Rpc Exceeded | Increments whenever a Consul agent in client mode makes an RPC request to a Consul server gets rate limited by that agent's limits configuration | |
consul_client_rpc_failed | Client Rpc Failed | Increments whenever a Consul agent in client mode makes an RPC request to a Consul server and fails | |
consul_memberlist_gossip | Memberlist Gossip | Number of memberlist gossip | |
consul_memberlist_gossip_sum | Memberlist Gossip Sum | Measure of memberlist gossip sum | |
consul_memberlist_gossip_count | Memberlist Gossip Count | Memberlist gossip count | |
consul_memberlist_probeNode | Memberlist Probenode | Total number of memberlist probe node | |
consul_memberlist_probeNode_sum | Memberlist Probenode Sum | Memberlist probeNode sum | |
consul_memberlist_probeNode_count | Memberlist Probenode Count | Number of memberlist probe node count | |
consul_memberlist_pushPullNode | Memberlist Pushpullnode | Memberlist push pull node | |
consul_memberlist_pushPullNode_sum | Memberlist Pushpullnode Sum | Memberlist push pull node | |
consul_memberlist_pushPullNode_count | Memberlist Pushpullnode Count | Memberlist push pull node | |
consul_memberlist_tcp_accept | Memberlist Tcp Accept | Memberlist tcp accept | |
consul_memberlist_tcp_connect | Memberlist Tcp Connect | Memberlist tcp connect | |
consul_memberlist_tcp_sent | Memberlist Tcp Sent | Memberlist tcp sent | |
consul_memberlist_udp_received | Memberlist Udp Received | Memberlist udp received | |
consul_memberlist_udp_sent | Memberlist Udp Sent | Memberlist udp sent | |
consul_runtime_num_goroutines | Runtime Num Goroutines | Number of runtime goroutines | |
consul_runtime_heap_objects | Runtime Heap Objects | Number of runtime heap objects | |
consul_runtime_malloc_count | Runtime Malloc Count | Number of runtime malloc count | |
consul_runtime_free_count | Runtime Free Count | Number of runtime free count | |
consul_runtime_total_gc_runs | Runtime Total Gc Runs | Number of runtime total gc runs | |
consul_raft_state_leader | Raft State Leader | Raft state leader | |
consul_raft_state_candidate | Raft State Candidate | Raft state candidate | |
consul_raft_leader_dispatchLog | Raft Leader Dispatchlog | Raft leader dispatchLog | |
consul_raft_leader_dispatchLog_sum | Raft Leader Dispatchlog Sum | Raft leader dispatchLog sum | |
consul_raft_leader_dispatchLog_count | Raft Leader Dispatchlog Count | Number of raft leader dispatchLog count | |
consul_serf_queue_Intent | Serf Queue Intent | Serf queue Intent | |
consul_serf_queue_Intent_sum | Serf Queue Intent Sum | Measure of serf queue Intent sum | |
consul_serf_queue_Intent_count | Serf Queue Intent Count | Number of serf queue Intent count | |
consul_serf_queue_Event | Serf Queue Event | Serf queue Event | |
consul_serf_queue_Event_sum | Serf Queue Event Sum | Serf queue Event sum | |
consul_serf_queue_Event_count | Serf Queue Event Count | Number of serf queue Event count | |
consul_serf_queue_Query | Serf Queue Query | Number of serf queue Query | |
consul_serf_queue_Query_sum | Serf Queue Query Sum | Serf queue Query sum | |
consul_serf_queue_Query_count | Serf Queue Query Count | Number of serf queue Query count |