Set up Elasticsearch or OpenSearch
Verbiqo reads the monitoring and metadata APIs and never a document. It needs a role that can monitor, and refuses one that can write. Elasticsearch 7.17 and later, and OpenSearch 2.0 and later.
At a glance
| Supported tasks | Review a cluster, sample it live, explain and rewrite a slow search, size it, and check upgrade readiness. Ask Elasticsearch or OpenSearch and Elasticsearch and OpenSearch checks. |
|---|---|
| Limitations | Cluster questions never read a document: only monitoring and metadata APIs (the cluster’s read-only status endpoints). Security and credential searches need log indices named on the connection. Without them, no log is searched. |
| Supported versions | Elasticsearch 7.17 and later. OpenSearch 2.0 and later, tested on 2.17 and 3.9. An older version still connects, and the test says it is older than Verbiqo supports. On OpenSearch, three named reports in the terminal are for Elasticsearch only: health-report, ilm-errors and snapshots. The review reads OpenSearch’s own lifecycle and snapshot policies instead. |
| Authentication | An API key (preferred), or a user and password. Optional: a private CA certificate, and a client certificate with an unprotected key. Verification: Full, Certificate or None (a lab only). |
| Minimum permissions | A monitoring role. Elasticsearch: cluster monitor, monitor_snapshot, read_ilm, read_slm. monitor and view_index_metadata on the indices. Commands: Elasticsearch role, OpenSearch role, Permission levels. |
| Connection test | Press Test Connection in Extensions… › Elasticsearch, or run verbiqo es test <name>. Success shows Connected., the product and version, the cluster name, its health, nodes and active shards, and the TLS in use. It then says the account cannot write or administer. |
| First useful question | Attach with /es <name>, then ask Review the cluster. Expect the cluster review: unassigned shards with the cluster’s own reason and fix, then disk, heap and rejections. Shard sizing, mappings, lifecycle, snapshots and settings follow, each finding with its evidence. |
| Safety controls |
|
| Operational limits | 15 seconds per request. A response over 25 MB is cut, and the answer says so. The model asks for up to six reads per question, besides Verbiqo’s own checks. A log search returns at most 200 documents and is bounded in time. Your organization can lower these under es: Protect your systems. |
Elasticsearch: the monitoring role
In Kibana (Stack Management › Roles) or Dev Tools, as an administrator:
PUT _security/role/verbiqo_monitor
{
"cluster": ["monitor", "monitor_snapshot", "read_ilm", "read_slm"],
"indices": [
{
"names": ["*"],
"privileges": ["monitor", "view_index_metadata"]
}
]
}
Then create an API key with that role (preferred over a password). Copy the encoded value from the result into API key on Verbiqo’s form:
POST _security/api_key
{
"name": "verbiqo",
"role_descriptors": {
"verbiqo_monitor": {
"cluster": ["monitor", "monitor_snapshot", "read_ilm", "read_slm"],
"indices": [
{
"names": ["*"],
"privileges": ["monitor", "view_index_metadata"]
}
]
}
}
}
OpenSearch: the monitoring role
In OpenSearch Dashboards (Security › Roles) or as an administrator:
PUT _plugins/_security/api/roles/verbiqo_monitor
{
"cluster_permissions": [
"cluster_monitor",
"cluster:admin/snapshot/get",
"cluster:admin/repository/get",
"cluster:admin/opendistro/ism/managedindex/explain",
"cluster:admin/opendistro/ism/policy/get",
"cluster:admin/opendistro/ism/policy/search",
"cluster:admin/opensearch/snapshot_management/policy/get",
"cluster:admin/opensearch/snapshot_management/policy/search",
"cluster:admin/opensearch/snapshot_management/policy/explain",
"cluster:admin/opensearch/insights/top_queries",
"indices:admin/index_template/get",
"indices:admin/template/get"
],
"index_permissions": [
{
"index_patterns": ["*"],
"allowed_actions": [
"indices_monitor",
"indices:admin/mappings/get",
"indices:admin/get",
"indices:admin/aliases/get",
"indices:admin/data_stream/get",
"indices:admin/resolve/index",
"indices:admin/validate/query",
"indices:data/read/field_caps"
]
}
]
}
PUT _plugins/_security/api/rolesmapping/verbiqo_monitor
{
"users": ["verbiqo_monitor"]
}
Create the user under Security › Internal users, or map the role to a backend role from your directory. On Amazon OpenSearch Service, map it to the user Verbiqo signs in as.
Add the connection
Open the form
Extensions… › Elasticsearch (OpenSearch too).
Address and sign-in
The URL of the HTTP endpoint (
https://es.example.com:9200. On Elastic Cloud, the Elasticsearch endpoint). API key, or User and password.Certificates
A private CA: choose its certificate. A cluster that asks for a client certificate: add it and its key. Then Verification, in Elastic’s own terms: Full (a trusted CA and the host name, the default), Certificate (a trusted CA, any name: for connecting by IP address to a certificate issued for host names), or None (a lab only).
Test, then save
Shows the product, version, health and TLS. An account that can write is refused here, with the privilege named.
Or from a terminal, the same connection, named logs:
verbiqo es add logs --url https://es.example.com:9200 --auth apikey --secret-stdin --ca /etc/ssl/company-ca.pem
verbiqo es test logs
Security logs (optional). Name log indices with --log-indices (or Log indices on the form) to let Verbiqo search them for security events and alerts with searches it builds itself: Security logs. Without it, no document is ever read.
The API key or password: --secret-stdin (piped in) or --secret-env VAR for scripts and CI. --auth basic --user U for a password. Client certificates: --cert client.pem --key client.key. Verification: --verification full|certificate|none (--no-verify is none). With an http:// URL nothing is encrypted, the API key or password included. The form says so and the test reports it.
Permission levels
| Level | Elasticsearch | OpenSearch | |
|---|---|---|---|
| 1. Monitor only | Cluster monitor | cluster_monitor, indices_monitor | Not enough: mappings, lifecycle and snapshots unreadable |
| 2. Monitoring role | The role above | The role above | Required: the whole review, live sample, timeline, query analysis |
| 3. Query profiling | Plus read on chosen indices | Plus read on chosen indices | Optional: profiles run with size: 0, no documents returned |
Refused: superuser, any manage or write privilege on any index pattern, run_as, restricted system indices. On OpenSearch, which does not let an account read its own permissions: all_access, *_full_access and other writing roles, security REST API access, and admin certificates. A custom OpenSearch role is reported as not verifiable. Either way Verbiqo sends only reads from a fixed list.
Settings that help
Why it helps: none of these is required. Each lets Verbiqo see one more thing, so turn on only what you need.
Ask What should I enable? Verbiqo lists each item as ready or not, with the request that turns it on.
| Item | Lets Verbiqo see |
|---|---|
| A monitoring role: cluster monitor, monitor_snapshot, read_ilm and read_slm; monitor and view_index_metadata on the indices | Everything in the review (Elasticsearch). |
| An OpenSearch monitoring role: cluster_monitor and the read-only lifecycle, snapshot and Query Insights permissions; indices_monitor and metadata reads on the indices | Everything in the review (OpenSearch). |
| Read on the indices whose queries you want profiled | Query profiles. |
| Search and indexing slow logs on | Past slow searches, analyzed: through Splunk, or the connection’s log indices where the slow log is shipped into the cluster. |
| A snapshot repository and a snapshot lifecycle (SLM) policy | Backups checked (Elasticsearch). |
| A snapshot repository and a Snapshot Management policy | Backups checked (OpenSearch). |
| Query Insights top queries on (OpenSearch 2.12 and later) | The slowest recent searches, each analyzed. |
Optional additions to the role, each for one more thing Verbiqo can see:
| Add | Lets Verbiqo see |
|---|---|
{ "names": ["logs-elasticsearch.slowlog-*"], "privileges": ["read", "view_index_metadata"] }, and that pattern in the connection’s Log indices | The slowest searches of a past period from the cluster’s own slow log, where the Elasticsearch integration ships it into the cluster. |
"monitor_ml" in the cluster privileges | Machine-learning jobs that failed or reached their memory limit, on clusters that run them. |
"cluster:admin/desired_balance/get" in the cluster privileges (8.6 and later) | Whether rebalancing is still under way and how many shards are left to move. A read: it does not make the account one that can change the cluster. |
{ "names": [".logs-deprecation.elasticsearch-default"], "privileges": ["read", "view_index_metadata"] }, and that name in Log indices | Upgrade readiness: the deprecated features clients use, and which will break on the next major version. |
Cross-cluster replication needs nothing more: the monitoring role reads its follower statistics.
Slow logs, per index or pattern:
PUT logs-*/_settings
{
"index.search.slowlog.threshold.query.warn": "2s",
"index.search.slowlog.threshold.query.info": "500ms",
"index.indexing.slowlog.threshold.index.warn": "2s"
}
Query Insights (OpenSearch):
PUT _cluster/settings
{
"persistent": {
"search.insights.top_queries.latency.enabled": true,
"search.insights.top_queries.latency.window_size": "10m",
"search.insights.top_queries.latency.top_n_size": 20
}
}
A nightly snapshot policy (Elasticsearch. OpenSearch uses POST _plugins/_sm/policies/nightly, which Verbiqo writes for you when it finds none):
PUT _slm/policy/nightly
{
"schedule": "0 30 1 * * ?",
"name": "<nightly-{now/d}>",
"repository": "<repository>",
"config": {
"indices": ["*"]
},
"retention": {
"expire_after": "30d",
"min_count": 5,
"max_count": 50
}
}
Next: Ask Elasticsearch or OpenSearch.
Common errors
The test shows the message, and often a line under it saying what to change. Find the message here.
| Message or symptom | Likely cause | What to do | Needs an administrator? |
|---|---|---|---|
| The cluster refused the credentials (401). | The API key or password is wrong, expired or revoked. | Check the API key, or the user and password. Paste the encoded value of a new key. | Yes, if an administrator issued the key. |
| … can change the cluster or its data (…), so Verbiqo will not use it. | The account holds a write or manage privilege, or is superuser. The message names the privilege. | Create the monitoring role and a key for it, then test again. | Yes: creating roles needs a security administrator. |
| The account has no privilege to monitor this cluster. | The account lacks the monitoring privileges. | Give it the monitoring role from Set up. | Yes. |
| Could not reach … with The server’s certificate is not trusted | The cluster uses a private or self-signed certificate (one no trusted authority signed). | Choose the CA certificate on the connection, or name it in Settings › Trusted CA. Use None only in a lab. | Only to obtain the CA file. |
| The certificate does not name … | You connect by an address the certificate was not issued for, such as an IP address. | Connect by the host name on the certificate, or choose verification Certificate. | No. |
| No answer from … within 15 s. | The cluster is overloaded, or a firewall drops the traffic. | Check the URL and port of the HTTP endpoint. Try again when the cluster is less busy. | Only if a firewall blocks you. |
| GET /… is not on the list of requests Verbiqo sends. | A request read documents or was not a monitoring read. verbiqo es request shows this. | Ask for a monitoring or metadata API instead, such as _cat, _cluster or _nodes. | No. |
| This version is older than Verbiqo supports. | Elasticsearch below 7.17, or OpenSearch below 2.0. | Upgrade to a supported version. Ask Can we upgrade? for the supported path. | Yes, to upgrade the cluster. |