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 MetricMetric Display NameUnit
consul_kvs_apply

This measures the time it takes to complete an update to the KV store
Kvs Apply
consul_kvs_apply_sum

Measures the time it takes to complete an update to the KV store
Kvs Apply Sum
consul_kvs_apply_count

Measures the time it takes to complete an update to the KV store
Kvs Apply Count
consul_txn_apply

Measures the time spent applying a transaction operation
Txn Apply
consul_txn_apply_sum

Sum of the time spent applying a transaction operation
Txn Apply Sum
consul_txn_apply_count

Time spent applying a transaction operation
Txn Apply Count
consul_raft_apply

Number of Raft transactions occurring over the interval
Raft Apply
consul_raft_commitTime

Time it takes to commit a new entry to the Raft log on the leader
Raft Commit Timeseconds
consul_raft_commitTime_sum

Raft commitTime sum
Raft Commit Time Sumseconds
consul_raft_commitTime_count

Raft commitTime count
Raft Commit Time Countseconds
consul_raft_leader_lastContact

Time since the leader was last able to contact the follower nodes
Raft Leader Lastcontact
consul_raft_leader_lastContact_sum

Measure of raft leader last contact sum
Raft Leader Lastcontact Sum
consul_raft_leader_lastContact_count

Raft leader last contact count
Raft Leader Lastcontact Count
consul_autopilot_healthy

Tracks the overall health of the local server cluster. 1 if all servers are healthy, 0 if one or more are unhealthy
Autopilot Healthy
consul_runtime_alloc_bytes

Measures the number of bytes allocated by the Consul process
Runtime Alloc Bytesbytes
consul_runtime_sys_bytes

Measures the number of bytes allocated by the os
Runtime Sys Bytesbytes
consul_runtime_total_gc_pause_ns

Number of nanoseconds consumed by stop-the-world garbage collection (GC) pauses since Consul started
Runtime Total Gc Pause Nsnanoseconds
consul_client_rpc

Increments whenever a Consul agent in client mode makes an RPC request to a Consul server
Client Rpc
consul_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
Client Rpc Exceeded
consul_client_rpc_failed

Increments whenever a Consul agent in client mode makes an RPC request to a Consul server and fails
Client Rpc Failed
consul_memberlist_gossip

Number of memberlist gossip
Memberlist Gossip
consul_memberlist_gossip_sum

Measure of memberlist gossip sum
Memberlist Gossip Sum
consul_memberlist_gossip_count

Memberlist gossip count
Memberlist Gossip Count
consul_memberlist_probeNode

Total number of memberlist probe node
Memberlist Probenode
consul_memberlist_probeNode_sum

Memberlist probeNode sum
Memberlist Probenode Sum
consul_memberlist_probeNode_count

Number of memberlist probe node count
Memberlist Probenode Count
consul_memberlist_pushPullNode

Memberlist push pull node
Memberlist Pushpullnode
consul_memberlist_pushPullNode_sum

Memberlist push pull node
Memberlist Pushpullnode Sum
consul_memberlist_pushPullNode_count

Memberlist push pull node
Memberlist Pushpullnode Count
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

Number of runtime goroutines
Runtime Num Goroutines
consul_runtime_heap_objects

Number of runtime heap objects
Runtime Heap Objects
consul_runtime_malloc_count

Number of runtime malloc count
Runtime Malloc Count
consul_runtime_free_count

Number of runtime free count
Runtime Free Count
consul_runtime_total_gc_runs

Number of runtime total gc runs
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

Number of raft leader dispatchLog count
Raft Leader Dispatchlog Count
consul_serf_queue_Intent

Serf queue Intent
Serf Queue Intent
consul_serf_queue_Intent_sum

Measure of serf queue Intent sum
Serf Queue Intent Sum
consul_serf_queue_Intent_count

Number of serf queue Intent count
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

Number of serf queue Event count
Serf Queue Event Count
consul_serf_queue_Query

Number of serf queue Query
Serf Queue Query
consul_serf_queue_Query_sum

Serf queue Query sum
Serf Queue Query Sum
consul_serf_queue_Query_count

Number of serf queue Query count
Serf Queue Query Count