Skip to content
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

Provide capability to specify custom labels per metric #604

Merged
merged 5 commits into from
Jun 27, 2019

Conversation

tomkerkhove
Copy link
Owner

@tomkerkhove tomkerkhove commented Jun 27, 2019

  • Deserialization of metrics
  • Validation / Improve deserialization to block duplicates
  • Merge internal & custom labels
  • Unit Testing
  • Documentation

Fixes #603

Configuration

azureMetadata:
  tenantId: <redacted>
  subscriptionId: <redacted>
  resourceGroupName: <redacted>
metricDefaults:
  aggregation:
    interval: 00:05:00
  scraping:
    # Every minute
    schedule: "0 * * ? * *"
metrics:
  - name: promitor_demo_generic_queue_size
    description: "Amount of active messages of the 'orders' queue (determined with Generic provider)"
    resourceType: Generic
    resourceUri: Microsoft.ServiceBus/namespaces/promitor-messaging
    filter: EntityName eq 'orders'
    labels:
      app: promitor
    azureMetricConfiguration:
      metricName: ActiveMessages
      aggregation:
        type: Average

Output

# HELP promitor_demo_generic_queue_size Amount of active messages of the 'orders' queue (determined with Generic provider)
# TYPE promitor_demo_generic_queue_size gauge
promitor_demo_generic_queue_size{resource_group="promitor",subscription_id="0f9d7fea-99e8-4768-8672-06a28514f77e",resource_uri="subscriptions/0f9d7fea-99e8-4768-8672-06a28514f77e/resourceGroups/promitor/providers/Microsoft.ServiceBus/namespaces/promitor-messaging",app="promitor"} 579 1561633985175

@promitor-bot
Copy link

Docker image for this PR was built and is available on Docker Hub.

You can pull it locally via the CLI:

docker pull tomkerkhove/promitor-agent-scraper-ci:pr604

Want to verify the new version? Run it locally:

docker run -d -p 8999:80 --name promitor-agent-scraper-pr604 \
                         --env PROMITOR_AUTH_APPID='<azure-ad-app-id>' \
                         --env-file C:/Promitor/az-mon-auth.creds \
                         --volume C:/Promitor/metrics-declaration.yaml:/config/metrics-declaration.yaml \
                         tomkerkhove/promitor-agent-scraper-ci:pr604

You can find a CI version of our Helm chart on hub.helm.sh

Signed-off-by: Tom Kerkhove <[email protected]>
Signed-off-by: Tom Kerkhove <[email protected]>
@promitor-bot
Copy link

Docker image for this PR was built and is available on Docker Hub.

You can pull it locally via the CLI:

docker pull tomkerkhove/promitor-agent-scraper-ci:pr604

Want to verify the new version? Run it locally:

docker run -d -p 8999:80 --name promitor-agent-scraper-pr604 \
                         --env PROMITOR_AUTH_APPID='<azure-ad-app-id>' \
                         --env-file C:/Promitor/az-mon-auth.creds \
                         --volume C:/Promitor/metrics-declaration.yaml:/config/metrics-declaration.yaml \
                         tomkerkhove/promitor-agent-scraper-ci:pr604

You can find a CI version of our Helm chart on hub.helm.sh

@brusMX
Copy link
Contributor

brusMX commented Jun 27, 2019

Just tested it, it looks really good. Managed to put our own label, and resources look just fine! Thanks!

@tomkerkhove
Copy link
Owner Author

Minor addition to the docs, only validation remain which should be done today.

Thanks for testing it @brusMX !

@promitor-bot
Copy link

Docker image for this PR was built and is available on Docker Hub.

You can pull it locally via the CLI:

docker pull tomkerkhove/promitor-agent-scraper-ci:pr604

Want to verify the new version? Run it locally:

docker run -d -p 8999:80 --name promitor-agent-scraper-pr604 \
                         --env PROMITOR_AUTH_APPID='<azure-ad-app-id>' \
                         --env-file C:/Promitor/az-mon-auth.creds \
                         --volume C:/Promitor/metrics-declaration.yaml:/config/metrics-declaration.yaml \
                         tomkerkhove/promitor-agent-scraper-ci:pr604

You can find a CI version of our Helm chart on hub.helm.sh

@promitor-bot
Copy link

Docker image for this PR was built and is available on Docker Hub.

You can pull it locally via the CLI:

docker pull tomkerkhove/promitor-agent-scraper-ci:pr604

Want to verify the new version? Run it locally:

docker run -d -p 8999:80 --name promitor-agent-scraper-pr604 \
                         --env PROMITOR_AUTH_APPID='<azure-ad-app-id>' \
                         --env-file C:/Promitor/az-mon-auth.creds \
                         --volume C:/Promitor/metrics-declaration.yaml:/config/metrics-declaration.yaml \
                         tomkerkhove/promitor-agent-scraper-ci:pr604

You can find a CI version of our Helm chart on hub.helm.sh

@tomkerkhove tomkerkhove merged commit 98fe195 into master Jun 27, 2019
@tomkerkhove tomkerkhove deleted the features-custom-labels branch June 27, 2019 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide capability to specify custom labels per metric
3 participants