System administrators can enable and disable SNMP on IBM® Watson IoT Platform - Message
Gateway by using REST Administration APIs.
About this task
You can enable and disable SNMP 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 enable and disable SNMP, see Configuring SNMP by using the IBM Watson IoT Platform - Message Gateway Web UI.Note: The commands must be capitalized as shown.
Procedure
-
Check whether SNMP is enabled by using the IBM Watson IoT Platform - Message
Gateway REST API GET method with
the following IBM Watson IoT Platform - Message
Gateway
configuration URI:
http://<admin-endpoint-IP:Port>/ima/v1/configuration/SNMPEnabled
- If the status of SNMP is
false
, SNMP is disabled.
- If the status of SNMP is
true
, SNMP is enabled.
- Choose an appropriate action:
- Enable SNMP, by using the IBM Watson IoT Platform - Message
Gateway REST API POST
method. The following example shows how to enable SNMP by using
cURL:
curl -X POST \
-H 'Content-Type: application/json' \
-d '{
"SNMPEnabled": true
}
' \
http://127.0.0.1:9089/ima/v1/configuration
- To disable SNMP, use the IBM Watson IoT Platform - Message
Gateway REST API POST
method. The following example shows how to disable SNMP by using
cURL:
curl -X POST \
-H 'Content-Type: application/json' \
-d '{
"SNMPEnabled": false
}
' \
http://127.0.0.1:9089/ima/v1/configuration