You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2022/03/03 22:41:38 UTC
[GitHub] [trafficcontrol] rawlinp commented on a change in pull request #6612: Adding status and lastHmPoll fields to CrStates
rawlinp commented on a change in pull request #6612:
URL: https://github.com/apache/trafficcontrol/pull/6612#discussion_r819120228
##########
File path: lib/go-tc/crstates.go
##########
@@ -37,10 +38,12 @@ type CRStatesDeliveryService struct {
// IsAvailable contains whether the given cache or delivery service is available. It is designed for JSON serialization, namely in the Traffic Monitor 1.0 API.
type IsAvailable struct {
- IsAvailable bool `json:"isAvailable"`
- Ipv4Available bool `json:"ipv4Available"`
- Ipv6Available bool `json:"ipv6Available"`
- DirectlyPolled bool `json:"-"`
+ IsAvailable bool `json:"isAvailable"`
+ Ipv4Available bool `json:"ipv4Available"`
+ Ipv6Available bool `json:"ipv6Available"`
+ DirectlyPolled bool `json:"-"`
+ Status string `json:"status"`
+ LastHmPoll time.Time `json:"lastHmPoll"`
Review comment:
Can we just call this `LastPoll`? The `Hm` bit is kind of unnecessary/already understood.
##########
File path: docs/source/development/traffic_monitor/traffic_monitor_api.rst
##########
@@ -343,22 +343,60 @@ TODO
``/publish/CrStates``
=====================
-The current state of this CDN per the ref:`health-proto`.
+The current state of this CDN per the :ref:`health-proto`.
``GET``
-------
-:Response Type: ?
+:Response Type: Object
+
+.. code-block:: http
+ :caption: Example Request
+
+ GET /publish/CrStates HTTP/1.1
+ Accept: */*
+ Content-Type: application/json
Response Structure
""""""""""""""""""
+:caches: An object with keys that are the names of monitored :term:`cache servers`
+ :server name: The name of the server being monitored
-TODO
+ :isAvailable: Whether or not this cache is available for monitoring
+ :ipv4Available: Whether or not an IPV4 interface on this cache is available for monitoring
+ :ipv6Available: Whether or not an IPV6 interface on this cache is available for monitoring
Review comment:
"available for ~monitoring~ routing" would make more sense I think
##########
File path: docs/source/development/traffic_monitor/traffic_monitor_api.rst
##########
@@ -343,22 +343,60 @@ TODO
``/publish/CrStates``
=====================
-The current state of this CDN per the ref:`health-proto`.
+The current state of this CDN per the :ref:`health-proto`.
``GET``
-------
-:Response Type: ?
+:Response Type: Object
+
+.. code-block:: http
+ :caption: Example Request
+
+ GET /publish/CrStates HTTP/1.1
+ Accept: */*
+ Content-Type: application/json
Response Structure
""""""""""""""""""
+:caches: An object with keys that are the names of monitored :term:`cache servers`
+ :server name: The name of the server being monitored
-TODO
+ :isAvailable: Whether or not this cache is available for monitoring
+ :ipv4Available: Whether or not an IPV4 interface on this cache is available for monitoring
+ :ipv6Available: Whether or not an IPV6 interface on this cache is available for monitoring
+ :status: The status of this server, along with any additional reason for it to be marked as such
+ :lastHmPoll: The last time the health data for this server was polled by a traffic monitor
+:deliveryServices: An object with keys as the names of monitored :term:`Delivery Services`
+ :delivery service name: The name of the delivery service being monitored
+ :disabledLocations: A list of disabled locations for this delivery service
+ :isAvailable: Whether or not this delivery service is available for monitoring
Review comment:
"available for ~monitoring~ routing" would make more sense I think
--
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: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org