-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
System.ArgumentNullException: Value cannot be null. (Parameter 'source') #2432
Comments
Thank you for opening an issue! We rely on the community to maintain Promitor. (Learn more) Is this something you want to contribute? |
FYI: This same config file seems to be working perfectly fine with promitor verion 2.9.x |
Are you willing to contribute a fix? |
From the error message, it seems that the error is coming from the following file : src/Promitor.Core.Scraping/ResourceTypes/AzureMessagingScraper.cs
We can include a null check in this function. Something like :
|
Are you willing to contribute a fix? |
Same error here but for Azure Service Bus metrics
|
any update on this ? |
Nope, waiting for contributions to fix this. Are you willing to contribute a fix? |
Report
I am trying to use promitor version 2.11.x with the following value file :
`azureAuthentication:
identity:
binding: -identity
id: xxxx
mode: UserAssignedManagedIdentity
azureMetadata:
subscriptionId: xx
tenantId: xx
metricDefaults:
aggregation:
interval: "00:02:00"
scraping:
schedule: "0 */2 * ? * *"
metrics:
aggregation:
type: Average
metricName: Size
description: Size of topic
name: promitor_azure_service_bus_topic_size
resourceType: ServiceBusNamespace
resources:
topicName: recordstopic
resourceGroupName: DataPartition-rg--dp1-xhgyrm
topicName: recordstopic
resourceGroupName: DataPartition-rg--dp2-xhgyrm
However it is failing to scrape the metric. The follow is the error message found on looking into kubectl logs :
Failed to scrape resource for metric 'demo_queue_size'System.ArgumentNullException: Value cannot be null. (Parameter 'source')
at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Linq.Enumerable.Any[TSource](IEnumerable
1 source) at Promitor.Core.Scraping.ResourceTypes.AzureMessagingScraper
1.<>c.b__2_0(MeasuredMetric metricValue) in /src/Promitor.Core.Scraping/AzureMessagingScraper.cs:line 22at System.Linq.Enumerable.WhereListIterator
1.MoveNext() at Promitor.Core.Scraping.ResourceTypes.AzureMessagingScraper
1.EnrichMeasuredMetrics(TResourceDefinition resourceDefinition, List1 dimensionNames, List
1 metricValues) in /src/Promitor.Core.Scraping/AzureMessagingScraper.cs:line 22at Promitor.Core.Scraping.AzureMonitorScraper
1.ScrapeResourceAsync(String subscriptionId, ScrapeDefinition
1 scrapeDefinition, TResourceDefinition resourceDefinition, AggregationType aggregationType, TimeSpan aggregationInterval) in /src/Promitor.Core.Scraping/AzureMonitorScraper.cs:line 71at Promitor.Core.Scraping.Scraper
1.ScrapeAsync(ScrapeDefinition
1 scrapeDefinition) in /src/Promitor.Core.Scraping/Scraper.cs:line 79has context menu`
Is there any work around to this issue? Am I missing anything in the values file?
I am prepared the values file according to the latest documentation of Promitor.
Expected Behavior
It should be able to scrape the required metrics.
Actual Behavior
However it is failing to scrape the metric. The follow is the error message found on looking into kubectl logs :
Failed to scrape resource for metric 'demo_queue_size' System.ArgumentNullException: Value cannot be null. (Parameter 'source') at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) at System.Linq.Enumerable.Any[TSource](IEnumerable
1 source)at Promitor.Core.Scraping.ResourceTypes.AzureMessagingScraper
1.<>c.<EnrichMeasuredMetrics>b__2_0(MeasuredMetric metricValue) in /src/Promitor.Core.Scraping/AzureMessagingScraper.cs:line 22 at System.Linq.Enumerable.WhereListIterator
1.MoveNext()at Promitor.Core.Scraping.ResourceTypes.AzureMessagingScraper
1.EnrichMeasuredMetrics(TResourceDefinition resourceDefinition, List
1 dimensionNames, List1 metricValues) in /src/Promitor.Core.Scraping/AzureMessagingScraper.cs:line 22 at Promitor.Core.Scraping.AzureMonitorScraper
1.ScrapeResourceAsync(String subscriptionId, ScrapeDefinition1 scrapeDefinition, TResourceDefinition resourceDefinition, AggregationType aggregationType, TimeSpan aggregationInterval) in /src/Promitor.Core.Scraping/AzureMonitorScraper.cs:line 71 at Promitor.Core.Scraping.Scraper
1.ScrapeAsync(ScrapeDefinition1 scrapeDefinition) in /src/Promitor.Core.Scraping/Scraper.cs:line 79 has context menu
Steps to Reproduce the Problem
...
Component
Scraper
Version
2.11.x
Configuration
azureAuthentication:
identity:
binding: -identity
id: xxxx
mode: UserAssignedManagedIdentity
azureMetadata:
subscriptionId: xx
tenantId: xx
metricDefaults:
aggregation:
interval: "00:02:00"
scraping:
schedule: "0 */2 * ? * *"
metrics:
aggregation:
type: Average
metricName: Size
description: Size of topic
name: promitor_azure_service_bus_topic_size
resourceType: ServiceBusNamespace
resources:
topicName: recordstopic
resourceGroupName: DataPartition-rg--dp1-xhgyrm
topicName: recordstopic
resourceGroupName: DataPartition-rg--dp2-xhgyrm
Logs
However it is failing to scrape the metric. The follow is the error message found on looking into kubectl logs :
Failed to scrape resource for metric 'demo_queue_size' System.ArgumentNullException: Value cannot be null. (Parameter 'source') at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) at System.Linq.Enumerable.Any[TSource](IEnumerable
1 source)at Promitor.Core.Scraping.ResourceTypes.AzureMessagingScraper
1.<>c.<EnrichMeasuredMetrics>b__2_0(MeasuredMetric metricValue) in /src/Promitor.Core.Scraping/AzureMessagingScraper.cs:line 22 at System.Linq.Enumerable.WhereListIterator
1.MoveNext()at Promitor.Core.Scraping.ResourceTypes.AzureMessagingScraper
1.EnrichMeasuredMetrics(TResourceDefinition resourceDefinition, List
1 dimensionNames, List1 metricValues) in /src/Promitor.Core.Scraping/AzureMessagingScraper.cs:line 22 at Promitor.Core.Scraping.AzureMonitorScraper
1.ScrapeResourceAsync(String subscriptionId, ScrapeDefinition1 scrapeDefinition, TResourceDefinition resourceDefinition, AggregationType aggregationType, TimeSpan aggregationInterval) in /src/Promitor.Core.Scraping/AzureMonitorScraper.cs:line 71 at Promitor.Core.Scraping.Scraper
1.ScrapeAsync(ScrapeDefinition1 scrapeDefinition) in /src/Promitor.Core.Scraping/Scraper.cs:line 79 has context menu
Platform
Microsoft Azure
Contact Details
[email protected]
The text was updated successfully, but these errors were encountered: