snmp

Summary

Resource Operation Description
SNMP PUT /api/app/v1/snmp/(s_type)/(status) Set SNMP status
  PUT /api/app/v1/snmp/(snmp_mon_trap) Set SNMP configuration
  GET /api/app/v1/snmp/events Show SNMP trap list
  PUT /api/app/v1/snmp/events/load Load SNMP events
  PUT /api/app/v1/snmp/events/save Save SNMP config
  PUT /api/app/v1/snmp/mib/save Save SNMP MIB file
  GET /api/app/v1/snmp/monitor Show SNMP monitor config
  GET /api/app/v1/snmp/trap Show SNMP trap config
  GET /api/app/v1/snmp/trap/backup Send backup trap
  GET /api/app/v1/snmp/trap/test Send test trap
  GET /api/app/v1/snmp/update Update snmp configuration

Details

PUT /api/app/v1/snmp/(s_type)/(status)

Enable/disable SNMP monitor or trap.

New in version 1.0.

Parameters:
  • s_type (required) – Type to act upon (monitor, trap)
  • status (required) – (enabled or disabled)
Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Enable SNMP monitoring:

PUT /api/app/v1/snmp/monitor/enabled HTTP/1.1
Accept: text/html

Example 1 - Response: Enable SNMP monitoring:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "Status": "Success"
}

Example 2 - Request: Disable SNMP monitoring:

PUT /api/app/v1/snmp/monitor/disabled HTTP/1.1
Accept: text/html

Example 2 - Response: Disable SNMP monitoring:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "Status": "Success"
}

Example 3 - Request: Enable SNMP traps:

PUT /api/app/v1/snmp/trap/enabled HTTP/1.1
Accept: text/html

Example 3 - Response: Enable SNMP traps:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "Status": "Success"
}

Example 4 - Request: Enable SNMP monitor before configuring SNMP monitoring:

PUT /api/app/v1/snmp/monitor/enabled HTTP/1.1
Accept: text/html

Example 4 - Response: Enable SNMP monitor before configuring SNMP monitoring:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "Reason": "Required SNMP type not specified",
    "Status": "Failure"
}
PUT /api/app/v1/snmp/(snmp_mon_trap)

Set the SNMP configuration.

New in version 1.0.

Note

Some parameters are required for certain versions of SNMP or if you are configuring monitor vs. trap. To know which parameters are required per version consult with the SNMP documentation.

Parameters:
  • snmp_mon_trap (required) – Type to act upon (monitor, trap)
Query Parameters:
 
  • type – Type/version of SNMP to set (v1, v2c, v3)
  • community – Community name, length(4 < name < 64), no spaces allowed
  • ip – IP address of the server to send SNMP data to
  • ip – Port on the server to connect to
  • authentication – Authentication for the server
  • encrypt – Type of encryption to use ex: (None, des)
  • security_level – SNMP v3 security level
  • user – Username for authentication
Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Set basic SNMP v1:

PUT /api/app/v1/snmp/monitor\?type\=v1\&community\=mysnmp HTTP/1.1
Accept: text/html

Example 1 - Response: Set basic SNMP v1:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "Status": "Success"
}

Example 2 - Request: Set SNMP v3 with authPriv security level:

PUT /api/app/v1/snmp/monitor?type=v3&username=tsnmpser&securitylevel=authPriv&encrypt=des&&encrypt_key=mypassword&authentication=md5&password=mypassword HTTP/1.1
Accept: text/html

Example 2 - Response: Set SNMP v3 with authPriv security level:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "Status": "Success"
}
GET /api/app/v1/snmp/events

Show SNMP trap event lists for appliance or module.

New in version 1.0.

Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin, audit

Example 1 - Request: Get SNMP event list:

GET /api/app/v1/snmp/events HTTP/1.1
Accept: text/html

Example 1 - Response: Get SNMP event list:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "app": [
      {
         "class": "System resource",
         "clear_capable": "yes",
         "description": "CPU usage",
         "enabled": "yes",
         "interval": "60",
         "name": "CPU usage",
         "oid": "cpuMaxUsageExceed",
         "subclass": "system",
         "threshold1": {
            "current": "90",
            "default": "90",
            "description": "Exceeds",
            "name": "extremum",
            "range": "95,90,80,70,60,50;;%",
            "settable": "yes"
         },
         "threshold2": {
            "current": "1",
            "default": "1",
            "description": "for",
            "name": "duration",
            "range": "1,2,5,10,15,20;; min",
            "settable": "yes"
         }
      }
    ]
}
PUT /api/app/v1/snmp/events/load

Load SNMP trap events from filestore server.

Note

The file must be yaml formatted.

New in version 1.0.

Query Parameters:
 
  • location (required) – Configured filestore alias
  • file (required) – File on the filestore containing SNMP events
Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Load SNMP trap events from filestore:

PUT /api/app/v1/snmp/events/load?location=<ALIAS>&file=<FILENAME> HTTP/1.1
Accept: text/html

Example 1 - Response: Load SNMP trap events from filestore:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "Status": "Success"
}
PUT /api/app/v1/snmp/events/save

Save SNMP trap events to filestore server for editing or later use.

New in version 1.0.

Query Parameters:
 
  • location (required) – Configured filestore alias
  • default (required) – Save default traps (yes, no)
Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Save SNMP config to a filestore:

PUT /api/app/v1/snmp/events/save?location=<ALIAS>&default=yes HTTP/1.1
Accept: text/html

Example 1 - Response: Save SNMP config to a filestore:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "Info": "'Trap_mason67_default.yml' has been saved to ftp://anonymous@10.206.6.131/."
}

Example 2 - Request: Save SNMP config to a url:

PUT /api/app/v1/snmp/events/save?url=ftp://ftp_trap:Firewall1_trap@10.206.6.87&&default=no HTTP/1.1
Accept: text/html

Example 2 - Response: Save SNMP config to a filestore:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "Info": "'Trap_latest-email-85_20180509154905.yml' has been saved to ftp://ftp_trap@10.206.6.87/"
}
PUT /api/app/v1/snmp/mib/save

Save SNMP trap events to filestore server.

New in version 1.0.

Query Parameters:
 
  • location (optional) – Filestore alias
  • url (optional) – URL of storage location
Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Save SNMP MIB to filestore:

PUT /api/app/v1/snmp/mib/save?location=<ALIAS> HTTP/1.1
Accept: text/html

Example 1 - Response: Save SNMP MIB to filestore:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "Info": "'WBSN-APPLIANCE-MIB.txt' has been saved to ftp://filestore@192.168.1.100/."
}
GET /api/app/v1/snmp/monitor

Get SNMP monitor config.

New in version 1.0.

Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin, audit

Example 1 - Request: Get SNMP monitor config:

GET /api/app/v1/snmp/monitor HTTP/1.1
Accept: text/html

Example 1 - Response: Get SNMP monitor config:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "authentication": "SHA",
  "community": "public",
  "encrypt": "AES",
  "encrypt_key": "************",
  "password": "********",
  "securitylevel": "authPriv",
  "status": "disabled",
  "type": "v3",
  "username": "snmpUser"
}

Example 2 - Request: Get SNMP monitor config before SNMP monitor configuration:

GET /api/app/v1/snmp/monitor HTTP/1.1
Accept: text/html

Example 2 - Response: Get SNMP monitor config before SNMP monitor configuration:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "status": "disabled"
}
GET /api/app/v1/snmp/trap

Get SNMP trap config.

New in version 1.0.

Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin, audit

Example 1 - Request: Get SNMP trap config:

GET /api/app/v1/snmp/trap HTTP/1.1
Accept: text/html

Example 1 - Response: Get SNMP trap config:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "community": "pupblic",
  "ip_address": "10.206.6.89",
  "port": "162",
  "status": "enabled",
  "type": "v2c"
}

Example 2 - Request: Get SNMP trap config before SNMP trap configuration:

GET /api/app/v1/snmp/trap HTTP/1.1
Accept: text/html

Example 2 - Response: Get SNMP trap config before SNMP trap configuration:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "status": "disabled"
}
GET /api/app/v1/snmp/trap/backup

Send a backup trap to configured SNMP trap recipient.

Note

Use primarily by FSAM

New in version 1.0.

Response Headers:
 
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Send backup trap:

GET /api/app/v1/snmp/trap/backup HTTP/1.1
Accept: text/html

Example 1 - Response: Send backup trap:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "Status": "Success"
}
GET /api/app/v1/snmp/trap/test

Send a test trap to configured SNMP trap recipient.

New in version 1.0.

Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Send a test SNMP trap:

GET /api/app/v1/snmp/trap/test HTTP/1.1
Accept: text/html

Example 1 - Response: Send a test SNMP trap:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "Status": "Success"
}
GET /api/app/v1/snmp/update

Update various aspects of SNMP configuration

New in version 1.0.

Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Update monitored module list:

GET /api/app/v1/snmp/update?trap_params=module_list HTTP/1.1
Accept: text/html

Example 1 - Response: Send a test SNMP trap:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "Status": "Success"
}