Migrate Metrics from LGTM Stack

Migrating metrics from Prometheus/Mimir to SigNoz can be accomplished through several approaches, depending on your current setup and requirements.

Using Prometheus Receiver in OpenTelemetry Collector

The simplest way to migrate your existing Prometheus/Mimir metrics is to configure the OpenTelemetry Collector with a Prometheus Receiver. This allows you to continue using your existing Prometheus exporters while sending the data to SigNoz.

  1. Install the OpenTelemetry Collector in your environment if not already available.
  2. Configure the Prometheus Receiver in your OpenTelemetry Collector configuration file:

Replacing Prometheus Exporters with Native OpenTelemetry Receivers

While the Prometheus Receiver allows you to continue using your existing Prometheus exporters, OpenTelemetry offers native receivers for many common systems and services. These provide a more direct integration with the OpenTelemetry ecosystem.

Here are some common Prometheus exporters and their OpenTelemetry equivalents:

Prometheus ExporterOpenTelemetry ReceiverDescription
node_exporterhostmetricsCollects system metrics (CPU, memory, disk, network)
mysqld_exportermysqldCollects MySQL server metrics
redis_exporterredisCollects Redis metrics
mongodb_exportermongodbCollects MongoDB metrics
postgres_exporterpostgresqlCollects PostgreSQL metrics
kafka_exporterkafkaCollects Kafka metrics
nginx_exporternginxCollects NGINX metrics

SigNoz supports all the receivers that are listed in the OpenTelemetry Registry. To configure a new metric receiver, follow these instructions for Self-Hosted SigNoz or SigNoz Cloud.

Switching to OTLP Metrics

For new applications or when you're ready to transition away from Prometheus exporters, you can use OpenTelemetry Protocol (OTLP) metrics directly.

  1. Instrument your applications with the OpenTelemetry SDK for your programming language.
  2. Configure the OTLP Exporter to send metrics to SigNoz, for example if you are using Python:
from opentelemetry import metrics
from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import OTLPMetricExporter
from opentelemetry.sdk.metrics import MeterProvider
from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader
from opentelemetry.sdk.resources import SERVICE_NAME, Resource

# Service name is required for most backends
resource = Resource(attributes={
    SERVICE_NAME: "your-service-name"
})

reader = PeriodicExportingMetricReader(
    OTLPMetricExporter(endpoint="http://<IP of your Backend>:4317")
)
provider = MeterProvider(resource=resource, metric_readers=[reader])
metrics.set_meter_provider(provider)

To confirm that the metrics are being sent to SigNoz, you can use the Metrics Explorer in SigNoz. To navigate to Metrics Explorer, simply click Metrics on the left sidebar.

The Metrics Explorer page will allow you to easily query metrics using built-in visual query builder. This will enable you to verify that the metrics are being sent correctly to SigNoz, including visualizing them, seeing their descriptions, types, and more.

Metrics Explorer in SigNoz
A query in SigNoz Metrics Explorer

Was this page helpful?