-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
snmpreceiver does not allow adding sysName.0 as attribute to polled metrics #23373
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
@StefanKurek, this seems reasonable to me. Any reservations about this change? |
@djaglowski the suggestion seems like a reasonable one. There would most likely be some significant changes under the hood as currently only indexed OIDs (for both attributes and resource attributes) can be matched to indexed metrics (metrics that use indexed OIDs). This would need to be modified pretty significantly (most likely) so that resource attributes and attributes could be differentiated in the configs from being indexed or scalar based. Then we could have another path so that indexed metrics could make a connection to single value attributes or resource attributes. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
…ave scalar OID attributes (#25174) **Description:** <Describe what has changed.> - Added a new scalar_oid field to ResourceAttribtueConfigs to allow Scalar OIDs to be used as resource attributes (on Column OID metrics) - Added support for (Scalar OID only) resource attributes on Scalar OID metrics as well. **Link to tracking Issue:** #23373 **Testing:** - Valid and invalid configs using a scalar_oid resource attribute on both scalar and column oid metrics - Adding indexed metrics to resources with scalar_oid resource attributes - Adding scalar metrics to resources with scalar_oid resource attributes **Documentation:** <Describe the documentation added.> - Description of new scalar_oid field in ResourceAttributeConfig and comments on new functions - Description of new ResourceAttributes field on Scalar OID metrics
Closed by #25174 |
Component(s)
receiver/snmp
What happened?
Description
to able to work with polled metrics, I need to add the polled endpoint to the metrics as an attribute so that I can break the metrics down by the polled target. The best way would be to add the sysName.0 of the correspondent target endpoint to the metrics that are polled.
Steps to Reproduce
set up a snmp demon (net-snmp for example). compile otel with snmpreceiver, use the otel config below.
Expected Result
the string saved in sysName.0 need to be shipped with the metrics.
Actual Result
2023-06-14T13:51:51.708+0200 info service/telemetry.go:104 Setting up own telemetry...
2023-06-14T13:51:51.710+0200 info service/telemetry.go:127 Serving Prometheus metrics {"address": ":8888", "level": "Basic"}
2023-06-14T13:51:51.711+0200 info [email protected]/exporter.go:275 Development component. May change in the future. {"kind": "exporter", "data_type": "metrics", "name": "logging"}
2023-06-14T13:51:51.712+0200 info [email protected]/memorylimiter.go:102 Memory limiter configured {"kind": "processor", "name": "memory_limiter", "pipeline": "metrics", "limit_mib": 1536, "spike_limit_mib": 512, "check_interval": 5}
2023-06-14T13:51:51.714+0200 info service/service.go:131 Starting otelcol... {"Version": "0.79.0-dev", "NumCPU": 5}
2023-06-14T13:51:51.714+0200 info extensions/extensions.go:30 Starting extensions...
2023-06-14T13:51:51.714+0200 info extensions/extensions.go:33 Extension is starting... {"kind": "extension", "name": "memory_ballast"}
2023-06-14T13:51:51.722+0200 info [email protected]/memory_ballast.go:41 Setting memory ballast {"kind": "extension", "name": "memory_ballast", "MiBs": 512}
2023-06-14T13:51:51.722+0200 info extensions/extensions.go:37 Extension started. {"kind": "extension", "name": "memory_ballast"}
2023-06-14T13:51:51.722+0200 info extensions/extensions.go:33 Extension is starting... {"kind": "extension", "name": "zpages"}
2023-06-14T13:51:51.722+0200 info [email protected]/zpagesextension.go:53 Registered zPages span processor on tracer provider {"kind": "extension", "name": "zpages"}
2023-06-14T13:51:51.722+0200 info [email protected]/zpagesextension.go:63 Registered Host's zPages {"kind": "extension", "name": "zpages"}
2023-06-14T13:51:51.723+0200 info [email protected]/zpagesextension.go:75 Starting zPages extension {"kind": "extension", "name": "zpages", "config": {"TCPAddr":{"Endpoint":"0.0.0.0:55679"}}}
2023-06-14T13:51:51.723+0200 info extensions/extensions.go:37 Extension started. {"kind": "extension", "name": "zpages"}
2023-06-14T13:51:51.723+0200 info service/service.go:148 Everything is ready. Begin running and processing data.
2023-06-14T13:51:51.727+0200 error scraperhelper/scrapercontroller.go:213 Error scraping metrics {"kind": "receiver", "name": "snmp", "data_type": "metrics", "error": "problem processing indexed metric data for OID '.1.3.6.1.2.1.2.2.1.16.1' from column OID '.1.3.6.1.2.1.2.2.1.16': not creating indexed metric 'ifOutOctets' or resource: related resource attribute value is blank; problem processing indexed metric data for OID '.1.3.6.1.2.1.2.2.1.16.2' from column OID '.1.3.6.1.2.1.2.2.1.16': not creating indexed metric 'ifOutOctets' or resource: related resource attribute value is blank; problem processing indexed metric data for OID '.1.3.6.1.2.1.2.2.1.10.1' from column OID '.1.3.6.1.2.1.2.2.1.10': not creating indexed metric 'ifInOctets' or resource: related resource attribute value is blank; problem processing indexed metric data for OID '.1.3.6.1.2.1.2.2.1.10.2' from column OID '.1.3.6.1.2.1.2.2.1.10': not creating indexed metric 'ifInOctets' or resource: related resource attribute value is blank", "scraper": "snmp"}
go.opentelemetry.io/collector/receiver/scraperhelper.(*controller).scrapeMetricsAndReport
go.opentelemetry.io/collector/[email protected]/scraperhelper/scrapercontroller.go:213
go.opentelemetry.io/collector/receiver/scraperhelper.(*controller).startScraping.func1
go.opentelemetry.io/collector/[email protected]/scraperhelper/scrapercontroller.go:188
^C2023-06-14T13:51:53.446+0200 info otelcol/collector.go:227 Received signal from OS {"signal": "interrupt"}
2023-06-14T13:51:53.446+0200 info service/service.go:157 Starting shutdown...
2023-06-14T13:51:53.446+0200 info extensions/extensions.go:44 Stopping extensions...
2023-06-14T13:51:53.447+0200 info [email protected]/zpagesextension.go:98 Unregistered zPages span processor on tracer provider {"kind": "extension", "name": "zpages"}
2023-06-14T13:51:53.447+0200 info service/service.go:171 Shutdown complete.
Collector version
0.7.9
Environment information
Environment
OS:
root@eiffel:/opt/osotel# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy
Compiler(if manually compiled): (e.g., "go 14.2")
root@eiffel:/opt/osotel# go version
go version go1.20.5 linux/amd64
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: