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

Add appdynamicscloud metric provider #1360

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Next Next commit
add appdynamicscloud section to metrics usage doc
Signed-off-by: charleslin-appd <[email protected]>
  • Loading branch information
charleslin-appd committed Feb 12, 2023
commit e1c6db439f85376228cf19596a4f898b783d8e41
65 changes: 65 additions & 0 deletions docs/gitbook/usage/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -623,3 +623,68 @@ Reference the template in the canary analysis:
max: 1000
interval: 1m
```

## AppDynamicsCloud

You can create custom metric checks using the AppDynamicsCloud provider.

Create a secret with your AppDynamicsCloud service principal credential:

```yaml
apiVersion: v1
kind: Secret
metadata:
name: appdynamicscloud-secret
namespace: istio-system
data:
appdcloud_client_secret_id: your-appdcloud-service-principal-id
appdcloud_client_secret_key: your-appdcloud-service-principal-key
```

AppDynamics metric template examples:

```yaml
apiVersion: flagger.app/v1beta1
kind: MetricTemplate
metadata:
name: error-rate
namespace: istio-system
spec:
provider:
type: appdynamicscloud
address: https://tenant_name.observe.appdynamics.com
secretRef:
name: appdynamicscloud-secret
query: |
fetch epm: metrics(apm:errors_min) {timestamp, value} from entities(apm:service)[attributes(service.name) = '{{ target }}_backend'] since -10m
```

```yaml
apiVersion: flagger.app/v1beta1
kind: MetricTemplate
metadata:
name: response-time
namespace: istio-system
spec:
provider:
type: appdynamicscloud
address: https://tenant_name.observe.appdynamics.com
secretRef:
name: appdynamicscloud-secret
query: |
fetch art: metrics(apm:response_time) {timestamp, value} from entities(apm:service)[attributes(service.namespace) = '{{ namespace }}' && attributes(service.name) = '{{ target }}'] since -10m
```

Reference the template in the canary analysis:

```yaml
analysis:
metrics:
- name: "error-rate"
templateRef:
name: error-rate
namespace: istio-system
thresholdRange:
max: 1
interval: 1m
```