In this example, Let`s deploy a Service, we will add annotations on it to run a Page Load test monitoring Cisco DevNet homepage.
Two options to run a Page Load test.
Service: config/samples/annotations/service_pageload_default_settings.yaml
apiVersion: v1
kind: Service
metadata:
name: nginx-service-pageload
annotations:
thousandeyes.devnet.cisco.com/test-type: page-load
thousandeyes.devnet.cisco.com/test-url: https://developer.cisco.com/
labels:
run: nginx
spec:
selector:
run: nginx
ports:
- port: 80
protocol: TCP
All the other settings will use default values
-
Create a Page Load test
kubectl apply -f config/samples/annotations/service_pageload_default_settings.yaml
The test will be created on dashboard.
-
Update the settings of the Page Load test
Modify
thousandeyes.devnet.cisco.com/test-url
in config/samples/annotations/service_pageload_default_settings.yaml and redeploy.kubectl apply -f config/samples/annotations/service_pageload_default_settings.yaml
You will find the url have been updated.
-
Delete the Page Load test
Set
thousandeyes.devnet.cisco.com/test-type
tonone
in config/samples/annotations/service_pageload_removal_settings.yaml and redeploy.kubectl apply -f config/samples/annotations/service_pageload_removal_settings.yaml
The test will be removed from ThousandEyes dashboard.
This annotation follows PageLoad CR Spec definition
Service: config/samples/annotations/service_pageload_customized_settings.yaml
apiVersion: v1
kind: Service
metadata:
name: nginx-service-pageload
annotations:
thousandeyes.devnet.cisco.com/test-type: page-load
thousandeyes.devnet.cisco.com/test-spec: |
{
"url":"https://developer.cisco.com/",
"interval": 1800,
"httpInterval": 1800,
"agents": [
{"agentName":"Tokyo, Japan (Trial)"},
{"agentName":"Singapore (Trial) - IPv6"}
],
"alertRules": [
{"ruleName":"Default Page Load Alert Rule"}
]
}
labels:
run: nginx
spec:
selector:
run: nginx
ports:
- port: 80
protocol: TCP
-
Create a Page Load test
kubectl apply -f config/samples/annotations/service_pageload_customized_settings.yaml
The test will be created on dashboard.
-
Update the settings of the Page Load test
Modify
thousandeyes.devnet.cisco.com/test-spec
in config/samples/annotations/service_pageload_customized_settings.yaml and redeploy.kubectl apply -f config/samples/annotations/service_pageload_customized_settings.yaml
You will find the settings have been updated.
-
Delete the Page Load test
Set
thousandeyes.devnet.cisco.com/test-type
tonone
in config/samples/annotations/service_pageload_removal_settings.yaml and redeploy.kubectl apply -f config/samples/annotations/service_pageload_removal_settings.yaml
The test will be removed from ThousandEyes dashboard.