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 NameUnitDescription
consul_kvs_applyKvs ApplyThis measures the time it takes to complete an update to the KV store
consul_kvs_apply_sumKvs Apply SumMeasures the time it takes to complete an update to the KV store
consul_kvs_apply_countKvs Apply CountMeasures the time it takes to complete an update to the KV store
consul_txn_applyTxn ApplyMeasures the time spent applying a transaction operation
consul_txn_apply_sumTxn Apply SumSum of the time spent applying a transaction operation
consul_txn_apply_countTxn Apply CountTime spent applying a transaction operation
consul_raft_applyRaft ApplyNumber of Raft transactions occurring over the interval
consul_raft_commitTimeRaft Commit TimesecondsTime it takes to commit a new entry to the Raft log on the leader
consul_raft_commitTime_sumRaft Commit Time SumsecondsRaft commitTime sum
consul_raft_commitTime_countRaft Commit Time CountsecondsRaft commitTime count
consul_raft_leader_lastContactRaft Leader LastcontactTime since the leader was last able to contact the follower nodes
consul_raft_leader_lastContact_sumRaft Leader Lastcontact SumMeasure of raft leader last contact sum
consul_raft_leader_lastContact_countRaft Leader Lastcontact CountRaft leader last contact count
consul_autopilot_healthyAutopilot HealthyTracks the overall health of the local server cluster. 1 if all servers are healthy, 0 if one or more are unhealthy
consul_runtime_alloc_bytesRuntime Alloc BytesbytesMeasures the number of bytes allocated by the Consul process
consul_runtime_sys_bytesRuntime Sys BytesbytesMeasures the number of bytes allocated by the os
consul_runtime_total_gc_pause_nsRuntime Total Gc Pause NsnanosecondsNumber of nanoseconds consumed by stop-the-world garbage collection (GC) pauses since Consul started
consul_client_rpcClient RpcIncrements whenever a Consul agent in client mode makes an RPC request to a Consul server
consul_client_rpc_exceededClient Rpc ExceededIncrements 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_failedClient Rpc FailedIncrements whenever a Consul agent in client mode makes an RPC request to a Consul server and fails
consul_memberlist_gossipMemberlist GossipNumber of memberlist gossip
consul_memberlist_gossip_sumMemberlist Gossip SumMeasure of memberlist gossip sum
consul_memberlist_gossip_countMemberlist Gossip CountMemberlist gossip count
consul_memberlist_probeNodeMemberlist ProbenodeTotal number of memberlist probe node
consul_memberlist_probeNode_sumMemberlist Probenode SumMemberlist probeNode sum
consul_memberlist_probeNode_countMemberlist Probenode CountNumber of memberlist probe node count
consul_memberlist_pushPullNodeMemberlist PushpullnodeMemberlist push pull node
consul_memberlist_pushPullNode_sumMemberlist Pushpullnode SumMemberlist push pull node
consul_memberlist_pushPullNode_countMemberlist Pushpullnode CountMemberlist push pull node
consul_memberlist_tcp_acceptMemberlist Tcp AcceptMemberlist tcp accept
consul_memberlist_tcp_connectMemberlist Tcp ConnectMemberlist tcp connect
consul_memberlist_tcp_sentMemberlist Tcp SentMemberlist tcp sent
consul_memberlist_udp_receivedMemberlist Udp ReceivedMemberlist udp received
consul_memberlist_udp_sentMemberlist Udp SentMemberlist udp sent
consul_runtime_num_goroutinesRuntime Num GoroutinesNumber of runtime goroutines
consul_runtime_heap_objectsRuntime Heap ObjectsNumber of runtime heap objects
consul_runtime_malloc_countRuntime Malloc CountNumber of runtime malloc count
consul_runtime_free_countRuntime Free CountNumber of runtime free count
consul_runtime_total_gc_runsRuntime Total Gc RunsNumber of runtime total gc runs
consul_raft_state_leaderRaft State LeaderRaft state leader
consul_raft_state_candidateRaft State CandidateRaft state candidate
consul_raft_leader_dispatchLogRaft Leader DispatchlogRaft leader dispatchLog
consul_raft_leader_dispatchLog_sumRaft Leader Dispatchlog SumRaft leader dispatchLog sum
consul_raft_leader_dispatchLog_countRaft Leader Dispatchlog CountNumber of raft leader dispatchLog count
consul_serf_queue_IntentSerf Queue IntentSerf queue Intent
consul_serf_queue_Intent_sumSerf Queue Intent SumMeasure of serf queue Intent sum
consul_serf_queue_Intent_countSerf Queue Intent CountNumber of serf queue Intent count
consul_serf_queue_EventSerf Queue EventSerf queue Event
consul_serf_queue_Event_sumSerf Queue Event SumSerf queue Event sum
consul_serf_queue_Event_countSerf Queue Event CountNumber of serf queue Event count
consul_serf_queue_QuerySerf Queue QueryNumber of serf queue Query
consul_serf_queue_Query_sumSerf Queue Query SumSerf queue Query sum
consul_serf_queue_Query_countSerf Queue Query CountNumber of serf queue Query count