Viewing SNMP status by using REST Administration APIs
System administrators can view the status of SNMP on IBM® Watson IoT Platform - Message Gateway by using REST Administration APIs.
About this task
You can view SNMP status by using REST Administration APIs, or by using the IBM Watson IoT Platform - Message Gateway Web UI. For more information about using the IBM Watson IoT Platform - Message Gateway Web UI to view SNMP status, see Configuring SNMP by using the IBM Watson IoT Platform - Message Gateway Web UI.
Procedure
- To check the status of the SNMP service, use the IBM Watson IoT Platform - Message
Gateway REST API GET method with the following IBM Watson IoT Platform - Message
Gateway service URI:
http://<admin-endpoint-IP:Port>/ima/v1/service/status/SNMP
Note: The status of the SNMP service is also returned as part of the data that is returned from the IBM Watson IoT Platform - Message Gateway REST API GET method with the following URI:http://<admin-endpoint-IP:Port>/ima/v1/service/status
Results
- Status
- The status of the SNMP service. Possible values, and their meanings, are:
- Active
- SNMP is running.
- Inactive
- SNMP is not running.
- Enabled
- Whether SNMP is enabled. You can enable and disable SNMP by setting the SNMPEnabled configuration object. For more information, see Configuring SNMP. Possible values, and their meanings, are:
- true
- SNMP is enabled.
- false
- SNMP is not enabled.
If the status is Inactive
but SNMP is enabled, there might be a problem that is preventing SNMP from running. After you have resolved the problem, you can enable SNMP. For more information about enabling SNMP, see Enabling and disabling SNMP by using REST Administration APIs.
Example
curl -X GET http://127.0.0.1:9089/ima/v1/service/status/SNMP
An example response to the GET method:
{
"Version": "v1",
"SNMP": {
"Status": "Active",
"Enabled": true
}
}