Consul
Consul is a service networking platform and service mesh solution developed by HashiCorp that provides service discovery, health checking, key/value storage, and multi-datacenter support for modern distributed applications and microservices architectures. This integration enables querying and retrieving comprehensive information about your Consul infrastructure, configuration, and security policies.
| Category | Containers |
| Direction | Query source |
| Sign-in | ACL Token |
| Query languages | SQLite |
| Tables | 10 |
| Query templates | 41 |
| Website | consul.io |
Before you start
Huntbase signs in to Consul with ACL Token. Create the credential in Consul first, then keep it to hand for the Connect step.
- Create a read-only policy, for example
consul acl policy create -name "huntbase-read" -rules @rules.hcl, where the rules file grantsreadon the resources Huntbase should see, such asservice_prefix ""andnode_prefix "". - Create a token linked to that policy:
consul acl token create -description "Huntbase read-only" -policy-name huntbase-read. - Copy the SecretID from the output. That is the token. The AccessorID is only a public identifier.
Permissions:
readpolicy onservice_prefix ""andnode_prefix "", or narrower prefixes.
For the vendor's own instructions, see Consul ACL token create command.
Use a dedicated, read-only credential for Huntbase where the product allows it. Huntbase only needs to read.
Connect Consul
- Go to Connections and click New connection, or click New connection on the Consul product page.
- On Product, pick Consul and choose the Owner.
- On Details, give the connection a Name and, optionally, a Description.
- On Connect, fill in the settings and credentials described below.
- On Verify, review the summary and click Create & check.
For everything else on the setup page — saving a draft, I'll do this later, and what each check result means — see Connections.
Settings
Where your Consul lives:
| Field | Required | Notes |
|---|---|---|
| Address | Yes | The Consul HTTP API address, including scheme and port, such as http://consul.example.com:8500. |
| Namespace | No | Consul Enterprise only. Use * for all namespaces. Leave empty for the default namespace. |
| Partition | No | Consul Enterprise only. Leave empty for the default partition. |
Credentials
The only Method is ACL Token. Enter a Credential label (for example Production), then fill in:
| Field | Required | Notes |
|---|---|---|
| ACL Token | Yes | Only needed when ACLs are enabled on the Consul servers. Secret — not shown again after you save it. |
Query it
Once connected, Consul can serve these languages in a query tab, and Scout can use it when you ask in Auto:
| Language | Use it for |
|---|---|
| SQLite | SQL over the 10 tables listed below, alongside every other connected source. |
Example: SQLite
Show Consul key value details — Explore which key-value pairs are being used in Consul sessions.
select
key,
session,
namespace,
value
from
consul_key;
Consul ships with 41 query templates. Find them in Library › Queries — see Query templates.
Tables
Consul adds 10 tables. Browse their columns from Schema in the query bar's ⋯ menu.
All 10 tables
| Table | Contains |
|---|---|
consul_acl_auth_method | Retrieve information about your ACL auth methods. |
consul_acl_binding_rule | Retrieve information about your ACL binding rules. |
consul_acl_policy | Retrieve information about your ACL policies. |
consul_acl_role | Retrieve information about your ACL roles. |
consul_acl_token | Retrieve information about your ACL tokens. |
consul_intention | Retrieve information about your intentions. |
consul_key | Retrieve information about your keys. |
consul_namespace | Retrieve information about your namespaces. |
consul_node | Retrieve information about your nodes. |
consul_service | Retrieve information about your services. |
Next steps
- Connections — health, credentials and settings after you connect
- Query languages — syntax, parameters and time ranges
- Chatting with Scout — ask questions without writing a query
- All integrations — the rest of the catalog