How to get list of failed requests on Ingress application gateway in AKS

sai theja 0 Reputation points
2023-01-20T15:29:06.9466667+00:00

There are continues alert of failed request on ingress app gateway, but unable to track down to the resource causing for failed requests.

These alerts are from AKS app gateway.

Help me on it.

Backend health of app gateway is verified and all are active, health probe have active status to all backend poo available nodes.

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
962 questions
Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,869 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Adrian Dobrescu 261 Reputation points Microsoft Employee
    2023-01-20T15:41:05.5366667+00:00

    Hello @sai theja
    -You can check the logs of AGIC pod via kubectl logs command:
    #kubectl logs -l appgw-ingress=true -n <namespace-name> --tail=100

    //This command will retrieve the last 100 lines of logs for the AGIC pod, and will filter the pod based on the label appgw-ingress=true.

    -You can also use the --since flag to get logs since specific time or duration.
    kubectl logs -l appgw-ingress=true -n ingress-basic --since=5m // it will retrieve you the logs for the past 5 minutes
    -Real time logs with -f flag:

    **kubectl logs -f -l appgw-ingress=true -n ingress-basic
    **
    Please "Accept as Answer" and Upvote if it helped, so that it can help others in the community looking for help on similar topics.

    Thank you!


  2. Sai Theja 21 Reputation points
    2023-01-21T07:25:05.34+00:00

    Hi @Adrian Dobrescu ,

    Thanks for the reply, But i am unable to retrieve logs.

    I tried with the below command.

    where container name i received as none,

    When i executed:

    1.kubectl get pods <pod name> -o custom-columns=name:.spec.containers.name -n <name-space>

    But when i executed:

    1. kubectl get pods <pod name> -o custom-columns=name:.spec.containers[*].name -n <name-space>

    received container name as "ingress-azure".

    Tried with this container name:

    Kubectl get pods <pod-name> <container-name> -n <name-space> in this command but i received as not valid for the pod because i took from overall spec, but there is no container i received as per my first command.

    Kindly help me on this.

    Thanks.