Health monitoring
Configuration settings for monitoring the utilization of SPS.
URL
GET https://<IP-address-of-SPS>/api/configuration/management/health_monitoring
Sample request
The following command lists health monitoring settings.
curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/management/health_monitoring
Response
The following is a sample response received when listing health monitoring settings.
{
"body": {
"maximum_disk_utilization_ratio": 80,
"maximum_load1": null,
"maximum_load15": null,
"maximum_load5": null,
"maximum_swap_utilization_ratio": 70
},
"key": "health_monitoring",
"meta": {
"first": "/api/configuration/management/certificates",
"href": "/api/configuration/management/health_monitoring",
"last": "/api/configuration/management/webinterface",
"next": "/api/configuration/management/snmp",
"parent": "/api/configuration/management",
"previous": "/api/configuration/management/email",
"transaction": "/api/transaction"
}
}
key |
|
string |
Top level element, contains the ID of the endpoint. |
body |
|
Top level element (string) |
Contains health monitoring settings. |
|
maximum_disk_utilization_ratio |
int |
The highest allowed value for disk utilization (in %). |
|
maximum_load1 |
int |
Average maximum for load for 1 minute. |
|
maximum_load15 |
int |
Average maximum load for 15 minutes. |
|
maximum_load5 |
int |
Average maximum load for 5 minutes. |
|
maximum_swap_utilization_ratio |
int |
The highest allowed value for swap utilization (in %). |
Modify health monitoring settings
To modify health monitoring settings, you have to:
-
Modify the JSON object of the endpoint.
PUT the modified JSON object to the https://<IP-address-of-SPS>/api/configuration/management/health_monitoring endpoint.You can find a detailed description of the available parameters listed in Element .
201 |
Created |
The new resource was successfully created. |
401 |
Unauthenticated |
The requested resource cannot be retrieved because the client is not authenticated and the resource requires authorization to access it. The details section contains the path that was attempted to be accessed, but could not be retrieved. |
403 |
Unauthorized |
The requested resource cannot be retrieved because the client is not authorized to access it. The details section contains the path that was attempted to be accessed, but could not be retrieved. |
404 |
NotFound |
The requested object does not exist. |
SNMP settings
Contains the configuration endpoints for SNMP settings.
URL
GET https://<IP-address-of-SPS>/api/configuration/management/snmp
Sample request
The following command lists the endpoints for SNMP configuration settings.
curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/management/snmp
Response
The following is a sample response received when listing SNMP configuration endpoints.
{
"items": [
{
"key": "trap",
"meta": {
"href": "/api/configuration/management/snmp/trap"
}
}
],
"meta": {
"first": "/api/configuration/management/certificates",
"href": "/api/configuration/management/snmp",
"last": "/api/configuration/management/webinterface",
"next": "/api/configuration/management/splunk_forwarder",
"parent": "/api/configuration/management",
"previous": "/api/configuration/management/health_monitoring",
"transaction": "/api/transaction"
}
}
trap |
Configuration settings for SNMP traps. |
401 |
Unauthenticated |
The requested resource cannot be retrieved because the client is not authenticated and the resource requires authorization to access it. The details section contains the path that was attempted to be accessed, but could not be retrieved. |
403 |
Unauthorized |
The requested resource cannot be retrieved because the client is not authorized to access it. The details section contains the path that was attempted to be accessed, but could not be retrieved. |
404 |
NotFound |
The requested object does not exist. |
SNMP traps
Configuration settings for the address and protocol of the SNMP server.
URL
GET https://<IP-address-of-SPS>/api/configuration/management/snmp/trap
Sample request
The following command lists the configuration of the SNMP server.
curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/management/snmp/trap
Response
The following is a sample response received when listing the address and protocol settings of the SNMP server.
{
"body": {
"enabled": true,
"version": {
"selection": "2c",
"value": {
"community": "public",
"server": {
"selection": "ip",
"value": "10.20.30.40"
}
}
}
},
"key": "trap",
"meta": {
"first": "/api/configuration/management/snmp/trap",
"href": "/api/configuration/management/snmp/trap",
"last": "/api/configuration/management/snmp/trap",
"next": null,
"parent": "/api/configuration/management/snmp",
"previous": null,
"transaction": "/api/transaction"
}
}
key |
|
string |
Top level element, contains the ID of the endpoint. |
body |
|
Top level element (string) |
Contains the address and protocol settings of the SNMP server. |
|
enabled |
boolean |
Set to true to send alerts to an SNMP server. |
|
version |
Top level item |
Contains the configuration settings for the server address, and the SNMP protocol. |
selection |
|
|
string |
Defines the SNMP protocol to use. Possible values are:
|
value |
|
|
Top level item |
Contains the SNMP server address, and the protocol-specific settings. |
|
auth_method |
|
string |
Required parameter when using SNMP version 3. Configures encrypted communication with the SNMP server. Possible values are:
|
|
auth_password |
|
string |
Required parameter when using SNMP version 3. References the password used for authenticating to the SNMP server. You can create passwords at the /api/configuration/passwords/ endpoint.
To modify or add a password, use the value of the returned key as the value of the password element, and remove any child elements (including the key).
The referenced password must be at least 8 characters long, and can contain letters (a-z, A-Z), numbers (0-9) the special characters (!"#$%&'()*+,;<=&@[\]^`{|}_./:?-) and the space character. |
|
community |
|
string |
Must be used if version 2c of the SNMP protocol is configured.
The name of the SNMP community. |
|
encryption_method |
|
string |
Must be used if version 3 of the SNMP protocol is configured.
Configures encrypted communication with the SNMP server. Possible values are:
-
none: No encryption. The value of the encryption_password element must also be set to null.
-
aes: AES encryption. The encryption_password element must reference a valid password.
-
des: DES encryption. The encryption_password element must reference a valid password. |
|
encryption_password |
|
string |
Must be used if version 3 of the SNMP protocol is configured.
Set to null if the value of the encryption_method is set to none.
References the password used for encrypting the communication with the SNMP server. You can create passwords at the /api/configuration/passwords/ endpoint.
To modify or add a password, use the value of the returned key as the value of the x509_identity element, and remove any child elements (including the key).
The referenced password must be at least 8 characters long, and can contain letters (a-z, A-Z), numbers (0-9) the special characters (!"#$%&'()*+,;<=&@[\]^`{|}_./:?-) and the space character. |
|
engine_id |
|
string |
Must be used if version 3 of the SNMP protocol is configured.
The Engine ID. Must be a a hexadecimal number at least 10 digits long (for example, 0x0123456789ABCDEF). |
|
server |
|
top level item |
Contains the IP address of FQDN of the SNMP server. |
|
|
selection |
string |
Defines the address type (IP or domain name). Possible values are:
|
|
|
value |
string |
The address of the SNMP server. |
|
username |
|
string |
Must be used if version 3 of the SNMP protocol is configured.
The username for sending SNMP traps. |
Examples:
Configure a server with the SNMP v2c protcol.
{
"enabled": true,
"version": {
"selection": "2c",
"value": {
"community": "public",
"server": {
"selection": "ip",
"value": "<server-ip>"
}
}
}
}
Configure a server with the SNMP v3 protocol, and MD5 authentication.
{
"enabled": true,
"version": {
"selection": "3",
"value": {
"auth_method": "md5",
"auth_password": {
"key": "d21f3675-8dff-43c5-a982-17839390a6b3",
"meta": {
"href": "/api/configuration/passwords/d21f3675-8dff-43c5-a982-17839390a6b3"
}
},
"encryption_method": "none",
"encryption_password": null,
"engine_id": "<0x0123456789ABCDEF>",
"server": {
"selection": "ip",
"value": "<server-ip>"
},
"username": "<username>"
}
}
}
Configure a server with the SNMP v3 protocol, SHA1 authentication, and AES-encrypted communication.
{
"enabled": true,
"version": {
"selection": "3",
"value": {
"auth_method": "sha",
"auth_password": {
"key": "0f5f646d-d6e7-4a4a-bc66-ead670faff3f",
"meta": {
"href": "/api/configuration/passwords/0f5f646d-d6e7-4a4a-bc66-ead670faff3f"
}
},
"encryption_method": "aes",
"encryption_password": {
"key": "6237d67a-b6b4-49e0-b0f6-6d68d0f08cc3",
"meta": {
"href": "/api/configuration/passwords/6237d67a-b6b4-49e0-b0f6-6d68d0f08cc3"
}
},
"engine_id": "<0x0123456789ABCDEF>",
"server": {
"selection": "ip",
"value": "<server-ip>"
},
"username": "<username>"
}
}
}
Modify SNMP trap settings
To modify the address and protocol settings for the SNMP server, you have to:
-
Modify the JSON object of the SNMP trap endpoint.
PUT the modified JSON object to the https://<IP-address-of-SPS>/api/configuration/management/snmp/trap endpoint. You can find a detailed description of the available parameters listed in Element .
201 |
Created |
The new resource was successfully created. |
401 |
Unauthenticated |
The requested resource cannot be retrieved because the client is not authenticated and the resource requires authorization to access it. The details section contains the path that was attempted to be accessed, but could not be retrieved. |
403 |
Unauthorized |
The requested resource cannot be retrieved because the client is not authorized to access it. The details section contains the path that was attempted to be accessed, but could not be retrieved. |
404 |
NotFound |
The requested object does not exist. |
Local services: access for SNMP agents
External SNMP agents can query the basic status information of SPS. On this endpoint you can configure on which interfaces can the users access SPS, and optionally restrict the access to these interfaces, and configure authentication and encryption settings.
URL
GET https://<IP-address-of-SPS>/api/configuration/local_services/snmp_agent
Sample request
The following command lists the configuration options.
curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/local_services/snmp_agent
Response
The following is a sample response received when listing the configuration options.
{
"body": {
"access_restriction": {
"enabled": false
},
"enabled": true,
"listen": [
{
"address": {
"key": "nic1.interfaces.ff7574025754b3df1647001.addresses.1",
"meta": {
"href": "/api/configuration/network/nics/nic1#interfaces/ff7574025754b3df1647001/addresses/1"
}
},
"port": 161
}
],
"system_contact": "mycontact",
"system_description": "mydescription",
"system_location": "mylocation",
"version_2c": {
"community": "mycommunity",
"enabled": true
},
"version_3": {
"enabled": true,
"users": [
{
"auth_method": "sha",
"auth_password": {
"key": "5476940c-ba38-4002-96d4-cb09d6921c68",
"meta": {
"href": "/api/configuration/passwords/5476940c-ba38-4002-96d4-cb09d6921c68"
}
},
"encryption_method": "aes",
"encryption_password": {
"key": "99782a91-63de-4a5c-82ff-b82273894dc7",
"meta": {
"href": "/api/configuration/passwords/99782a91-63de-4a5c-82ff-b82273894dc7"
}
},
"username": "myusername"
}
]
}
},
"key": "snmp_agent",
"meta": {
"first": "/api/configuration/local_services/admin_web",
"href": "/api/configuration/local_services/snmp_agent",
"last": "/api/configuration/local_services/user_web",
"next": "/api/configuration/local_services/ssh",
"parent": "/api/configuration/local_services",
"previous": "/api/configuration/local_services/postgresql",
"transaction": "/api/transaction"
}
}
key |
|
|
string |
Top level element, contains the ID of the endpoint. |
body |
|
|
Top level element (string) |
Contains the configuration options of the SNMP agent. |
|
access_restriction |
|
JSON object |
Enables and configures limitations on the clients that can access the web interface, based on the IP address of the clients. |
|
|
allowed_from |
list |
The list of IP networks from where the administrators are permitted to access this management interface. To specify the IP addresses or networks, use the IPv4-Address/prefix format, for example, 10.40.0.0/16. |
|
|
enabled |
boolean |
Set it to true to restrict access to the specified client addresses. |
|
enabled |
|
boolean |
Enables the SNMP server. If this option is set to False, SPS ignores every other option of this endpoint. |
|
listen |
|
list |
Selects the network interface, IP address, and port where the clients can access the web interface. |
|
|
address |
JSON object |
A reference to a configured network interface and IP address where this local service accepts connections. For example, if querying the interface /api/configuration/network/nics/nic1#interfaces/ff7574025754b3df1647001/addresses/ returns the following response: {
"body": {
"interfaces": {
"@order": [
"ff7574025754b3df1647001"
],
"ff7574025754b3df1647001": {
"addresses": {
"1": "10.40.255.171/24",
"@order": [
"1"
]
},
"name": "default",
"vlantag": 0
}
},
"name": "eth0",
"speed": "auto"
},
"key": "nic1",
"meta": {
"first": "/api/configuration/network/nics/nic1",
"href": "/api/configuration/network/nics/nic1",
"last": "/api/configuration/network/nics/nic3",
"next": "/api/configuration/network/nics/nic2",
"parent": "/api/configuration/network/nics",
"previous": null,
"transaction": "/api/transaction"
}
}
Then the listening address of the local service is the following. nic1.interfaces.ff7574025754b3df1647001.addresses.1
This is the format you have to use when configuring the address of the local service using REST: "address": "nic1.interfaces.ff7574025754b3df1647001.addresses.1"
When querying a local services endpoint, the response will contain a reference to the IP address of the interface in the following format: "address": {
"key": "nic1.interfaces.ff7574025754b3df1647001.addresses.1",
"meta": {
"href": "/api/configuration/network/nics/nic1#interfaces/ff7574025754b3df1647001/addresses/1"
}
}, |
|
|
port |
integer |
The port number where this local service accepts connections. |
|
system_contact |
|
string |
Optional. For example, it can contain the contact information of the SPS administrator. |
|
system_description |
|
string |
Optional. For example, it can contain information of the SPS host. |
|
system_description |
|
string |
Optional. For example, it can contain the location of the SPS appliance. |
|
version_2c |
|
JSON object |
Enables and configures SNMP queries using the SNMP v2c protocol. You can have both the SNMP v2c and v3 protocols enabled at the same time. For example: "version_2c": {
"community": "mycommunity",
"enabled": true
}, |
|
|
community |
string |
Optional. Specifies the community to use. |
|
|
enabled |
boolean |
Optional. Enables SNMP queries using the SNMP v2c protocol. |
|
version_3 |
|
JSON object |
Enables and configures SNMP queries using the SNMP v3 protocol. You can have both the SNMP v2c and v3 protocols enabled at the same time. You must configure an authentication method and a password, encryption is optional. For example: "version_3": {
"enabled": true,
"users": [
{
"auth_method": "sha",
"auth_password": {
"key": "5476940c-ba38-4002-96d4-cb09d6921c68",
"meta": {
"href": "/api/configuration/passwords/5476940c-ba38-4002-96d4-cb09d6921c68"
}
},
"encryption_method": "aes",
"encryption_password": {
"key": "99782a91-63de-4a5c-82ff-b82273894dc7",
"meta": {
"href": "/api/configuration/passwords/99782a91-63de-4a5c-82ff-b82273894dc7"
}
},
"username": "myusername"
}
]
} |
enabled |
|
boolean |
Optional. Enables SNMP queries using the SNMP v2c protocol. |
users |
|
JSON object |
Contains the configuration parameters for the SNMP v3 protocol. |
|
auth_method |
string |
Required parameter when using SNMP version 3. Configures encrypted communication with the SNMP server. Possible values are:
|
|
auth_password |
string |
Required parameter when using SNMP version 3. References the password used for authenticating to the SNMP server. You can create passwords at the /api/configuration/passwords/ endpoint.
To modify or add a password, use the value of the returned key as the value of the x509_identity element, and remove any child elements (including the key).
The referenced password must be at least 8 characters long, and can contain letters (a-z, A-Z), numbers (0-9) the special characters (!"#$%&'()*+,;<=&@[\]^`{|}_./:?-) and the space character. |
|
encryption_method |
string |
Configures encrypted communication with the SNMP server. Possible values are:
-
none: No encryption. The value of the encryption_password element must also be set to null.
-
aes: AES encryption. The encryption_password element must reference a valid password.
-
des: DES encryption. The encryption_password element must reference a valid password. |
|
encryption_password |
string |
Set to null if the value of the encryption_method is set to none.
References the password used for encrypting the communication with the SNMP server. You can create passwords at the /api/configuration/passwords/ endpoint.
To modify or add a password, use the value of the returned key as the value of the x509_identity element, and remove any child elements (including the key).
The referenced password must be at least 8 characters long, and can contain letters (a-z, A-Z), numbers (0-9) the special characters (!"#$%&'()*+,;<=&@[\]^`{|}_./:?-) and the space character. |
|
username |
string |
The username for sending SNMP traps. |
401 |
Unauthenticated |
The requested resource cannot be retrieved because the client is not authenticated and the resource requires authorization to access it. The details section contains the path that was attempted to be accessed, but could not be retrieved. |
403 |
Unauthorized |
The requested resource cannot be retrieved because the client is not authorized to access it. The details section contains the path that was attempted to be accessed, but could not be retrieved. |
404 |
NotFound |
The requested object does not exist. |