Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 30 additions & 17 deletions docs/configuration/holmesgpt/toolsets/grafanatempo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ You can find the Grafana URL required for Tempo in your Grafana cloud account se
:width: 600
:align: center


Obtaining the datasource UID
-----------------------

Expand All @@ -37,34 +36,30 @@ A simple way to get the datasource UID is to access the Grafana API by running t

# port forward if you are using Robusta's grafana from your kubernetes cluster
kubectl port-forward svc/robusta-grafana 3000:80

# List the loki data sources
curl -s -u <username>:<password> http://localhost:3000/api/datasources | jq '.[] | select(.type == "loki")'
# List the Tempo data sources
curl -s -u <username>:<password> http://localhost:3000/api/datasources | jq '.[] | select(.type == "tempo")'
{
"id": 2,
"id": 3,
"uid": "klja8hsa-8a9c-4b35-1230-7baab22b02ee",
"orgId": 1,
"name": "Tempo-kubernetes",
"name": "Tempo",
"type": "tempo",
"typeName": "Tempo",
"typeLogoUrl": "/public/app/plugins/datasource/tempo/img/tempo_icon.svg",
"access": "proxy",
"url": "http://tempo.tempo:3100",
"url": "http://tempo-query-frontend.tempo:3100",
"user": "",
"database": "",
"basicAuth": false,
"isDefault": false,
"jsonData": {
"httpHeaderName1": "admin",
"httpHeaderName2": "X-Scope-OrgID",
"tlsSkipVerify": true
},
"readOnly": false
}
# In this case, there is a single Tempo datasourceUID
# with UID "klja8hsa-8a9c-4b35-1230-7baab22b02ee"


Configuration
^^^^^^^^^^^^^

Expand All @@ -80,8 +75,14 @@ Configuration
enabled: true
config:
api_key: <your grafana API key>
url: https://grafana-url
grafana_datasource_uid: <the UID of the tempo data source in Grafana>
url: <your grafana url> # e.g. https://acme-corp.grafana.net
grafana_datasource_uid: <the UID of the loki data source in Grafana>
labels:
pod: "k8s.pod.name"
namespace: "k8s.namespace.name"
deployment: "k8s.deployment.name"
node: "k8s.node.name"
service: "service.name"

.. include:: ./_toolset_configuration.inc.rst

Expand All @@ -97,14 +98,26 @@ Configuration
config:
api_key: <your grafana service account token>
url: <your grafana url> # e.g. https://acme-corp.grafana.net
grafana_datasource_uid: <the UID of the tempo data source in Grafana>
grafana_datasource_uid: <the UID of the loki data source in Grafana>
labels:
pod: "k8s.pod.name"
namespace: "k8s.namespace.name"
deployment: "k8s.deployment.name"
node: "k8s.node.name"
service: "service.name"

To test, run:

.. code-block:: yaml

holmes ask "The payments DB is very slow, check tempo for any trace data"

**Search labels**

You can tweak the labels used by the toolset to identify kubernetes resources. This is only needed if the trace
labels differ from the defaults in the example above.


Capabilities
^^^^^^^^^^^^
.. include:: ./_toolset_capabilities.inc.rst
Expand All @@ -115,9 +128,9 @@ Capabilities

* - Tool Name
- Description
* - list_all_datasources
- Fetches All the data sources in Grafana
* - fetch_tempo_traces_by_min_duration
- Lists Tempo traces ids that exceed a specified minimum duration in a given time range
* - fetch_tempo_tags
- List the tags available in Tempo
* - fetch_tempo_traces
- Lists Tempo traces. At least one of `service_name`, `pod_name` or `deployment_name` argument is required.
* - fetch_tempo_trace_by_id
- Retrieves detailed information about a Tempo trace using its trace ID. Use this to investigate a trace.
Loading