rimashah25 commented on code in PR #7291:
URL: https://github.com/apache/trafficcontrol/pull/7291#discussion_r1088160582
##########
traffic_ops/traffic_ops_golang/monitoring/monitoring.go:
##########
@@ -188,7 +188,7 @@ SELECT
status.name as status,
cachegroup.name as cachegroup,
me.tcp_port as port,
- profile.name as profile,
+ (SELECT STRING_AGG(sp.profile_name, '+' ORDER by sp.priority ASC) FROM
server_profile AS sp where sp.server=me.id group by sp.server) as profile,
Review Comment:
As an example( in monitoring.json), I have a traffic server as follows:
```
"trafficServers": [{
**"profile": "to+global"**,
"status": "ONLINE",
"port": 80,
"cachegroup": "mb",
"hostname": "test2",
"fqdn": "test2.abc.com",
"interfaces": [{
"ipAddresses": [{
"address": "3.4.5.6",
"gateway": null,
"serviceAddress": true
}],
"maxBandwidth": null,
"monitor": true,
"mtu": null,
"name": "bond0"
}],
"type": "EDGE",
"hashid": "e5740dc9-970e-4016-85fe-5cd9d2b80a8e",
"deliveryServices": [{
"xmlId": "bat"
}]
```
Note the profile, it is a layered profile.. So, it can be seen as an array
of profiles`["to, "global"]` or shows as an agg of profiles(`to+global`).
So, now when you go to profile section in monitoring.json, you see the above
profile: `to+global` as
```
{
"name": "to+global",
"type": "EDGE",
"parameters": {
"health.threshold.loadavg": 88,
"health.threshold.queryTime": 1500,
"history.count": 30
}
```
and makes it more convenient to read and understand.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]