Service point diagnostics API - BlueCat DNS Edge

DNS Edge API Guide

Locale
English (United States)
Product name
BlueCat DNS Edge

Use this API for troubleshooting a service point. Returns overall health status of the service point, the service point ID, each service's status and service version, configured forwarder IPs, the current local time and time zone, and policy details.

Current

Request: GET http://<sp-ip-address>:80/v1/status/spDiagnostics

Replace the IP address with the IP address of the service point.

Successful response

200 OK
{
    "spStatus": "GOOD",
    "spId": "b859546f-0c85-424c-8d9e-b3f3894be563",
    "currentVersion": "3.0.0",
    "desiredVersion": "n/a",
    "spStatusTimestamp": 1528736624434,
    "spServicesStatuses": {
        "status-service": {
            "status": "GOOD",
            "statusTimestamp": 1528736624434,
            "serviceVersion": "1.0.0-build308"
        },
        "naming-service": {
            "status": "GOOD",
            "statusTimestamp": 1528736624444,
            "serviceVersion": "1.0.0-build396"
        },
        "dns-gateway-service": {
            "status": "GOOD",
            "statusTimestamp": 1528736624450,
            "serviceVersion": "1.0.0-build1662",
            "resourceDetails": {
                "query-resolving-availability": "GOOD"
            },
            "additionalDetails": {
                "settingsDiagnostics": {
                    "lastSettingsPollingTimestamp": 1528736619932,
                    "lastSuccessfulSettingsUpdateTimestamp": 1528656153411,
                    "lastSettingsPollingStatus": "UNCHANGED",
                    "lastSettingsPollingStatusReason": "Site settings parcel was too large to parse or store" |
                                                       "Umbrella API credentials were invalid for the umbrella device" |
                                                       "Failed to get umbrella device registration or to register umbrella device" |
                                                       "An internal error occurred generating the site settings parcel"
                    "namespaceDetails": [
                        {
                            "id": "b053a841-f79c-11e7-8194-06ec4ddf900a",
                            "name": "default",
                            "forwarders": [
                                "8.8.8.8"
                            ],
                            "matchListsDomainCount": 0,
                            "exceptionListsDomainCount": 0,
                            "matchesAllDomains": true
                        }
                    ]
                },
                "policyDiagnostics": {
                    "policyEventTimestamp": 1528736619468,
                    "lastUpdateTimestamp": 1528729505274,
                    "lastPolicyEventResult": "UNCHANGED",
                    "policyDetails": [
                        {
                            "policyName": "BlockFB",
                            "policyId": "1509980672880-b6aca992-7ef0-4e67-88fe-ff5c44f5cfea",
                            "numberDomains": 0,
                            "numberExceptions": 1,
                            "policyAction": "block"
                        }
                    ]
                }
            }
        },
            sp-proxy":{ 
               "status":"GOOD",
               "statusTimestamp":0,
               "serviceVersion":"1.0.0-build103",
               "additionalDetails":{ 
               "databaseConnectionStatus":"GOOD",
               "certificateInfo":{ 
               "certificatesExpired":"False",
               "certificateExpiryTime":1566498604000,
               "proxyStatus":"Running"
            }
         }
      },
        "monitoring-service": {
            "status": "GOOD",
            "statusTimestamp": 1528736624440,
            "serviceVersion": "1.0.0-build416",
            "resourceDetails": {
                "cloudwatch-metrics-status": "GOOD",
                "cloudwatch-logs-status": "GOOD"
            },
            "additionalDetails": {
                "cloudwatch-logs-success-count": 59,
                "cloudwatch-logs-failure-count": 0,
                "cloudwatch-metrics-success-count": 2,
                "cloudwatch-metrics-failure-count": 0
            }
        },
        "update-controller-service": {
            "status": "GOOD",
            "statusTimestamp": 1528736625289,
            "serviceVersion": "1.0.0-build708"
                "additionalDetails": {
                "spCertificateDiagnostics": {
                  "certificateInformation": {
                    "certificates": {
                      "ca": [
                        {
                          "validFrom": 11111,
                          "validTo": 22222,
                          "fingerprint": "12K22JKIUGK13"
                        },
                        {
                          "validFrom": 22222,
                          "validTo": 33333,
                          "fingerprint": "LIVJFU765GF8654IUGUYG"
                        }
                      ],
                      "client": [
                        {
                          "validFrom": 22222,
                          "validTo": 33333,
                          "fingerprint": "GJHJKHGRESWRRTEHF76576576DT"
                        }
                      ]
                    },
                    "certificateUpdateTimestamp": 999999999
                  },
                  "status": {
                    "certificateUpdateStatus": "OK",
                    "updateTime": 999999999
                  }
                }
              }
        },
              "routing-controller-service":{ 
                  "status":"GOOD",
                  "statusTimestamp":<EPOCH timestamp>,
                  "serviceVersion":"<service version>",
                  "additionalDetails":{ 
                  "routingDaemonServiceInfo":{ 
                  "status":"GOOD" | "BAD",
                  "RDSServiceVersion":"<RDS service version",
                  "routingDaemons":{ 
                     "zebra":{ 
                        "status": "running"| "not running" | "off" | "suspended"
                     },
                     "ospf":{ 
                        "status":"running"| "not running" | "off" | "suspended"
                     },
                     "bgp":{ 
                        "status":"running"| "not running" | "off" | "suspended"
                     }
                  }
               },
               "dnsHealthMonitorInterval": 20000
            }
      },
        "sp-controller-service": {
            "status": "GOOD",
            "statusTimestamp": 1528736624709,
            "serviceVersion": "1.0.0-build406",
            "resourceDetails": {
                "customer-instance-connection": "GOOD"
            }
        },
        "activity-logging-service": {
            "status": "GOOD",
            "statusTimestamp": 1528736625283,
            "serviceVersion": "1.0.0-build226",
            "resourceDetails": {
                "kinesis-stream-status": "GOOD"
            },
            "additionalDetails": {
                "stored-offline-queries-bytes": 0,
                "kinesis-put_success": 0,
                "kinesis-put_fail": 0
            }
        }
    },
    "additionalDetails": {
        "dns-resolving-responses" :
	{
		"rootNSQuery": "NOERROR",
		"edgeCloudEndpoint": "NOERROR"
	}
       "nameservers": [
            "10.3.0.127",
            "10.3.0.145",
            "10.3.0.146"
        ],
        "currentLocalTime": "2018-06-11 13:03:45",
        "networkConfiguration": {
            "spInterfaces": [
                {
                    "name": "lo",
                    "ipAddress": "127.0.0.1/8",
                    "macAddress": "00:00:00:00:00:00",
                    "inet6": "::1/128"
                },
                ...
            ],
            "spRoutingTable": [
                {
                    "destination": "0.0.0.0",
                    "gateway": "172.16.22.1",
                    "genmask": "0.0.0.0",
                    "flags": "UG",
                    "metric": "1024",
                    "ref": "0",
                    "use": "0",
                    "iface": "ens160"
                },
                ...
            ]
        },
        "timeSynchronization": {
            "status": "Idle."
        },
        "timeZone": "America/New_York",
        "hostManager": "BLUECAT",
        "proxyConfiguration": {
            "configured": false
        }
    },
     "sshStatus": {
        "numberOfKeys": <# of ssh public keys>,
        "configStatus": "CONFIGURED" | "NOT_CONFIGURED" | "INVALID",
        "errors": [<errors from parsing guest info>, ...]
       }
 
    },
    "registration": {
        "registered": "true",
        "registrationStatus": SUCCESSFUL |
                              FINISHED_STARTING_SERVICES |
                              STARTING_SERVICES |
                              FINISHED_GENERATING_SERVICE_POINT_PROPERTIES |
                              GENERATING_SERVICE_POINT_PROPERTIES |
                              REGISTERED_WITH_CLOUD |
                              REGISTERING_WITH_CLOUD |
                              NOT_REGISTERED |
                              FAILED_REGISTRATION_WITH_CLOUD |
                              FAILED_STARTING_SERVICES |
                              FAILED_GENERATING_SERVICE_POINT_PROPERTIES,
        "registrationFailureReason": "Failed to load configuration data" |
                                     "Failed to resolve Edge cloud endpoint hostname" |
                                     "Timed out connecting to Edge cloud endpoint" |
                                     "Error response from Edge cloud endpoint" |
                                     "Failed to load certificates" |
                                     "Failed to store certificates" |
                                     "SSL error occurred while trying to contact Edge cloud endpoint" |
                                     "SSL error: Client certificate expired" |
                                     "SSL error: Server does not trust client certificate" |
                                     "SSL error: Client does not trust server certificate" |
                                     "Failed to pull image" |
                                     "Failed to check status" |
                                     "Failed to start service" |
                                     "Failed to stop service" |
                                     "Failed to switch service" |
                                     "Failed to tag image" |
                                     "Failed to update rns" |
                                     "Failed to write to system file" |
                                     "Unexpected error",        
        "timestamp": 1528656111995,
        "siteId": "1b9874b1-9a6b-4347-92f1-7c33bb47c66b",
        "customerId": "da22f366-66e1-4558-9205-4ebd82c91550"
    },
    "updates": [
        {
            "service": <service>,
            "task":< WRITING_SERVICE_FILE | UPGRADING | CHECKING_STATUS | PULLING_IMAGE | 
                    RECORDING_NEW_SERVICE | STARTING_SERVICE | STOPPING_SERVICE | 
                    SWITCHING_SERVICE | TAGGING_IMAGE | DELEGATED_UPDATE | ROLLING_BACK >,
            "state":< PLANNED | STARTED | FINISHED | FAILED >
        },
        ...
    ]
}

Namespace details

Under settingsDiagnostics, nameSpaceDetails, the parameter matchListDomainCount returns the total count of domains in the match lists attached to the namespace. However, "." represents all domains, but is counted as a single domain in the context of the domain list count. As a result, the parameter matchesAllDomains returns true or false in the following situations:
  • When one domain list is provided and contains "." as a domain, then matchesAllDomains will be true, but matchListDomainCount is 1.
  • If more than 1 domain list is provided, but any list contains "." as a domain, then the flag will be true and the "matchListDomainCount" reflects the count of domains across all domain lists (counting "." as one domain).
  • If no domain list is provided, then matchesAllDomains is true, but matchListDomainCount is 0.
  • If a domain list is provided with domains other than "." then matchesAllDomains is false, and matchListDomainCount reflects the count of domains in that list.

The exceptionsListDomainCount parameter is the total count of domains in the exception domain lists attached to the namespace.

Daemons Status

In the routing-controller-service section, the status for the zebra, OSPF, and BGP can be reported as:
  • running: The daemon is running with no issues.
  • not running: The daemon is enabled but isn't running.
  • suspended: The daemon failed the health check, and the service point was removed from the Anycast pool.
  • off: The daemon isn't enabled.

Update information

In the updates section, the task field will display UPGRADING regardless of whether the service point is upgrading to a newer service point software version or downgrading to an older software version.

Registration information

The field registrationFailureReason is only returned when the registration status is FAILED. If the registration state can't be determined, the status returned is N/A.