API Configuration
Reference documentation
API configuration
Example API definition
The following is an example API definition at /etc/sensu/conf.d/api.json
.
{
"api": {
"host": "57.43.53.22",
"bind": "0.0.0.0",
"port": 4567
}
}
API definition specification
The API definition uses the "api": {}
definition scope.
api
attributes
host | |
---|---|
description | The hostname or IP address that is used when querying the API. NOTE: this attribute does not configure the address that the API binds to (that’s bind ). This attribute is used by the Sensu server when querying the Sensu API. |
required | false |
type | String |
default | 127.0.0.1 |
example |
|
bind | |
---|---|
description | The address that the API will bind to (listen on). |
required | false |
type | String |
default | 0.0.0.0 |
example |
|
port | |
---|---|
description | The port that the API will listen on for HTTP requests. |
required | false |
type | Integer |
default | 4567 |
example |
|
user | |
---|---|
description | The username required to connect to the API. |
required | false |
depends | password |
type | String |
default | none |
example |
|
password | |
---|---|
description | The password required to connect to the API. |
required | false |
depends | user |
type | String |
default | none |
example |
|