Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
07-29-2020 12:10 AM
Hi
I tried to use 'appNameStrategy' options as described in doc https://docs.appdynamics.com/display/PRO45/Enable+Auto-Instrumentation+of+Java+Applications as part of enabling auto-instrumentation using cluster agent in k8s cluster ( PKS cluster), but i could not get it work.
I am getting below error
[WARNING]: 2020-07-29 01:05:47 - deploymenthandler.go:245 - Cannot start instrumentation. Error getting Application and Tier names for deployment demo-app
instrumentationMethod: Env
nsToInstrumentRegex: demo-ns
appNameStrategy: label
appNameLabel: app
defaultEnv: JAVA_OPTS
resourcesToInstrument: [Deployment,StatefulSet]
imageInfo:
java:
image: "dev.registry.ews.int/vendored/docker.io/appdynamics/java-agent:20.6.0"
agentMountPath: /opt/appdynamics
netvizInfo:
bciEnabled: true
port: 3892
The error is same for 'appNameStrategy: namespace'.
Can someone guide me if i am missing something here ?
07-29-2020 03:00 AM - edited 07-29-2020 03:07 AM
Hi there
Can you share your entire Cluster Agent deployment YAML as well as your java application YAML? to better understand what is configured incorrectly?
07-29-2020 11:52 AM - edited 07-29-2020 01:42 PM
cluster agent.yaml
apiVersion: appdynamics.com/v1alpha1
kind: Clusteragent
metadata:
name: k8s-cluster-agent
namespace: appdynamics
spec:
appName: "sbx-cluster-1"
controllerUrl: "https://*******.saas.appdynamics.com"
account: "********"
# docker image info
image: "dev.registry.ews.int/vendored/docker.io/appdynamics/cluster-agent:20.5.0"
serviceAccountName: appdynamics-cluster-agent
logLevel: "DEBUG"
nsToMonitor:
- "appdynamics"
- "cert-manager"
- "default"
- "demo-ns"
- "external-dns"
- "harness-delegate"
- "kube-node-lease"
- "kube-public"
- "kube-system"
- "ingress-nginx"
- "pks-system"
- "twistlock"
stdoutLogging: "true"
instrumentationMethod: Env
nsToInstrumentRegex: demo-ns
appNameStrategy: label
appNameLabel: app
defaultEnv: JAVA_OPTS
resourcesToInstrument: [Deployment,StatefulSet]
imageInfo:
java:
image: "dev.registry.ews.int/vendored/docker.io/appdynamics/java-agent:20.6.0"
agentMountPath: /opt/appdynamics
netvizInfo:
bciEnabled: true
port: 3892
demo-app.yaml
apiVersion: v1
kind: Service
metadata:
name: demo-app-svc
namespace: demo-ns
labels:
app: demo
env: dev
tier: web
team: dev-team
spec:
type: ClusterIP
ports:
- port: 80
targetPort: http
protocol: TCP
name: http
selector:
app: demo
env: dev
tier: web
team: dev-team
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: demo-app
namespace: demo-ns
annotations:
product-documentation: "https://confluence.ews.int/"
on-call: "000-000-0000"
email: "pkottam@ews.int"
labels:
app: demo
env: dev
tier: web
team: dev-team
spec:
replicas: 1
selector:
matchLabels:
app: demo
template:
metadata:
annotations:
product-documentation: "https://confluence.ews.int/"
on-call: "000-000-0000"
email: "pkottam@ews.int"
prometheus.io/scrape: 'true'
prometheus.io/port: '8080'
prometheus.io/path: '/actuator/prometheus'
labels:
app: demo
env: dev
tier: web
team: dev-team
spec:
securityContext:
runAsUser: 1000
runAsGroup: 3000
containers:
- name: demo-app
image: "dev.registry.ews.int/ews/demo42b:556"
imagePullPolicy: Always
ports:
- name: http
containerPort: 8080
protocol: TCP
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: demo-app-ing
namespace: demo-ns
labels:
app: demo
env: dev
tier: web
team: dev-team
annotations:
cert-manager.io/cluster-issuer: cm-vault-issuer
kubernetes.io/ingress.class: nginx
spec:
tls:
- hosts:
- demo.pks-aws-dev.ews.int
secretName: demo.pks-aws-dev.ews.int-tls
rules:
- host: demo.pks-aws-dev.ews.int
http:
paths:
- path: /
backend:
serviceName: demo-app-svc
servicePort: http
Note: The same issue exists if i use namespace strategy as well..
apiVersion: appdynamics.com/v1alpha1
kind: Clusteragent
metadata:
name: k8s-cluster-agent
namespace: appdynamics
spec:
appName: "sbx-cluster-1"
controllerUrl: "https://******.saas.appdynamics.com"
account: "**********"
# docker image info
image: "dev.registry.ews.int/vendored/docker.io/appdynamics/cluster-agent:20.5.0"
serviceAccountName: appdynamics-cluster-agent
logLevel: "DEBUG"
nsToMonitor:
- "appdynamics"
- "cert-manager"
- "default"
- "demo-ns"
- "external-dns"
- "harness-delegate"
- "kube-node-lease"
- "kube-public"
- "kube-system"
- "ingress-nginx"
- "pks-system"
- "twistlock"
stdoutLogging: "true"
instrumentationMethod: Env
nsToInstrumentRegex: demo-ns
appNameStrategy: namespace
#appNameLabel: app
#defaultAppName: demo-app
#defaultInstrumentMatchString: demo-app
#defaultInstrumentationLabelMatch:
#- app: demo
defaultEnv: JAVA_OPTS
resourcesToInstrument: [Deployment,StatefulSet]
imageInfo:
java:
image: "dev.registry.ews.int/vendored/docker.io/appdynamics/java-agent:20.6.0"
agentMountPath: /opt/appdynamics
netvizInfo:
bciEnabled: true
port: 3892
### Uncomment the following two lines if you need pull secrets
#imagePullSecrets:
# name: "<your-docker-pull-secret-name>"
#instrumentationRules:
# - namespaceRegex: demo-ns
# appNameLabel: app
11-06-2020 11:06 AM
@Mario.Morelli Just checking if you had a chance to take a look into the above issue. I work along side with @Raja.Vijayakumar.
11-07-2020 02:05 AM
Hi Vaibhav
Can you test manual instrumentation by using the following settings, and provide the logs of what is happening
appNameStrategy: manual
And ensure to provide a value for - defaultAppName
Also can you provide the following information
1. Version of cluster agent you are using?
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form