No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

RESTful API Reference

CloudEngine 12800 and 12800E V200R005C10

This document describes the OPS APIs supported by the device, including OPS-supported operations, request examples, elements in the requests, response examples, elements in the responses, and response status codes.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Query SNMP Statistics

Query SNMP Statistics

Operation

URI

Description

GET

/snmp/snmpStats

Query SNMP statistics.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?>
    <snmpStats>
        <inPkts/>
        <outPkts/>
        <inBadVersions/>
        <inBadCommuintyNames/>
        <inBadCommunityUsesr/>
        <inASNParseErrs/>
        <inTooBigs/>
        <inNoSuchNames/>
        <inBadValues/>
        <inRead/>
        <inGenErrs/>
        <inTotalReqVars/>
        <inTotalSetVars/>
        <inGetRequests/>
        <inGetNexts/>
        <inSetRequests/>
        <inGetResponses/>
        <inTraps/>
        <outTooBigs/>
        <outNoSuchNames/>
        <outBadValues/>
        <outGenErrs/>
        <outGetRequests/>
        <outGetNexts/>
        <outSetRequests/>
        <outGetResponses/>
        <outTraps/>
        <silentDrops/>
        <inGetBulks/>
        <outGetBulks/>
        <inInforms/>
        <inProxyPkts/>
        <proxyDrops/>
    </snmpStats>

    Table 16-114 describes elements in requests.

    Table 16-114 Elements

    Element

    Description

    inPkts

    Specifies the number of received packets.

    outPkts

    Specifies the number of sent packets.

    inBadVersions

    Specifies the number of received packets with incorrect protocol versions.

    inBadCommuintyNames

    Specifies the number of received packets with unknown community names.

    inBadCommunityUsesr

    Specifies the number of received packets for which community names do not support operation types.

    inASNParseErrs

    Specifies the number of ASN.1 and BER errors in packet parsing.

    inTooBigs

    Specifies the number of received packets for which the error-status field is set to tooBig.

    inNoSuchNames

    Specifies the number of received packets for which the error-status field is set to noSuchName.

    inBadValues

    Specifies the number of received packets for which the error-status field is set to badValue.

    inReadOnlys

    Specifies the number of received packets for which the error-status field is set to readOnly.

    inGenErrs

    Specifies the number of received packets for which the error-status field is set to genErr.

    inTotalReqVars

    Specifies the number of MIB objects that are successfully searched out based on the valid Get-Request and Get-next packets received.

    inTotalSetVars

    Specifies the number of MIB objects that are successfully modified based on the valid Set-Request packets received.

    inGetRequests

    Specifies the number of received and processed Get-Request packets.

    inGetNexts

    Specifies the number of received and processed Get-Next packets.

    inSetRequests

    Specifies the number of received and processed Set-Request packets.

    inGetResponses

    Specifies the number of received and processed Get-Response packets.

    inTraps

    Specifies the number of received and processed trap packets.

    outTooBigs

    Specifies the number of sent packets for which the error-status field is set to tooBig.

    outNoSuchNames

    Specifies the number of sent packets for which the error-status field is set to noSuchName.

    outBadValues

    Specifies the number of sent packets for which the error-status field is set to badValue.

    outGenErrs

    Specifies the number of sent packets for which the error-status field is set to genErr.

    outGetRequests

    Specifies the number of sent Get-Request packets.

    outGetNexts

    Specifies the number of sent Get-Next packets.

    outSetRequests

    Specifies the number of sent Set-Request packets.

    outGetResponses

    Specifies the number of sent Get-Response packets.

    outTraps

    Specifies the number of sent trap packets.

    silentDrops

    Specifies the number of packets that are dropped because the packets carry an empty variable-bindings field or the packet length does not meet local restrictions or exceeds the maximum length supported by the receive end of request packets.

    inGetBulks

    Specifies the number of received and processed GetBulk packets.

    outGetBulks

    Specifies the number of sent GetBulk-Request packets.

    inInforms

    Specifies the number of received and processed Inform packets.

    inProxyPkts

    Specifies the number of packets delivered to the SNMP proxy.

    proxyDrops

    Specifies the number of request packets that are dropped when the SNMP proxy fails to forward the packets to the target host.

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?>
    <snmpStats>
        <inPkts>698</inPkts>
        <outPkts>696</outPkts>
        <inBadVersions>0</inBadVersions>
        <inBadCommuintyNames>2</inBadCommuintyNames>
        <inBadCommunityUsesr>0</inBadCommunityUsesr>
        <inASNParseErrs>0</inASNParseErrs>
        <inTooBigs>0</inTooBigs>
        <inNoSuchNames>0</inNoSuchNames>
        <inBadValues>0</inBadValues>
        <inReadOnlys>0</inReadOnlys>
        <inGenErrs>0</inGenErrs>
        <inTotalReqVars>759</inTotalReqVars>
        <inTotalSetVars>0</inTotalSetVars>
        <inGetRequests>632</inGetRequests>
        <inGetNexts>64</inGetNexts>
        <inSetRequests>0</inSetRequests>
        <inGetResponses>0</inGetResponses>
        <inTraps>0</inTraps>
        <outTooBigs>0</outTooBigs>
        <outNoSuchNames>0</outNoSuchNames>
        <outBadValues>0</outBadValues>
        <outGenErrs>0</outGenErrs>
        <outGetRequests>0</outGetRequests>
        <outGetNexts>0</outGetNexts>
        <outSetRequests>0</outSetRequests>
        <outGetResponses>696</outGetResponses>
        <outTraps>0</outTrap
        <silentDrops>0</silentDrops>
        <inGetBulks>0</inGetBulks>
        <outGetBulks>0</outGetBulks>
        <inInforms>0</inInforms>
        <inProxyPkts>0</inProxyPkts>
        <proxyDrops>0</proxyDrops>
    </snmpStats>

    Table 16-115 describes elements in responses.

    Table 16-115 Elements

    Element

    Description

    inPkts

    Specifies the number of received packets.

    outPkts

    Specifies the number of sent packets.

    inBadVersions

    Specifies the number of received packets with incorrect protocol versions.

    inBadCommuintyNames

    Specifies the number of received packets with unknown community names.

    inBadCommunityUsesr

    Specifies the number of received packets for which community names do not support operation types.

    inASNParseErrs

    Specifies the number of ASN.1 and BER errors in packet parsing.

    inTooBigs

    Specifies the number of received packets for which the error-status field is set to tooBig.

    inNoSuchNames

    Specifies the number of received packets for which the error-status field is set to noSuchName.

    inBadValues

    Specifies the number of received packets for which the error-status field is set to badValue.

    inReadOnlys

    Specifies the number of received packets for which the error-status field is set to readOnly.

    inGenErrs

    Specifies the number of received packets for which the error-status field is set to genErr.

    inTotalReqVars

    Specifies the number of MIB objects that are successfully searched out based on the valid Get-Request and Get-next packets received.

    inTotalSetVars

    Specifies the number of MIB objects that are successfully modified based on the valid Set-Request packets received.

    inGetRequests

    Specifies the number of received and processed Get-Request packets.

    inGetNexts

    Specifies the number of received and processed Get-Next packets.

    inSetRequests

    Specifies the number of received and processed Set-Request packets.

    inGetResponses

    Specifies the number of received and processed Get-Response packets.

    inTraps

    Specifies the number of received and processed trap packets.

    outTooBigs

    Specifies the number of sent packets for which the error-status field is set to tooBig.

    outNoSuchNames

    Specifies the number of sent packets for which the error-status field is set to noSuchName.

    outBadValues

    Specifies the number of sent packets for which the error-status field is set to badValue.

    outGenErrs

    Specifies the number of sent packets for which the error-status field is set to genErr.

    outGetRequests

    Specifies the number of sent Get-Request packets.

    outTraps

    Specifies the number of sent trap packets.

    silentDrops

    Specifies the number of packets that are dropped because the packets carry an empty variable-bindings field or the packet length does not meet local restrictions or exceeds the maximum length supported by the receive end of request packets.

    inGetBulks

    Specifies the number of received and processed GetBulk packets.

    outGetBulks

    Specifies the number of sent GetBulk-Request packets.

    inInforms

    Specifies the number of received and processed Inform packets.

    inProxyPkts

    Specifies the number of packets delivered to the SNMP proxy.

    proxyDrops

    Specifies the number of request packets that are dropped when the SNMP proxy fails to forward the packets to the target host.

    Table 16-116 describes status codes in responses.

    Table 16-116 Status codes

    Status Code

    Description

    200 OK

    The operation succeeds.

    400 Bad Request

    The request cannot be implemented because the request is incorrect in syntax or the information attribute in the request is incorrect.

    500 Internal Server Error

    Internal errors in services cause a request failure or an unidentified request.

Translation
Download
Updated: 2019-04-03

Document ID: EDOC1100075372

Views: 10676

Downloads: 16

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next