---
title: Snmp Trap Notification v2
slug: homologacao-atmosphere/snmp-trap-notification-v2
description: Learn how to use a script to send SNMPv2 or SNMPv2c trap notifications with this comprehensive document. Discover the necessary parameters, including SNMP object identity, object binds, transport table IP, transport target port, and community string. Addi
createdAt: 2022-01-10T18:03:11.000Z
---



## Resumo

Enviar notificação de trap SNMPv2 ou SNMPv2c.

## Opções

| **Parâmetro**                      | **Tipo** | **Escolhas \| Valor Padrão** | **Comentários**             |
| ---------------------------------- | -------- | ---------------------------- | --------------------------- |
| object\_identity - required        | string   |                              | O objeto de identidade SNMP |
| object\_binds - required           | dict     |                              | As Ligações de Objeto SNMP  |
| transport\_table\_ip - required    | string   |                              | IP do receptor              |
| transport\_target\_port - required | integer  |                              | Porta do Receptor           |
| community - required               | string   |                              | A string da comunidade SNMP |



## Exemplos

```yaml
  - name: Enviar notificação de armadilha SNMPv2c
    snmp_trap_notification_v2:
      object_identity: 1.3.6.1.2.1.1.1.0
      object_binds:
        1.3.6.1.2.1.1.5.0: "zeus.snmplabs.com (you can change this!)"
        1.3.6.1.2.1.1.3.0: 398079840
        1.3.6.1.2.1.1.6.0: "San Francisco, California, United States"
      transport_table_ip: 127.0.0.1
      transport_target_port: 162
      community: public
```



## Valores retornados

| **Chave**     | **Tipo** | **Retornado quando** | **Descrição**                  |
| ------------- | -------- | -------------------- | ------------------------------ |
| object\_binds | string   | sempre               | nformações do object\_identity |

