Sign inSign up

vorteil/snmp

By vorteil

Updated about 5 years ago

Image
0

1.2K

vorteil/snmp repository overview

SNMP

Sends a snmp trap to an address

Direktiv

An example workflow of sending Hello World! as a SNMP Trap:

id: send-snmp-message
functions:
- id: snmp
  image: vorteil/snmp:v1
description: Sends a SNMP trap to an address
states:
- id: write-message
  type: action
  action:
    function: snmp
    input:
      url: "0.0.0.0"
      port: 9442
      variables:
      - name: ".1.3.6.1.4.9.27"
        type: 4
        value: Hello World!
  • NOTE: if you want to define the snmp to be an inform-request simply provide that boolean variable.

  • NOTE: the variable type is an integer following the BER encoded types the table below defines the ints matching fields.

    TypeInt
    End of Contents, Unknown Type0
    Boolean1
    Integer2
    BitString3
    OctetString4
    Null5
    ObjectIdentifier6
    ObjectDescription7
    IPAddress40
    Counter3241
    Gauge3242
    TimeTicks43
    Opaque44
    NsapAddress45
    Counter6446
    Uinteger3247
    OpaqueFloat78
    OpaqueDouble79
    NoSuchObject80
    NoSuchInstance81
    EndOfMibView82
  • NOTE: variables can also take a field called snmpv1-headers that has the following fields.

    snmpv1-headers:
    enterprise: string
    agent-address: string
    generic-trap: int
    specific-trap: int
    timestamp: uint
    

Output of Execution

The output of the execution if successfuly is the packet itself from sending the snmp trap.

Error on Execution

If the container was to error out during the action an error will be thrown matching:

{
    "errorCode": "com.snmp.%s.error",
    "errorMsg": "Something went wrong..."
}

NOTE: %s will be replaced with what is currently happening in the container that errored out e.g. unmarshalling-input.

Tag summary

Content type

Image

Digest

Size

2.3 MB

Last updated

about 5 years ago

docker pull vorteil/snmp