Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no sFlowSample->{'HeaderBin'} in sflow packets #78

Open
Rico29 opened this issue Aug 13, 2018 · 0 comments
Open

no sFlowSample->{'HeaderBin'} in sflow packets #78

Rico29 opened this issue Aug 13, 2018 · 0 comments

Comments

@Rico29
Copy link

Rico29 commented Aug 13, 2018

Hello,
in asstatsd.pl, line
my (undef, $ethertype, $ipdata) = unpack('a12H4a*', $sFlowSample->{'HeaderBin'});
throws warnings, because my sflow samples does not have a "HeaderBin" part.
I'm using pmacct as sflow sender.

example of sflow packet shown via Data::Dumper :

$VAR1 = {
          'GatewayAsRouter' => 0,
          'GatewayDestAsPaths' => [
                                    {
                                      'asPathSegmentType' => 1,
                                      'lengthAsList' => 1,
                                      'AsPath' => []
                                    }
                                  ],
          'flowRecordsCount' => 4,
          'GatewayCommunities' => [],
          'outputInterface' => 1,
          'drops' => 0,
          'sourceIdIndex' => 1,
          'SwitchSrcPriority' => 0,
          'GatewayAsSourcePeer' => 0,
          'sampleTypeEnterprise' => 0,
          'EtherDestMac' => '000000330001',
          'SwitchDestVlan' => 51,
          'samplePool' => 14283505,
          'samplingRate' => 100,
          'inputInterface' => 1073741823,
          'HEADERDATA' => 'HEADERDATA',
          'GatewayLengthCommunitiesList' => 0,
          'GatewayIpVersionNextHopRouter' => 1,
          'sampleLength' => 216,
          'SwitchSrcVlan' => 0,
          'HeaderFrameLength' => 58,
          'HeaderProtocol' => 4,
          'sampleSequenceNumber' => 142453,
          'sampleTypeFormat' => 1,
          'HeaderStrippedLength' => 1423979124,
          'EtherPackettype' => 76,
          'SWITCHDATA' => 'SWITCHDATA',
          'SwitchDestPriority' => 0,
          'GatewayAsSource' => 0,
          'GatewayDestAsPathsCount' => 1,
          'ETHERNETFRAMEDATA' => 'ETHERNETFRAMEDATA',
          'GATEWAYDATA' => 'GATEWAYDATA',
          'sourceIdType' => 0,
          'EtherSrcMac' => '000000020000',
          'HeaderSizeByte' => 3217254405,
          'GatewayIpAddressNextHopRouter' => '0.0.0.0',
          'localPref' => 0,
          'EtherMacPacketlength' => 0
        };

how can I fix this ?
Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant