Ad Widget

Collapse

Promiscuous mode detection

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mbellizzi
    Junior Member
    • Sep 2012
    • 2

    #1

    Promiscuous mode detection

    Does anyone know if there is an easy way to detect when host interfaces go into promiscuous mode using the Zabbix agent?

    Thanks again for any help
  • BDiE8VNy
    Senior Member
    • Apr 2010
    • 680

    #2
    On condition you are talking about Linux systems there are (as allways on linux) lots of ways to achieve this.

    Here just two proposals:

    UserParameter=net.if.promisc[*],/sbin/ip link show $1 | /bin/grep -q PROMISC; echo $$?
    net.if.promisc["eth0"]
    Returns 0 on promiscuous mode and 1 otherwise.

    vfs.file.regexp["/sys/class/net/eth0/flags","^0x[0-9]*[13579][0-9]{2}$"]
    Returns 1 on promiscuous mode and 0 otherwise.
    Last edited by BDiE8VNy; 10-12-2012, 12:39.

    Comment

    Working...