DEV Community

Cover image for OpenStack Sflow Entegrasyonu Openvswitch
Doğukan Eren for Açıklab

Posted on

2

OpenStack Sflow Entegrasyonu Openvswitch

OpenStack üzerinde çalışan makinalarımızın network trafiklerini openvswitch üzerinden sflow kullanarak izleyebilmekteyiz.

ovs-vsctl komutunu kullanarak openvswitch yönetimini gerçekleştirebiliriz. Aşağıdaki komut ile sflow özelliğini açalım.

ovs-vsctl -- --id=@sflow create sflow agent=${AGENT_IP}     target="\"${COLLECTOR_IP}:${COLLECTOR_PORT}\"" header=${HEADER_BYTES}     sampling=${SAMPLING_N} polling=${POLLING_SECS}       -- set bridge deren-bridge sflow=@sflow
Enter fullscreen mode Exit fullscreen mode

Örnek

ovs-vsctl -- --id=@sflow create sflow agent=ens19     target="\"192.168.2.91:6343\"" header=128     sampling=10 polling=30       -- set bridge br-int sflow=@sflow
Enter fullscreen mode Exit fullscreen mode

uyguladığımız sflow konfigürasyonumuzu aşağıdaki komutu kullanarak görebiliriz.

ovs-vsctl list sflow
Enter fullscreen mode Exit fullscreen mode
root@openst domains(keystone)# ovs-vsctl list sflow
_uuid               : 7740265f-ef21-427e-919b-8b7c80e423ed
agent               : ens19
external_ids        : {}
header              : 128
polling             : 30
sampling            : 10
targets             : ["192.168.2.91:6343"]

Enter fullscreen mode Exit fullscreen mode

Ayarlar, interface ve target ip ve port bilgisi doğru ve erişilebilir ise sflow collector makinanıza sflow verileri ulaşmalıdır.

sFlow toplayacak makinanızdan aşağıdaki komut ile kntrol sağlayabilirsiniz.

tcpdump port <collector_listener_port> | grep <openstack_ip>

tcpdump port 6343 | grep 192.168.2.91
Enter fullscreen mode Exit fullscreen mode

bu işlem sonucunda ip adresinizden gelen sflow verisi görürseniz başarılı bir şekilde kurulum sağlamışız demektir :)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay