Through the Internet Protocol SNMP

The following queries are used for management:

addtrap - add SNMP notification. Extra options are:

  • k - user session ID;
  • id - SNMP notification ID, if there is no identifier, a new notification is created, otherwise the existing one is edited;
  • name - name of SNMP notification, length is not more than 63 characters;
  • server - SNMP server, no more than 127 characters;
  • port - the SNMP service port on the server;
  • version - version of SNMP, possible values ​​- 1, 2c, 3;
  • comunity - SNMP community (for version 1, 2c), the length is not more than 31 characters;
  • user - user name (for version 3), length is not more than 63 characters;
  • level - security level (for version 3), possible values:
    • noauth - without authorization and encryption;
    • auth - only authorization;
    • priv - authorization and encryption;
  • auth_type - type of authorization (for version 3), possible values ​​are MD5, SHA;
  • auth_pass - authorization password (for version 3), length is not more than 63 characters;
  • priv_type - type of encryption (for version 3), possible values ​​- DES, AES;
  • priv_pass - encryption password (for version 3), length is not more than 63 characters;
  • message - message text template, no more than 1023 characters in length; can be left empty, then the default text is used;
  • severity - severity level of the message (default warning):
    • emergency - system is unusable;
    • alert - action must be taken immediately;
    • critical - critical conditions;
    • error - error conditions;
    • warning - warning conditions;
    • notice - normal but significant condition;
    • informational - informational messages;
    • debug - debug-level messages.


If a new element is successfully created, the response contains the element identifier, and looks like:

<error type="no error" id="602001" />

When creating a new notification (id is not specified), the parameters - name, server, port, version are mandatory, other parameters are specified depending on the configuration of the version of SNMP (version) and the level of security (level). If you change the sensitive parameters (version and level), you must explicitly specify the dependent parameters, while the unused parameters will be erased (for example, if version=3 and level=auth, unused comunity, priv_type and priv_pass parameters will be erased). Empty parameters imply erasing a previously assigned value, except for the parameters - name, server, port, version, for which empty fields are not allowed.


deltrap - delete the notification by SNMP. Required parameters are:

  • k - user session ID;
  • id - SNMP notification identifier.


testmessage - send a test message, without creating a new element. Extra options:

  • k - user session ID;
  • type - type of test notification (trap);
  • name - name of SNMP notification, length is not more than 63 characters;
  • server - SNMP server, no more than 127 characters;
  • port - the SNMP service port on the server;
  • version - version of SNMP, possible values ​​- 1, 2c, 3;
  • comunity - SNMP community (for version 1, 2c), the length is not more than 31 characters;
  • user - user name (for version 3), length is not more than 63 characters;
  • level - security level (for version 3), possible values are:
    • noauth - without authorization and encryption;
    • auth - only authorization;
    • priv - authorization and encryption;
  • auth_type - type of authorization (for version 3), possible values ​​are MD5, SHA;
  • auth_pass - authorization password (for version 3), length is not more than 63 characters;
  • priv_type - type of encryption (for version 3), possible values ​​- DES, AES;
  • priv_pass - encryption password (for version 3), length is not more than 63 characters;
  • message - message text template, no more than 1023 characters in length; can be left empty, then the default text is used;
  • severity - severity level of the message.


getelement - read the element. Required parameters are:

  • k - user session ID;
  • id - element ID.

The response contains information about the element:

<element id="602001" module="2004" num="1" clas="notifier" type="snmp trap" name="my_trap" state="off" server="192.168.0.55" port="162" 
version="3" comunity="" user="admin" level="auth" auth_type="SHA"
auth_pass="somepass" priv_type="" priv_pass=""
message="Time: %3 Logic: %4, Element: %5, in state
: %6, value: %7" severity="warning" />