Grafana Cloud

Use Knowledge Graph mode

Use Knowledge Graph mode to troubleshoot entity relationships, diagnose connectivity issues, and manage custom rules for your knowledge graph configuration. This mode helps you understand why entities connect the way they do and guides you through creating custom insights and entity types based on your infrastructure.

What is the knowledge graph?

The Grafana Cloud Knowledge Graph discovers services, infrastructure, and their relationships from telemetry you’re already sending to Grafana Cloud. It’s included in every stack. It generates insights for saturation, errors, anomalies, and failures.

The knowledge graph powers features you may already use, including the entity catalog, entity graph, and RCA workbench. Knowledge Graph mode in Grafana Assistant gives you a natural language interface to work with these features. You can troubleshoot entity connections, create custom entities and insights, and manage configuration without navigating through settings pages.

What you’ll achieve

  • Troubleshoot missing or unexpected entity connections.
  • Understand how connection types between entities are built.
  • Create custom alert rules and insights based on your metrics.
  • Propose and apply configuration changes to entity definitions, custom rules, and recording rules.
  • Tune insight thresholds and suppress insights that aren’t useful.
  • Open an entity graph that shows the entities and relationships you ask about.
  • Get answers about knowledge graph configuration details.

Before you begin

  • Set up and Get started with Grafana Assistant.
  • The knowledge graph is included in your Grafana Cloud stack. If Entity catalog is empty, refer to Get started with the knowledge graph.
  • To change thresholds or suppression rules, you need the Editor or Admin role, or the grafana-asserts-app.rules:write permission. The grafana-asserts-app.config:write permission alone isn’t enough.

Understand when to use Knowledge Graph mode

Knowledge Graph mode differs from the Root Cause Analysis (RCA) assistant and other modes in its focus area:

  • Knowledge Graph mode: Troubleshoot entity modeling, configuration, custom insights, rule management, and integration setup. Uses embedded knowledge about connection types and configuration files.
  • RCA assistant: Investigate incidents using data from the RCA workbench page. Focused on analyzing existing data to determine root causes.
  • Investigation mode: Launch an investigation across metrics, logs, traces, and profiles for complex incidents.

Choose Knowledge Graph mode when working with entity relationships, connections, or knowledge graph configuration rather than investigating specific incidents.

Access Knowledge Graph mode

Knowledge Graph mode is accessible from anywhere in Grafana, not only from knowledge graph features.

  1. Open Assistant from the sidebar.
  2. Select Knowledge Graph from the mode selector, at the same level as other modes like Investigation and Learn.
  3. Start asking questions about your entity configuration.

Troubleshoot entity connections

Ask why entities are or are not connected in specific ways. The Assistant analyzes your configuration and explains the connection rules.

Diagnose missing connections

Query why expected connections don’t appear in your entity graph.

Why is the card DB not connected in the entity graph?

Why don’t I see calls per second between the checkout service and payment service?

Understand existing connections

Learn what type of connection exists and what it measures.

What connection type exists between the email service and the database?

The entities are connected with “routes”, which only measure bytes and not calls. Why is that?

Identify missing metrics

Discover why certain metrics are absent between services.

Why am I only seeing Level 4 network flow measuring bytes instead of calls per second?

The mode explains that your entities may be connected using connection types that only track specific metrics, and suggests alternative configurations if needed.

Create custom insights and rules

Generate custom alert rules based on your existing metrics. The Assistant proposes rules that identify the correct service, namespace, and cluster labels.

Request a custom insight

Describe the insight you want to track, and the Assistant generates the appropriate rule.

Create a custom insight to track changes in the email service version.

Set up an alert that fires when the checkout service restarts more than 3 times in 5 minutes.

The Assistant:

  1. Analyzes your metrics to find the appropriate labels.
  2. Generates a rule with correct service identification, namespace, and cluster context.
  3. Proposes the rule as an alert that will be converted into an insight.

Review and apply rules

After the Assistant proposes a rule, review the configuration.

Show me the complete rule definition.

Before the Assistant presents a model or recording rule, it checks the rule against your knowledge graph. This check doesn’t save anything. If the rule is invalid, the Assistant reports the errors from the knowledge graph. The check isn’t available for relabel rules.

If the rule looks correct, confirm to apply it:

Apply this rule to my environment.

The rule is applied to your current stack and becomes visible after you refresh the Knowledge Graph page.

Tune thresholds and suppress insights

Ask the Assistant to inspect or change the conditions that raise insights. Each change asks for your approval before it’s saved, and the Assistant reads the rule back afterward to confirm the result. These changes affect when insights appear in the knowledge graph. They don’t change your alert notifications.

Manage insight thresholds

Thresholds set when request, resource, and health insights fire. Ask the Assistant to list them, show how a threshold applies in each scope, or change one.

List the resource thresholds for the checkout service.

Raise the request error threshold for the payment service in production.

The Assistant shows the existing and proposed expression, and the scope it applies to, before you approve a change. You can also add a new health alert, override a built-in health threshold with a custom one, or reset a threshold you customized. Resetting a threshold removes only your custom rule, so any built-in default applies again if one exists. Changing the labels that identify a rule’s scope creates a separate rule instead of moving the old one.

Suppress insights

A suppression rule excludes matching insights from the entity graph and the RCA workbench. It doesn’t change when the insight fires, and it doesn’t mute notifications. Ask the Assistant to list, inspect, create, update, or delete suppression rules for request, resource, and health insights.

Show the health insight suppression rules.

Suppress the high error ratio insight for the staging environment.

Each rule needs a name that’s unique across all categories, and matchers that include alertname or asserts_slo_name. Matcher values use glob patterns. The Assistant shows the full matcher scope before you approve. Updating a rule replaces all its matchers, so the Assistant keeps the matchers you didn’t ask to change. Deleting a rule lifts only that suppression. You can edit and delete rules that Terraform manages, as in the Knowledge Graph app.

Open an entity graph

Ask the Assistant to build an entity graph that shows specific entities and the relationships between them. This works in Knowledge Graph mode, Learn mode, and standard Assistant chat. The Assistant discovers the relationships on your stack, searches for the entities you name, and opens the matching graph with the same filters, scopes, and time range.

Show the checkout service, the pods it runs on, and their nodes in the entity graph.

Open a graph of the payment service and the databases it depends on in production.

The Assistant doesn’t save a view. If a requested relationship doesn’t exist on your stack, the Assistant tells you which layer is missing instead of adding unrelated entities.

If a search matches more than 50 entities, the Assistant shows the first 50, the total count, and a breakdown by type and scope. When the search reached the backend limit, the count reads “at least” that number. A note explains how to narrow the search. The Assistant doesn’t show connections for a partial result, because they could point to entities it left out. Name a service, namespace, or environment to narrow it.

Understand configuration details

Knowledge Graph mode helps you explore configuration details and understand how specific features and labels work.

Query label configuration

Ask how labels populate configuration fields.

How are labels used to populate the label version configuration?

Show me the relabel rule configuration for the email service.

Learn about connection types

Understand how different connection types are defined and what metrics they use.

What metrics does the “routes” connection type measure?

Explain how service-to-service connection types are determined.

Work with configuration changes

The mode can propose changes to multiple types of configuration files:

  • Custom rules: Alert rules that create insights when triggered.
  • Recording rules: Precomputed metrics for faster queries.
  • Entity definitions: How services and infrastructure components are identified.

Propose configuration changes

Request modifications to your configuration.

Update the entity definition for the payment service to include the staging namespace.

Create a recording rule for 95th percentile latency by service.

Review before applying

Always review proposed changes before applying them to your environment. The Assistant shows you the complete configuration diff so you can verify the changes.

Follow best practices

Follow these practices to get the most from Knowledge Graph mode:

  • Be specific about services: Mention exact service names and namespaces when asking about connections.
  • Include timeframes: When tracking changes or metrics, specify the time window.
  • Review rules carefully: Custom rules affect your alerting and insights, so verify the labels and thresholds before applying.
  • Iterate on configurations: Start with a basic rule, then refine based on the results.
  • Use existing metrics: Reference metrics that already exist in your environment for faster, more accurate results.

Next steps