diff --git a/src/Linux/scripts/hsflowd.conf b/src/Linux/scripts/hsflowd.conf index 71a0070c..b1c5947a 100644 --- a/src/Linux/scripts/hsflowd.conf +++ b/src/Linux/scripts/hsflowd.conf @@ -1,166 +1,53 @@ # hsflowd configuration file +# http://sflow.net/host-sflow-linux-config.php sflow { - # The agent IP is used to identify this sFlow source. - # It should be distinct from any virtual machine IP - # addresses, and should respond to ICMP echo (ping) tests - # from the collector. The IP address associated with - # the server's DNS name is usually a good candidate. - # If not set, hsflowd will try to adopt the IP address - # of the lowest numbered interface on the server. + # ====== Agent IP selection ====== + # Selection is automatic, unless: + # (1) override with preferred CIDR: + # agent.cidr = 192.168.0.0/16 + # (2) Override with interface: # agent = eth0 - # Automatic Configuration (with DNSSD) - ###################################### - # use DNS Server Discovery to locate servers, and also - # to override settings such as "sampling" and "polling" - # This setting requires special configuration of your - # DNS server (see below). If you decide to use Manual - # Configuration instead, then be sure to remove or - # comment out this section: - DNS-SD { - # DNS SRV and TXT queries will go to _sflow._udp - # or _sflow._udp. if is set here: - # domain = .noc.mycompany.com - } - - # example named config for DNSSD (/var/named/.zone). - # This will configure hsflowd to sending to - # sflowcollector. and 10.1.2.3 every 20 - # seconds, provided the line "search is - # present in your /etc/resolv.conf file. - # - # _sflow._udp SRV 0 0 6343 sflowcollector - # _sflow._udp SRV 0 0 6343 10.1.2.3. - # _sflow._udp TXT ( - # "txtvers=1" - # "sampling=400" - # "sampling.1G=1000" - # "sampling.10G=5000" - # "sampling.http=100" - # "polling=20" - # ) - - # if DNS-SD is set, then any sampling, polling or - # collector settings that appear below will be ignored. - - # Manual Configuration (required DNS-SD to be off) - ################################################# - - ### Counter Polling - # Typical configuration is to send counters every 30 seconds + # ====== Sampling/Polling/Collectors ====== + # EITHER: automatic (with DNS-SD): + # DNS-SD { } + # OR: manual (when no DNS-SD): + # Counter Polling: # polling = 30 - - ### Packet/Transaction Sampling - # Settings not used directly by hsflowd may still be - # passed on to other sFlow agents running on this host - # via the /etc/hsflowd.auto file. + # default sampling N: # sampling = 400 - - ### Packet-sampling on network switch. - # On a network switch it is the speed-specific sampling - # settings that take effect: + # sampling N on interfaces with ifSpeed: # sampling.100M = 100 # sampling.1G = 1000 # sampling.10G = 10000 # sampling.40G = 40000 - - ## Application transaction-sampling. - # Options to overide sampling rates for particular sub-agents - # such as sFlow-HTTP, sFlow-MEMCACHE - # sampling.http = 100 - # sampling.memcache = 800 - # sampling.app.myapplication = 10 (see JSON below) - - ### sFlow Collectors - #collector { - # ip = 127.0.0.1 - # # udpport = 6343 - #} + # collectors: + collector { ip=127.0.0.1 udpport=6343 } # add additional collectors here - # Local configuration (applies whether using DNS-SD or not) - ########################################################### - - # option to listen for JSON-encoded messages - # sFlow-APPLICATION, RTMETRIC or RTFLOW - ####################################### + # ====== Local configuration ====== + # listen for JSON-encoded input: # json { UDPport = 36343 } - # (see sampling.app. above) - - # iptables ULOG/NFLOG packet-sampling configuration - ################################################### - # You should only use this feature if you do not - # already have sFlow traffic monitoring in the physical - # or virtual switch port that this server attaches too. - # - # These settings should match your iptables NFLOG or ULOG config. - # For example, if iptables is configured like this: - # - # MOD_STATISTIC="-m statistic --mode random --probability 0.0025" - # NFLOG_CONFIG="--nflog-group 5 --nflog-prefix SFLOW" - # sudo iptables -I INPUT -j NFLOG $MOD_STATISTIC $NFLOG_CONFIG - # sudo iptables -I OUTPUT -j NFLOG $MOD_STATISTIC $NFLOG_CONFIG - # - # Then the settings here should be: - # nflog { - # group = 5 - # probability = 0.0025 - # } - # - # Or, if your OS is older and only suppports ULOG: - # - # MOD_STATISTIC="-m statistic --mode random --probability 0.0025" - # ULOG_CONFIG="--ulog-nlgroup 1 --ulog-prefix SFLOW --ulog-qthreshold 1" - # sudo iptables -I INPUT -j ULOG $MOD_STATISTIC $ULOG_CONFIG - # sudo iptables -I OUTPUT -j ULOG $MOD_STATISTIC $ULOG_CONFIG - # - # And the settings here should be: - # ulog { - # group = 1 - # probability = 0.0025 - # } - - # BPF / PCAP packet-sampling configuration - ########################################## - # This is an alternative to the ULOG/NFLOG sampling. - # On newer Linux kernels such as 4.3.* the BPF option should - # result in kernel-based sampling with low overhead. However - # on older kernels every packet will be passed to user-space. + # PCAP+BPF packet-sampling: # Bridge example: # pcap { dev = docker0 } # NIC example: # pcap { dev = eth0 } # pcap { dev = eth1 } - - # Nvidia NVML GPU monitoring - ############################ + # NFLOG packet-sampling: + # nflog { group = 5 probability = 0.0025 } + # ULOG packet-sampling: + # ulog { group = 1 probability = 0.0025 } + # Nvidia NVML GPU monitoring: # nvml { } - - # Xen hypervisor monitoring (reports on VMs too) - ################################################ + # Xen hypervisor and VM monitoring: # xen { } - - # Open vSwitch configuration (pushes sFlow config to OVS) + # Open vSwitch sFlow configuration: # ovs { } - - # KVM (libvirt) hypervisor monitoring (reports on VMs too) - ########################################################## + # KVM (libvirt) hypervisor and VM monitoring: # kvm { } - - # Docker container monitoring (containers appear as VMs) - ######################################################## + # Docker container monitoring: # docker { } - - # Cumulus Linux (full sFlow agent with packet-sampling - # and counter polling for every switch port) - ###################################################### - # cumulus { } - - # Dell OS10 (full sFlow agent with packet-sampling - # and counter polling for every switch port) - ###################################################### - # os10 { } - }