ce_sflow – Manages sFlow configuration on HUAWEI CloudEngine switches¶
New in version 2.4.
Synopsis¶
- Configure Sampled Flow (sFlow) to monitor traffic on an interface in real time, detect abnormal traffic, and locate the source of attack traffic, ensuring stable running of the network.
Parameters¶
Notes¶
Note
- This module requires the netconf system service be enabled on the remote device being managed.
- Recommended connection is netconf.
- This module also works with localconnections for legacy playbooks.
Examples¶
---
- name: sflow module test
  hosts: ce128
  connection: local
  gather_facts: no
  vars:
    cli:
      host: "{{ inventory_hostname }}"
      port: "{{ ansible_ssh_port }}"
      username: "{{ username }}"
      password: "{{ password }}"
      transport: cli
  tasks:
  - name: Configuring sFlow Agent
    ce_sflow:
      agent_ip: 6.6.6.6
      provider: '{{ cli }}'
  - name: Configuring sFlow Collector
    ce_sflow:
      collector_id: 1
      collector_ip: 7.7.7.7
      collector_ip_vpn: vpn1
      collector_description: Collector1
      provider: '{{ cli }}'
  - name: Configure flow sampling.
    ce_sflow:
      sflow_interface: 10GE2/0/2
      sample_collector: 1
      sample_direction: inbound
      provider: '{{ cli }}'
  - name: Configure counter sampling.
    ce_sflow:
      sflow_interface: 10GE2/0/2
      counter_collector: 1
      counter_interval: 1000
      provider: '{{ cli }}'
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Status¶
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors¶
- QijunPan (@QijunPan)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.
