All skills
microsoft avatar

/azure-diagnostics

@ae5e585
by microsoftmicrosoft/skills3.1k stars
351

Debug Azure production issues on Azure using AppLens, Azure Monitor, resource health, and safe triage. WHEN: debug production issues, troubleshoot app service, app service high CPU, app service deployment failure, troubleshoot container apps, troubleshoot functions, troubleshoot AKS, VM RDP, Linux SSH, VM black screen, can't connect to VM, reset VM password, NSG or firewall blocking, kubectl cannot connect, kube-system/CoreDNS failures, pod pending, crashloop, node not ready, upgrade failures, analyze logs, KQL, insights, image pull failures, cold start issues, health probe failures, resource health, root cause of errors, troubleshoot event hubs, troubleshoot service bus, messaging SDK error, AMQP connection failure, message lock lost, service bus dead letter.

Use this Skill: https://skilld.dev/gh/microsoft/skills/azure-diagnostics

This session only. Nothing lands on disk.

troubleshootingmessagingazure-servicebus-py.md

≈597 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Azure Service Bus SDK — Python

Package: azure-servicebus | README | Full Troubleshooting Guide

Common Errors

Exception Cause Fix
ServiceBusAuthenticationError Invalid credentials Check connection string, regenerate SAS key
ServiceBusAuthorizationError Missing Send/Listen claim Assign Azure Service Bus Data Owner/Sender/Receiver RBAC role
ServiceBusConnectionError Network or firewall Check AMQP port 5671, try TransportType.AmqpOverWebsocket
OperationTimeoutError Service didn't respond in time Adjust retry config, verify network
MessageLockLostError Processing exceeded lock duration Use AutoLockRenewer, reduce processing time
SessionLockLostError Session lock expired Reconnect to session, keep renewing lock
MessageSizeExceededError Message or batch too large Reduce payload. Premium supports individual messages up to 100MB. Batch limit is computed from max message size on the client, so batches can also be impacted

Enable Logging

import logging, sys

handler = logging.StreamHandler(stream=sys.stdout)
handler.setFormatter(logging.Formatter("%(asctime)s | %(threadName)s | %(levelname)s | %(name)s | %(message)s"))
logger = logging.getLogger('azure.servicebus')
logger.setLevel(logging.DEBUG)
logger.addHandler(handler)

# Enable AMQP frame tracing
from azure.servicebus import ServiceBusClient
client = ServiceBusClient(..., logging_enable=True)

AutoLockRenewer

from azure.servicebus import AutoLockRenewer

renewer = AutoLockRenewer()
with receiver:
    for message in receiver.receive_messages(max_message_count=10):
        renewer.register(receiver, message, max_lock_renewal_duration=300)
        # process message
        receiver.complete_message(message)

Key Issues

  • Mixing sync/async: Don't use time.sleep() in async code; use await asyncio.sleep().
  • Dead letter debugging: Use sub_queue=ServiceBusSubQueue.DEAD_LETTER to inspect dead_letter_reason and dead_letter_error_description.
  • Always close clients: Use with statement or call close() to avoid connection leaks.

Source: SKILL.md on GitHub

1 warning15d4 checks · Risk SAFE
  • Gen Agent Trust Hub15d

    This skill is designed for Azure diagnostics and troubleshooting, providing a comprehensive set of guides and scripts that utilize standard tools like the Azure CLI and kubectl. It includes some security considerations, such as the ingestion of logs which provides a surface for indirect prompt injection, and the use of privileged debug pods for advanced diagnostics. These are used within the skill's intended functionality and are accompanied by appropriate guidance for user approval.

  • Socket15d

    No alerts

  • Snyk15d

    Risk: LOW · No issues

  • Runlayer7mo

    4/4 files flagged

Signed by skilld at ae5e585. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last month
metadata
{
  "author": "Microsoft",
  "version": "1.2.6"
}

README badge

README badge for microsoft/skills/azure-diagnostics