@ -40,6 +40,12 @@ The table below shows this endpoint's support for
- `filter` `(string: "")` - Specifies the expression used to filter the
- `filter` `(string: "")` - Specifies the expression used to filter the
queries results prior to returning the data.
queries results prior to returning the data.
- `ns` `(string: "")` <EnterpriseAlert inline /> - Specifies the namespace in
which to list checks. This value can be specified as the `ns` URL query
parameter or the `X-Consul-Namespace` header. If not provided by either,
the namespace will be inherited from the request's ACL token or will default
to the `default` namespace. Added in Consul 1.7.0.
### Sample Request
### Sample Request
```shell-session
```shell-session
@ -60,7 +66,13 @@ $ curl \
"Output": "",
"Output": "",
"ServiceID": "redis",
"ServiceID": "redis",
"ServiceName": "redis",
"ServiceName": "redis",
"ServiceTags": ["primary"]
"ServiceTags": ["primary"],
"Type": "tcp",
"ExposedPort": 0,
"Definition": {},
"Namespace": "default",
"CreateIndex": 0,
"ModifyIndex": 0
}
}
}
}
```
```
@ -110,6 +122,13 @@ The table below shows this endpoint's support for
This defaults to the `"Name"` parameter, but it may be necessary to provide an
This defaults to the `"Name"` parameter, but it may be necessary to provide an
ID for uniqueness. This value will return in the response as `"CheckId"`.
ID for uniqueness. This value will return in the response as `"CheckId"`.
- `Namespace` `(string: "")` <EnterpriseAlert inline /> - Specifies the namespace in
which to register the check. This parameter is only valid for service checks.
If not provided in the JSON body, the value of the `ns` URL query parameter or
in the `X-Consul-Namespace` header will be used. If not provided by either,
the namespace will be inherited from the request's ACL token or will default
to the `default` namespace. Added in Consul 1.7.0.
- `Interval` `(string: "")` - Specifies the frequency at which to run this
- `Interval` `(string: "")` - Specifies the frequency at which to run this
check. This is required for HTTP and TCP checks.
check. This is required for HTTP and TCP checks.
@ -208,8 +227,9 @@ The table below shows this endpoint's support for
made to both addresses, and the first successful connection attempt will
made to both addresses, and the first successful connection attempt will
result in a successful check.
result in a successful check.
- `TTL` `(string: "")` - Specifies this is a TTL check, and the TTL endpoint
- `TTL` `(duration: 10s)` - Specifies this is a TTL check, and the TTL endpoint
must be used periodically to update the state of the check.
must be used periodically to update the state of the check. If the check is not
set to passing within the specified duration, then the check will be set to the failed state.
- `ServiceID` `(string: "")` - Specifies the ID of a service to associate the
- `ServiceID` `(string: "")` - Specifies the ID of a service to associate the
registered check with an existing service provided by the agent.
registered check with an existing service provided by the agent.
@ -230,6 +250,7 @@ The table below shows this endpoint's support for
{
{
"ID": "mem",
"ID": "mem",
"Name": "Memory utilization",
"Name": "Memory utilization",
"Namespace": "default",
"Notes": "Ensure we don't oversubscribe memory",
"Notes": "Ensure we don't oversubscribe memory",
"DeregisterCriticalServiceAfter": "90m",
"DeregisterCriticalServiceAfter": "90m",
"Args": ["/usr/local/bin/check_mem.py"],
"Args": ["/usr/local/bin/check_mem.py"],
@ -280,6 +301,12 @@ The table below shows this endpoint's support for
- `check_id` `(string: "")` - Specifies the unique ID of the check to
- `check_id` `(string: "")` - Specifies the unique ID of the check to
deregister. This is specified as part of the URL.
deregister. This is specified as part of the URL.
- `ns` `(string: "")` <EnterpriseAlert inline /> - Specifies the namespace in
which to deregister the check. This value can be specified as the `ns` URL query
parameter or the `X-Consul-Namespace` header. If not provided by either,
the namespace will be inherited from the request's ACL token or will default
to the `default` namespace. Added in Consul 1.7.0.
### Sample Request
### Sample Request
```shell-session
```shell-session
@ -315,6 +342,12 @@ The table below shows this endpoint's support for
- `note` `(string: "")` - Specifies a human-readable message. This will be
- `note` `(string: "")` - Specifies a human-readable message. This will be
passed through to the check's `Output` field.
passed through to the check's `Output` field.
- `ns` `(string: "")` <EnterpriseAlert inline /> - Specifies the namespace in
which to update the check. This value can be specified as the `ns` URL query
parameter or the `X-Consul-Namespace` header. If not provided by either,
the namespace will be inherited from the request's ACL token or will default
to the `default` namespace. Added in Consul 1.7.0.
### Sample Request
### Sample Request
```shell-session
```shell-session
@ -350,6 +383,12 @@ The table below shows this endpoint's support for
- `note` `(string: "")` - Specifies a human-readable message. This will be
- `note` `(string: "")` - Specifies a human-readable message. This will be
passed through to the check's `Output` field.
passed through to the check's `Output` field.
- `ns` `(string: "")` <EnterpriseAlert inline /> - Specifies the namespace in
which to update the check. This value can be specified as the `ns` URL query
parameter or the `X-Consul-Namespace` header. If not provided by either,
the namespace will be inherited from the request's ACL token or will default
to the `default` namespace. Added in Consul 1.7.0.
### Sample Request
### Sample Request
```shell-session
```shell-session
@ -384,6 +423,12 @@ The table below shows this endpoint's support for
- `note` `(string: "")` - Specifies a human-readable message. This will be
- `note` `(string: "")` - Specifies a human-readable message. This will be
passed through to the check's `Output` field.
passed through to the check's `Output` field.
- `ns` `(string: "")` <EnterpriseAlert inline /> - Specifies the namespace in
which to update the check. This value can be specified as the `ns` URL query
parameter or the `X-Consul-Namespace` header. If not provided by either,
the namespace will be inherited from the request's ACL token or will default
to the `default` namespace. Added in Consul 1.7.0.
### Sample Request
### Sample Request
```shell-session
```shell-session
@ -421,6 +466,12 @@ The table below shows this endpoint's support for
- `Output` `(string: "")` - Specifies a human-readable message. This will be
- `Output` `(string: "")` - Specifies a human-readable message. This will be
passed through to the check's `Output` field.
passed through to the check's `Output` field.
- `ns` `(string: "")` <EnterpriseAlert inline /> - Specifies the namespace in
which to update the check. This value can be specified as the `ns` URL query
parameter or the `X-Consul-Namespace` header. If not provided by either,
the namespace will be inherited from the request's ACL token or will default
to the `default` namespace. Added in Consul 1.7.0.
### Sample Payload
### Sample Payload
```json
```json