Metric Declaration for Application Insights "Resource Type" is not valid #2064
-
ReportI have installed docker in my local system to connect with Prometheus (application installed) locally as well without any use of kubernetes ( like AKS) to scrap data form Azure AppInsight, just to make simulate simple data scrap scenario locally. I have configured the metric-declaration.yml file with tenantId, SubscriptionId, resourcegroup name along with the metric data as well and also configuring runtime.yml with AppInsight telemetry with instrumentation key. I have ran the below code to window cmd prompt,
(note: AUTH_APPKEY is seem to be valid one and doc link represent incorrect ) My container is created but facing an issue stating that "resouceType" in metric-declaration.yml file is not valid. Expected BehaviorThe value given to the "resouceType" is valid as per the link from Promitor. And this initial validation output should result in success. which is the excepted Behavior. Actual BehaviorBut Instead the resourceType: ApplicationInsights is resulting in, Steps to Reproduce the Problem
ComponentScraper Version2.5.0 ConfigurationConfiguration: # metric-declaration
version: v1
azureMetadata:
tenantId: xxxxxxxxxxx-xxxx-xxxx-xxxxxxxxxx
subscriptionId: xxxxxxxxxxx-xxxx-xxxx-xxxxxxxxxx
resourceGroupName: xxxxxxxxxxx-xxxx-xxxx-xxxxxxxxxx
cloud: Global
metricDefaults:
aggregation:
interval: 00:05:00
limit: 10
labels:
geo: Global
environment: dev
scraping:
# Every minute
schedule: "0 * * ? * *"
metrics:
- name: MetricChecker
description: "Average amount of server exceptions in Azure Application Insights"
resourceType: ApplicationInsights
azureMetricConfiguration:
metricName: exceptions/server
aggregation:
type: Average
resources: # Optional, required when no resource discovery is configured
- name: promitor-application-gateway-1
- name: promitor-application-gateway-2
resourceDiscoveryGroups: # Optional, requires Promitor Resource Discovery agent (https://promitor.io/concepts/how-it-works#using-resource-discovery)
- name: application-insights-landscape # runtime
authentication:
# Options are ServicePrincipal, SystemAssignedManagedIdentity, UserAssignedManagedIdentity.
mode: ServicePrincipal # Optional. Default: ServicePrincipal.
identityId: xxxx-xxxx-xxxx # Optional.
server:
httpPort: 80 # Optional. Default: 80
metricSinks:
prometheusScrapingEndpoint:
metricUnavailableValue: NaN # Optional. Default: NaN
enableMetricTimestamps: true # Optional. Default: true
baseUriPath: /metrics # Optional. Default: /metrics
labels:
transformation: None # Optional. Default: None.
metricsConfiguration:
absolutePath: /config/metrics-declaration.yaml # Optional. Default: /config/metrics-declaration.yaml
telemetry:
applicationInsights:
instrumentationKey: xxxxxxxxx-xxxx-xxxx-xxxxxxxx# Optional. Note: Required to be specified when turned on
isEnabled: false # Optional. Default: false
verbosity: trace # Optional. Default: N/A
containerLogs:
isEnabled: true # Optional. Default: true
verbosity: trace # Optional. Default: N/A
defaultVerbosity: error # Optional. Default: error
resourceDiscovery:
host: promitor.agents.resourcediscovery # Optional. DNS name of Promitor Resource Discovery agent
enabled: true # Optional. Indication whether or not resource discovery is enabled through the Promitor Resource Discovery agent.
port: 88 # Optional. Port of Promitor Resource Discovery agent LogsPlatformMicrosoft Azure |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi, Application Insights is only available as of v2.6 (see docs) but you are using v2.5. Can you change the version you are using please? |
Beta Was this translation helpful? Give feedback.
Hi,
Application Insights is only available as of v2.6 (see docs) but you are using v2.5. Can you change the version you are using please?