Grafana Cloud

Note

Knowledge Graph mode is currently in public preview. Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.

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 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.
  • Get answers about knowledge graph configuration details.

Before you begin

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 multi-agent analysis 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.

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.

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