Skip to content

Grafana Dashboards

Tayra ships pre-built Grafana dashboard templates and Prometheus alerting rules in the dashboards/ directory. Zero code required -- just import into Grafana and connect to your Prometheus data source.

Dashboard Panels

The Tayra dashboard is organized into five rows, each focusing on a different operational area.

Overview

High-level counters and gauges for at-a-glance health monitoring:

PanelTypeMetric(s)
Total EncryptionsStattayra_encrypt_count_total
Total DecryptionsStattayra_decrypt_count_total
Cache Hit RatioGaugetayra_cache_hits_total / (tayra_cache_hits_total + tayra_cache_misses_total)
Keys CreatedStattayra_keys_created_total
Keys DeletedStattayra_keys_deleted_total
Keys ExpiredStattayra_keys_expired_total

Throughput

Time series panels for encryption and decryption performance:

PanelTypeMetric(s)
Encrypt/Decrypt RateTime seriesrate(tayra_encrypt_count_total[5m]), rate(tayra_decrypt_count_total[5m])
Encrypt Latency PercentilesTime seriestayra_encrypt_duration p50, p95, p99
Decrypt Latency PercentilesTime seriestayra_decrypt_duration p50, p95, p99

Key Store

Key store operation latency and cache effectiveness:

PanelTypeMetric(s)
Key Store Latency PercentilesTime seriestayra_keystore_duration p50, p95, p99
Cache Hits vs MissesTime seriesrate(tayra_cache_hits_total[5m]), rate(tayra_cache_misses_total[5m])

Key Lifecycle

Key management events over time:

PanelTypeMetric(s)
Key Creation EventsTime seriesrate(tayra_keys_created_total[5m])
Key Deletion EventsTime seriesrate(tayra_keys_deleted_total[5m])
Key Expiry EventsTime seriesrate(tayra_keys_expired_total[5m])
Cache Hit Ratio TrendTime seriestayra_cache_hits_total / (tayra_cache_hits_total + tayra_cache_misses_total)

GDPR Compliance

Panels tracking GDPR-related operations:

PanelTypeMetric(s)
Access Reports GeneratedStat / Time seriestayra_access_reports_total
Breach AssessmentsStat / Time seriestayra_breach_assessments_total
Migration Rows EncryptedStat / Time seriestayra_migration_rows_encrypted_total
Blind Indexes RecomputedStat / Time seriestayra_blind_index_recomputed_total

Installation

1. Export Tayra Metrics to Prometheus

Configure the OpenTelemetry SDK to export Tayra metrics to Prometheus:

csharp
using OpenTelemetry.Metrics;

builder.Services.AddOpenTelemetry()
    .WithMetrics(metrics => metrics
        .AddMeter("Tayra")
        .AddPrometheusExporter());

// Expose the /metrics endpoint for Prometheus scraping
app.MapPrometheusScrapingEndpoint();

Alternatively, use the OTLP exporter to push metrics to a Prometheus-compatible backend (e.g., Grafana Mimir, Thanos):

csharp
builder.Services.AddOpenTelemetry()
    .WithMetrics(metrics => metrics
        .AddMeter("Tayra")
        .AddOtlpExporter());

2. Import the Dashboard

  1. Open your Grafana instance
  2. Navigate to Dashboards > Import
  3. Click Upload JSON file and select dashboards/grafana/tayra-dashboard.json
  4. Select your Prometheus data source from the dropdown
  5. Click Import

The dashboard will appear with all five rows of panels pre-configured.

3. Verify Data

After importing, confirm that metrics are flowing by checking the Overview row. The stat panels should show non-zero values once your application has processed some encryption or decryption operations.

Prometheus Alerting Rules

Tayra includes a set of production-ready alerting rules at dashboards/prometheus/tayra-alerting-rules.yml. Copy or include this file in your Prometheus configuration.

Alert Definitions

AlertSeverityConditionDescription
TayraHighEncryptionErrorRatecriticalError rate > 5% for 5 minutesA significant percentage of encryption operations are failing. Investigate key store connectivity and key availability.
TayraKeyStoreLatencyWarningwarningp95 latency > 200msKey store operations are slower than expected. Check database connection pooling and network latency.
TayraKeyStoreLatencyCriticalcriticalp99 latency > 1000msKey store operations are critically slow. Immediate investigation required.
TayraLowCacheHitRatioWarningwarningCache hit ratio < 80%Cache effectiveness is degraded. Consider increasing KeyCacheDuration in TayraOptions.
TayraLowCacheHitRatioCriticalcriticalCache hit ratio < 50%Cache is severely underperforming. Check for high key churn or misconfigured cache settings.
TayraHighKeyExpiryRatewarningKey expiry rate unusually highAn unexpected number of keys are expiring. Review retention policies and TTL settings.
TayraKeyDeletionSpikewarningKey deletion rate spike detectedA sudden increase in key deletions may indicate a bulk crypto-shredding operation or an incident.
TayraBreachAssessmentTriggeredcriticaltayra_breach_assessments_total increasesA breach impact assessment has been triggered. Follow your incident response procedure.

Installing Alerting Rules

Add the alerting rules file to your Prometheus configuration:

yaml
# prometheus.yml
rule_files:
  - "dashboards/prometheus/tayra-alerting-rules.yml"

Then reload Prometheus:

bash
# Send SIGHUP to Prometheus
kill -HUP $(pidof prometheus)

# Or use the reload endpoint (if --web.enable-lifecycle is set)
curl -X POST http://localhost:9090/-/reload

Full OpenTelemetry Setup Example

For a complete setup exporting both traces and metrics:

csharp
using OpenTelemetry.Metrics;
using OpenTelemetry.Trace;

builder.Services.AddOpenTelemetry()
    .WithTracing(tracing => tracing
        .AddSource("Tayra")
        .AddOtlpExporter())
    .WithMetrics(metrics => metrics
        .AddMeter("Tayra")
        .AddPrometheusExporter());

// Expose the Prometheus scrape endpoint
app.MapPrometheusScrapingEndpoint();

This configuration:

  • Exports distributed traces via OTLP (for Jaeger, Grafana Tempo, etc.)
  • Exposes a /metrics endpoint for Prometheus to scrape
  • Feeds all the data needed by the Tayra Grafana dashboard and alerting rules

See Also