SigNoz / signoz

SigNoz is an open-source observability platform native to OpenTelemetry with logs, traces and metrics in a single application. An open-source alternative to DataDog, NewRelic, etc. 🔥 🖥. 👉 Open source Application Performance Monitoring (APM) & Observability tool
https://signoz.io
Other
18.95k stars 1.24k forks source link

Ingesting Metrics from SQLServer #6196

Open amurilloc opened 1 week ago

amurilloc commented 1 week ago

Discussed in https://github.com/SigNoz/signoz/discussions/6189

Originally posted by **amurilloc** October 14, 2024 Hi, does anyone had any success importing metrics from SQLServer on Self Hosted? This is what my Otel Config looks like on the SQLServer machine. It has a local port mapped to the SigNoz instance inside a Linux VM: ``` receivers: sqlserver: collection_interval: 30s username: sa password: "*********" server: 127.0.0.1 port: 1433 exporters: debug: verbosity: detailed sampling_initial: 5 sampling_thereafter: 200 otlp: endpoint: "localhost:4317" tls: insecure: true service: telemetry: logs: level: INFO pipelines: metrics: receivers: [sqlserver] exporters: [otlp, debug] ``` Log exporter is showing it is sending the data to SigNoz (self-hosted inside a VM, port mapped to the host): ``` otelcol-contrib.exe --config sqlserver-metrics-collection-config.yaml 2024-10-14T18:40:24.544-0600 info service@v0.111.0/service.go:136 Setting up own telemetry... 2024-10-14T18:40:24.544-0600 info telemetry/metrics.go:70 Serving metrics {"address": "localhost:8888", "metrics level": "Normal"} 2024-10-14T18:40:24.545-0600 info builders/builders.go:26 Development component. May change in the future. {"kind": "exporter", "data_type": "metrics", "name": "debug"} 2024-10-14T18:40:24.546-0600 info service@v0.111.0/service.go:208 Starting otelcol-contrib... {"Version": "0.111.0", "NumCPU": 16} 2024-10-14T18:40:24.546-0600 info extensions/extensions.go:39 Starting extensions... 2024-10-14T18:40:24.784-0600 info service@v0.111.0/service.go:234 Everything is ready. Begin running and processing data. 2024-10-14T18:40:25.880-0600 info MetricsExporter {"kind": "exporter", "data_type": "metrics", "name": "debug", "resource metrics": 13, "metrics": 66, "data points": 67} 2024-10-14T18:40:25.880-0600 info ResourceMetrics #0 Resource SchemaURL: ScopeMetrics #0 ScopeMetrics SchemaURL: InstrumentationScope github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver 0.111.0 Metric #0 Descriptor: -> Name: sqlserver.page.buffer_cache.hit_ratio -> Description: Pages found in the buffer pool without having to read from disk. -> Unit: % -> DataType: Gauge NumberDataPoints #0 StartTimestamp: 2024-10-15 00:40:24.5460031 +0000 UTC Timestamp: 2024-10-15 00:40:25.8788183 +0000 UTC Value: 100.000000 ResourceMetrics #1 Resource SchemaURL: ScopeMetrics #0 ScopeMetrics SchemaURL: InstrumentationScope github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver 0.111.0 Metric #0 Descriptor: -> Name: sqlserver.user.connection.count -> Description: Number of users connected to the SQL Server. -> Unit: {connections} -> DataType: Gauge NumberDataPoints #0 StartTimestamp: 2024-10-15 00:40:24.5460031 +0000 UTC Timestamp: 2024-10-15 00:40:25.8788183 +0000 UTC Value: 4 ResourceMetrics #2 Resource SchemaURL: ScopeMetrics #0 ScopeMetrics SchemaURL: InstrumentationScope github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver 0.111.0 Metric #0 Descriptor: -> Name: sqlserver.lock.wait.rate -> Description: Number of lock requests resulting in a wait. -> Unit: {requests}/s -> DataType: Gauge NumberDataPoints #0 StartTimestamp: 2024-10-15 00:40:24.5460031 +0000 UTC Timestamp: 2024-10-15 00:40:25.8788183 +0000 UTC Value: 4.000000 ResourceMetrics #3 Resource SchemaURL: ScopeMetrics #0 ScopeMetrics SchemaURL: ``` However, I can't find any data in the clickhouse tables. Any guidance would be greatly appreciated. Update: Tested vs Cloud version and the ingestion works correctly. Only self hosted is not ingesting. ![image](https://github.com/user-attachments/assets/6e7c1847-86ee-4b79-bf2d-7699c080753a)
srikanthccv commented 1 week ago

If you don't see any error collector on the SQLServer machine, it is succesffuly exporting the data. Please check the logs of ClickHouse or Otel Collector of SigNoz installation.