Registration Check To PSF
Overview ¶
In the PSF environment, MCT can not only add checks directly on the page, but also register checks through repo.
Step ¶
- Commit outside the repo: app-registration-template, and merge to main.
- Btp sync to inside the repo: app-registration
- Manually trigger the webhook. (Future optimization for automatic triggering)
Architecture ¶
Outside the repo ¶
- app-registration-template/ - non-templates/ - webex-wap/ - template/ -
roma.yaml- templates/ - webex-wap/ - infra/ - psf/ -ite2.yaml.tpl
Each team creates their own folder in the non-templates and templates directories.
- non-templates: Data sources
- templates: Check type template
The following is an example of using the ping check to create a check of type URL Watch Server in the PSF environment.
roma.yaml
global_setting:
datacenter: "{{ Values.datacenter }}" # Data Center
cluster_name: "wap-{{ Values.cluster }}" # Cluster Name
service: "WAP" # MCT Service
env: "{{ Values.environment }}" # Environment
server_type_list:
- zone_setting:
domainType: 8 # Domain Type (URL Watch Zone)
zoneType: 12 # Zone Type (URL Watch Zone)
zoneTypeName: "URL Watch Zone" # Zone Type Name
zoneName: "wap-{{ Values.cluster }}" # Zone Name
zoneField3: 0 # Default 0
zoneField6: 10 # Muti-thread Num
server_setting:
serverType: "URL Watch Server" # Server Type
svrType: "server" # svrType
serverName: "roma ping check" # Check Name
url: "https://wapgrafana-{{ Values.cluster_hostname }}/healthz" # URL
positive: "Ok" # Positive Match
negative: "NONONO" # Negative Match
timeout: 60 # Timeout
retry: 1 # Retries
mode: 0 # Mode
method: 0 # Method (Get)
ite2.yaml.tpl
{{- $boundary := .boundary }} # boundaryDataRepo=https://github.webex.umi.ai/WebExSquared/psf-boundary-data.git
{{- $commonValues := .commonValues }}
{{- if index $commonValues.cnc.appCluster.wapClusterNames 1 }}
config:
timerInterval: 10 # Global Timer Setting Interval
appGroup: webex-wap # Default Metrics Label "_APP_GROUP"
timerLocation: dc-01awxt2 # Timer Location
parameters: # Template data parameters
environment: Prod
cluster: ite2
datacenter: Global
kubed_cluster: {{ index $commonValues.cnc.appCluster.wapClusterNames 1 }}
cluster_hostname: {{ $commonValues.commonIdentity.env }}-2.pub.{{ $boundary.dnsDomain }}
labels: # Global Customized Metrics Labels
cluster: {{ index $commonValues.cnc.appCluster.wapClusterNames 1 }}
app_group: webex-wap
app_cluster: ite2
appConfigs:
-
appName: roma # Template Name to be rendered (roma.yaml)
timerInterval: 5 # Timer Setting Interval
labels: # Customized Metrics Labels for this check
app: wapCheck
{{- end }}
Inside the repo ¶
- app-registration/ - webex-wap/ - infra/ - psf/ -
ite2.yaml- template/ -roma.yaml- xxxxx/ - infra/ - psf/ -xxxxxxx.yaml- template/ -xxxxxxx.yaml
Update ite2.yaml and pull request, merge it to main so that manually trigger the webhook.
Verification ¶
- MCT PSF Portal to check your registered cluster.
- Grafana to query metrics, query code:
mct_status_metric{app="xxxxx"}