Giter VIP home page Giter VIP logo

as-stats's People

Contributors

alarig avatar buchtajz avatar d307473 avatar green525 avatar gregoo avatar jackslateur avatar josqu4red avatar kegeruneku avatar manuelkasper avatar marcbanyard avatar nshopik avatar pirmins avatar pv2b avatar rlanyi avatar shanemcc avatar twiddern avatar will-h avatar xmorpheus avatar zlobar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

as-stats's Issues

Link usage better space usage

So I was thinking maybe we could use space better in Link Usage page. Get rid of left side name and use rrdtool title to name graphs like "IPv4 - Peering1".

This has two benefits, we can fit two graphs ipv4 + ipv6 vertically on smaller monitors(1280) and if there just IPv4 used we could make it little bit longer.
I'm already running with these changes, can make pull request if it sounds good.

This won't touch Top N AS page, only link usage page.

Can't use bareword ("as_list") as a HASH ref while "strict refs" in use at /var/www/localhost/htdocs/AS-Stats/bin/rrd-extractstats.pl line 57.

Hi,

If I try to run rrd-extractstats.pl it fails with this error.

metro ~ # su -l -s /bin/sh -c '/var/www/localhost/htdocs/AS-Stats/bin/rrd-extractstats.pl /var/www/localhost/htdocs/AS-Stats/rrd/ /var/www/localhost/htdocs/AS-Stats/conf/knownlinks /var/www/localhost/htdocs/AS-Stats/asstats/asstats_day.txt' as-stats
No directory, logging in with HOME=/
Can't use bareword ("as_list") as a HASH ref while "strict refs" in use at /var/www/localhost/htdocs/AS-Stats/bin/rrd-extractstats.pl line 57.

I’m using perl 5.30.1

netflow mode 32bit: Invalid type 'Q' in unpack at asstatd.pl line 321.

Greetings,

this issue exists on netflow mode only. sflow mode does not exhibit this behavior.

the pmacct config:

daemonize: false
promisc: true
plugin_buffer_size: 10240
plugin_pipe_size: 10240000
pcap_filter: net 10.0.0.0/8
interface: eth0
plugins: nfprobe[in],nfprobe[out]
nfprobe_receiver: 10.2.19.18:9000
nfprobe_source_ip: 10.2.19.3
nfprobe_version: 9
nfprobe_direction[in]: in
nfprobe_direction[out]: out
nfprobe_ifindex[in]: 731
nfprobe_ifindex[out]: 732
nfacctd_as_new: bgp
nfprobe_peer_as: true
bgp_peer_src_as_type: bgp
bgp_src_as_path_type: bgp
bgp_src_std_comm_type: bgp
bgp_src_ext_comm_type: bgp
bgp_daemon_pipe_size: 1310710
bgp_daemon: true
bgp_daemon_ip: 10.2.146.10
bgp_daemon_id: 10.2.146.10
bgp_daemon_port: 17917
bgp_agent_map: /etc/pmacct/agent_to_peer.map
bgp_follow_nexthop: 10.2.19.0/24, 10.2.146.0/24, 10.0.0.0/8
aggregate[in]: src_host, dst_host, src_port, dst_port, src_as, dst_as, as_path, peer_src_as, peer_dst_as, proto
aggregate[out]: src_host, dst_host, src_port, dst_port, src_as, dst_as, as_path, peer_src_as, peer_dst_as, proto
aggregate_filter[in]: ether src !(50:e5:49:33:5c:xx)
aggregate_filter[out]: ether src 50:e5:49:33:5c:xx

pmacct/nfprobe, quagga & as-stats all run on same physical fresh gentoo/rolling 32bit system.

attaching a wireshark capture:

wireshark_enp4s0_pcapng.zip

Flexible netflow ipv6 AS aggregation support

I was playing around to get IPv6 stats with classic Cisco IOS (15.0 and later). From my understanding only way to get it AS-aggregation is this configuration:

flow exporter FLEX-EXAMPLE
    destination 192.0.2.1
    transport udp 9000
flow monitor as-stats
    record netflow ipv6 as
    exporter FLEX-EXAMPLE
    cache timeout active 300
    cache entries 16384
interface GigabitEthernet0/1
    ipv6 flow monitor as-stats input
    ipv6 flow monitor as-stats output

Unfortunately it doesn't work, seems data is ignored, my assumption there no support for this template in AS-Stats? And only way to get IPv6 data is export all packets or just sampled data, right?

Missing AS number

Hi,

There is a missing AS number in the list of them, and because it reads from the static file with no dynamic lookup, it has issues.

Add this line:
23456_tab_TRANS-AS_tab_IANA Reserved AS_tab_US

Further down the track, it would be good to do the AS numbers in a database with a "last updated" record and update them dynamically through whois

Food for thought.

prefix-to-AS resolution feature/enhansment

Would it be difficult to implement such a feature? for example querying a local file with prefixes/ASNs to assign ASNs on orphan IP/prefix.

On our open/free wireless network we have some mikrotik boxes that don't sent any AS details on their netflow exports and the vendor by looking at their forum doesn't look too enthusiast on adding such functionality.

www/peerusage.php missing

The new navigation provides a link to "Top AS peers", but the linked file www/peerusage.php is missing from the repo.

generate-asinfo generates wrong information

I've just noticed it some months ago but didn't raised an issue here and also couldn't managed it to make a fix.

Currently the generate-asinfo.py generates broken output. The information seems to be ok if you look manually into it, but if you load the asinfo.txt often ripe-entries are broken. Also information from other databases, which cymru collected seems sometimes a bit "wrong".

I'm not sure if the python script needs to be adjusted or if as-stats should be adjusted to show up the information from a "new format" from cymru. I'm sorry that I can't give an example right now.

For whom who it will fix, I also noticed that you can't query 300k asn at once, via netcat to cymru, this should be may split up in future.

no rrd file generation

Greetings,

running as-stats as: ./bin/asstatd.pl -r rrd/ -k conf/knownlinks -P 0

results in no rrd file generation no matter how long the as-stats runs.

as-stats feed has been tested by pmacct either on netflow/v9 or sflow and with softflowd but with no results.

proper netflow/sflow functionality has been successfully tested by wireshark, nfacctd/sfacctd & nfdump

as-stats is disturbingly quiet doing nothing

any ideas suggestions as to how to troubleshoot this would be highly appreciated

peerusage blank

Hey we having problem with peerusage, its showing blank page, how to fix it?

Documentational issue for IOS on C6880-X

I've had huge issues trying to get this working together with a Cisco C6880-X running regular IOS 15.2 (Advanced Enterprise license). Despite being a regular IOS software the Netflow configuration looks nothing at all like the IOS example, looks more like the IOS XR example, but it's different from that too.

After lot's of trial and error, asking around on IRC, google and tcpdump this is what I ended up with and it's working for me. Thought I should share it so that others will have an easier time getting this setup.

flow record ASSTAT-RECORD
 match ipv4 source address
 match ipv4 destination address
 match transport source-port
 match transport destination-port
 match interface input
 match interface output
 match flow direction
 collect routing source as
 collect routing destination as
 collect counter bytes long
 collect counter packets long
 collect timestamp sys-uptime first
 collect timestamp sys-uptime last
flow record ASSTAT-RECORD-V6
 match ipv6 source address
 match ipv6 destination address
 match transport source-port
 match transport destination-port
 match interface input
 match interface output
 match flow direction
 collect routing source as
 collect routing destination as
 collect counter bytes long
 collect counter packets long
 collect timestamp sys-uptime first
 collect timestamp sys-uptime last
flow exporter ASSTAT-EXPORT
 destination 86.107.242.83
 source Loopback0
 transport udp 9000
flow monitor ASSTAT-MONITOR
 exporter ASSTAT-EXPORT
 cache timeout inactive 5
 cache timeout active 5
 cache entries 16384
 record ASSTAT-RECORD
flow monitor ASSTAT-MONITOR-V6
 exporter ASSTAT-EXPORT
 cache timeout inactive 5
 cache timeout active 5
 cache entries 16384
 record ASSTAT-RECORD-V6
sampler flow-sampler
 mode random 1 out-of 1024
int Te5/1
 ip flow monitor ASSTAT-MONITOR sampler flow-sampler input
 ip flow monitor ASSTAT-MONITOR sampler flow-sampler output
 ipv6 flow monitor ASSTAT-MONITOR-V6 sampler flow-sampler input
 ipv6 flow monitor ASSTAT-MONITOR-V6 sampler flow-sampler output

ipfix : Use of uninitialized value in addition (+) at /usr/local/AS-Stats/bin/asstatd.pl line 446.

Hello,
Running asstats.pl like this :
/usr/bin/perl /usr/local/AS-Stats/bin/asstatd.pl -a $ASN -r /usr/local/AS-Stats/rrd -k /usr/local/AS-Stats/conf/knownlinks -p 6344

always triggers warnings :
Use of uninitialized value in addition (+) at /usr/local/AS-Stats/bin/asstatd.pl line 446.
Use of uninitialized value in addition (+) at /usr/local/AS-Stats/bin/asstatd.pl line 446.
Use of uninitialized value in addition (+) at /usr/local/AS-Stats/bin/asstatd.pl line 446.
Use of uninitialized value in addition (+) at /usr/local/AS-Stats/bin/asstatd.pl line 446.

I tried to debug it but I was not able to find the cause.
Can you help me with that please ?
I can provide a pcap of IPFIX trafic coming into port 6344 (which looks correct)

Regards,
Cédric

Add VLAN ID to knownlinks

It would be quite nice to be able to define the VLAN ID inside the knownlinks file. For example we've got a router using sflow which has two seperate VLAN interfaces running through the same physical interface.

For sflow it would be:

$sFlowSample->{SwitchSrcVlan}
$sFlowSample->{SwitchDestVlan}

pmacct / as-stats

Hello,

First I want to apologize because I don't know yet if my problem comes from aw-stats or pmacct.
I'm trying to use as-stats with pmacct as netflow sender.
I have a bird bgp router with a pmacct process on it, which sends netflow data to as-stats server on port 9995.
pmacct has a bgp session established with bird, and send as-aware netflow packets to as-stats (verified by wireshark).

wireshark tells me that Flow id is 1024 : FlowSet 1 [id=1024](6 flows)
pmacct (192.168.156.23) sends flows to aw-stats (192.168.156.109), so in as-stats knownlinks file, I have :
192.168.156.23 1024 provider provider A6CEE3 1
I run as-stats like this :
bin/asstatd.pl -r /tmp -k conf/knownlinks -p 9995 -P 0
and I get :
DEBUG Sampling Rate for 192.168.156.23_1024 is IN: 1 | OUT: 1

No rrd files are created in /tmp.
is there a way to debug as-stats ?

gaps in graphs

Hello!
I'm using netflow v8 and collect it from juniper mx series.
Why my graphs with gaps?
image

No License specified

This looks like a really nice tool, and I'd like to try it out. Can you specify what the license is, and include a license file in the project?

After adding new link I get issues when running rrd-extratstats.pl

I have added a new link to knownlinks
I have had issues with adding a new link, so I ended up deleting all rrd files (emptying whole folder).
and wanted to regenerate them again.

but after running
/as-stats/AS-Stats/bin/rrd-extractstats.pl /as-stats/rrd /as-stats/AS-Stats/conf/knownlinks /as-stats/stats/asstats_day.txt_

I get the following error now:
DBD::SQLite::db do failed: table stats has 38 columns but 42 values were supplied at /as-stats/AS-Stats/bin/rrd-extractstats.pl line 160.

I do not see any resolution for this anywhere. Can you please let me know how to resolve this?

Thank you,

I have a problem to use with AS-Stats

netflow bin # ./netflow-asstatd.pl -p 9001 -r /var/cache/as-stat/data/rrd/ -k /var/cache/as-stat/data/knownlinks

pwd
/var/cache/as-stat/data/rrd
netflow rrd # ls -al
total 8
drw-rw-rw- 2 root root 4096 Jun 28 10:09 .
drwxr-xr-x 3 root root 4096 Jun 28 10:05 ..

Agree with juniper stream ipfix.
I run the script but the directory is empty, the port I used the default.
Can you tell what the problem can somehow run or debug?
Thanks.

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

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

. in knowlinks

I have problems using . in short tag or description in knownlinks file.

Please, fix it or write it in README.me to avoid future problems

Unable to install rrdtool-dev

Hi
tried to install all necessary packages as per instruction in Wiki but unable to install rrdtool-dev . Let me know from where I can get this package.
root@asstats# apt-get install rrdtool-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package rrdtool-dev

Incorrect Graphs !!

Hi,

I've setup the AS-Stats on dell switch with sflow. However the graphs are showing bandwidth in Kbps while the bandwidth supposed to be in Mbit/s. More than that IN/bytes showing 0. Please have a look :-

http://prntscr.com/hokjth

Thanks.

Issue with select time period

There is an issue with selecting a time period from the menu bar, it doesnt work!

There are missing echo statements in the build a graph line (top.php)

I have corrected it, but thought i would share

            <?php if ($showv6): ?>
            <a href="history.php?v=4&amp;as=<?php echo $as; ?>" target="_blank"><img alt="AS graph" src="gengraph.php?as=<?php echo $as; ?>&amp;width=500&amp;height=150&amp;v=4&amp;nolegend=1&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . " - IPV4"); ?>&amp;start=<?php echo $start ; ?>&amp;end=<?php echo $end ; ?>" width="597" height="207" border="0" /></a>
            <a href="history.php?v=6&amp;as=<?php echo $as; ?>" target="_blank"><img alt="AS graph" src="gengraph.php?as=<?php echo $as; ?>&amp;width=500&amp;height=150&amp;v=6&amp;nolegend=1&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . " - IPV6"); ?>&amp;start=<?php echo $start ; ?>&amp;end=<?php echo $end ; ?>" width="597" height="207" border="0" /></a>
            <?php else: ?>
            <a href="history.php?as=<?php echo $as; ?>" target="_blank"><img alt="AS graph" src="gengraph.php?as=<?php echo $as; ?>&amp;width=500&amp;height=150&amp;nolegend=1&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . ""); ?>&amp;start=<?php $start ; ?>&amp;end=<?php $end ; ?>" width="581" height="189" border="0" /></a>
            <?php endif; ?>

SQLite table not getting created

Just attempted upgrading an existing install to the latest from this repository. When running rrd-extractstats.pl, I get a whole lot of this:

DBD::SQLite::db do failed: no such table: stats at /usr/local/www/as-stats/current/bin/rrd-extractstats.pl line 78.

Is there anything I should be doing to initially create this database or table?

unpack fails in asstatd.pl

Hello,

I've recently tried to upgrade from 1.4.2 to 1.6, and am having problems running the updated asstatd.pl:

as-stats@flows:$ /opt/as-stats/bin/asstatd.pl -r /opt/as-stats/rrd -k /opt/as-stats/conf/knownlinks -p 8990 -a 65000
'/' must follow a numeric type in unpack at /opt/as-stats/bin/asstatd.pl line 201.
as-stats@flows:
$

The line in question (201) uses unpack() to read Netflowv9 data:

https://github.com/manuelkasper/AS-Stats/blob/master/bin/asstatd.pl#l201

Perl version is 5.14.2, x86_64 (from debian wheezy) and all system packages are up to date at the time of writing.

I'm no expert on unpack (or perl in general) but I can happily supply more info/output if requested.

Tom

Incorrect Bandwidth on Juniper MX

Dear Manuel!
Thank you for your work!
Forced to turn to you for help, so as to solve the problem for a month I didn't get :(

We have 2 border routers of Juniper MX-series, one MX80 and one MX240.
I tried to configure your scripts with each of them using Netflow v5/v8 and IPFIX and with the same settings got different results, and different from the indications by SNMP.

The results of MX240 like the truth at least 50-70% when the results of MX80 like no more than 20% of truth.
Here is my current sampling settings:

sampling {
sample-once;
input {
rate 100;
max-packets-per-second 65535;
}
family inet {
output {
flow-inactive-timeout 15;
flow-active-timeout 60;
flow-server 192.168.90.100 {
port 9000;
autonomous-system-type origin;
no-local-dump;
source-address 192.168.90.91;
version 5;
}
}
}
}

As I said - using Netflow v5/v8 or IPFIX - gives the same result. And here is graphs compare.

MX240 IP-transit 10G port.

telia

MX240 peering 10G port.

data

MX80 IP-transit 10G port.

retn

MX80 peering 1G port.

msk

I tried to change various settings of sampling rate as on the router and in your script, and your tips from the next issue: #4

Change $ascache_flush_interval = 10 gave a small positive result is higher-quality graphs, but to solve the problem of incorrect bandwidth I never got.

Asking for your help! I would very much like to use the product and send you a donation.

As-stats for 100g link

Recently we migrated our IX links from 10g to 100g, on 10g all stats were perfectly running, after migrations we failed to get graphs for the 100g link one on juniper routers. do any one faced similar issue.

regards

Multiple routers > duplicate ifIndex'es > RRD graphs wrong

Hello, we have mutiple routers sending netflow streams to the AS-Stats collector port. Unfortunately we have duplicate ifIndex Interface IDs among the routers. We noticed that the data in as-stats_day.txt is correct, but the rrd graphs are missing huge parts of our traffic (which seems to only affect interfaces sharing the same ifIndex).

Is there anything we can do about this? We're using latest v1.6 release. Thanks

Blanks in my graphs

Hello,
I have an issue, randomly, I have blanks in my graphs.

I first tough it was cpu related so we done a cpu upgrade, but the problem is still here.

I don't know what can be the source of this issue...

Have you an idea ?

I asked first the question on the mailing list without success.

Here are attached samples. The issue is only viewable on daily views.

Thank you.

gengraph php1
gengraph php2
gengraph php3
gengraph php4

Better colors for per link graphs

So I was playing with colors with much help of colorbrewer2.org and looks like this array of colors looks much better and distinctive from each other

$ascolors = array("A6CEE3", "1F78B4", "B2DF8A", "33A02C", "FB9A99", "E31A1C", "FDBF6F", "FF7F00", "CAB2D6", "6A3D9A");

Give a try, if you like I could attach patch for it, seems trivial change

Multicore and Freebsd

I have heavy load on network and i can see that perl script netflow-asstatd.pl uses only 1 CPU core in system for processing data, this cause problem cause there is not enough Mhz for this process. Is there any options to tune this?

AS-Stats not working with sFlow data from Brocade/Extreme NetIron routers

Hello,

it seems as-stats is not working with sFlow data from Brocade/Extreme NetIron devices. No RRD-files are being created within the data-directory. Running asstatd.pl in debug mode produces the following output:

# /opt/as-stats/bin/asstatd.pl -P 2080 -p 0 -r /opt/as-stats/data/rrd -k /opt/as-stats/conf/knownlinks -a 47251
DEBUG Sampling Rate for 192.168.236.1_1 is IN: 1024 | OUT: 1024
DEBUG Sampling Rate for 192.168.236.1_2 is IN: 1024 | OUT: 1024
DEBUG Sampling Rate for 192.168.236.2_1 is IN: 1024 | OUT: 1024
DEBUG Sampling Rate for 192.168.236.2_2 is IN: 1024 | OUT: 1024
3333 => 0 (56 octets, version 4, snmpin 1, snmpout 6)
0 => 31898 (60 octets, version 4, snmpin 6, snmpout 1)
0 => 16509 (380 octets, version 4, snmpin 6, snmpout 1)
14061 => 0 (44 octets, version 4, snmpin 1, snmpout 6)
0 => 397197 (76 octets, version 4, snmpin 6, snmpout 1)
41018 => 0 (44 octets, version 4, snmpin 1, snmpout 6)
0 => 1273 (76 octets, version 4, snmpin 6, snmpout 1)
0 => 14618 (183 octets, version 4, snmpin 6, snmpout 1)
212906 => 0 (56 octets, version 4, snmpin 1, snmpout 6)
0 => 54113 (577 octets, version 4, snmpin 6, snmpout 1)
53667 => 0 (56 octets, version 4, snmpin 1, snmpout 65)
Invalid interface index 3/2147483649
37963 => 39110 (64 octets, version 4, snmpin 1, snmpout 3)
37963 => 0 (64 octets, version 4, snmpin 1, snmpout 3)

Our sFlow-config on both routers:

sflow enable
sflow source ve 4000 8888
sflow destination 192.168.236.100 2080 
sflow polling-interval 30
sflow sample 1024

and on all interfaces we have set:

sflow forwarding

And the knownlinks-file (separated with tabs):

# Router IP	ifindex		tag		description	color	samplingrate
192.168.236.1	1		uplink1		Transit1	239614	1024
192.168.236.1	2		uplink2		Peering1	4167B5	1024
192.168.236.2	1		uplink3		Transit2	721358	1024
192.168.236.2	2		uplink4		Peering2	EA891B	1024

By using tcpdump we can confirm that sFlow-data is being received on the collector host. Other sFlow monitoring tools are also working as expected - only as-stats does not work. Maybe any hints?

Thanks in advance

Graphs: smooth network bursting (enhansment)

the following patch helped a lot in smoothing the graphs on network bursts:

- "--slope-mode --alt-autoscale -u 0 -l 0 --imgformat=PNG --base=1000 --height=$height --width=$width " .
+ "--logarithmic --slope-mode --alt-autoscale -u 0 --imgformat=PNG --base=1000 --height=$height --width=$width " .

it may be nice to have this as an option in the config file.

IPv6 stats

Hi,
i'm using pmacct to send sflow to as-stats collector. Works fine for IPv4.
Trying to understand why my IPv6 trafic is not handled by as-stats, I ran sflowtool, and sflowtool show "IP6_label" for IPv6 packets.

How can I tell pmacct that these samples are IPv6 ?
(pmacct is sending etype, but I can't see it in sflowtool dumps)

Regards,
Cédric

Use of uninitialized value

I am using pmacct/nfprobe as a netflow/agent with AS statistics enabled. as-stats is working nicely on my 32bit gentoo system with this patch and the graphs are colorfully generated.

I do get though quite a few "Use of uninitialized value in new at /data/as-stats/bin/asstatd.pl" which is this line

any hints on how to further debug this?

sketchy graphs - how to avoid?

Hi, how does one avoid sketchy graphs like this? I have a sampling rate of 100, which I think is pretty low, and have set flows to purge after 5 minutes and update every minute, to align with the RRD values.

screenshot on 2013-05-01 at 10 53 31

set forwarding-options sampling input rate 100
set forwarding-options sampling family inet output flow-inactive-timeout 300
set forwarding-options sampling family inet output flow-active-timeout 60
set forwarding-options sampling family inet output flow-server 192.168.0.38 port 9995
set forwarding-options sampling family inet output flow-server 192.168.0.38 autonomous-system-type origin
set forwarding-options sampling family inet output flow-server 192.168.0.38 no-local-dump
set forwarding-options sampling family inet output flow-server 192.168.0.38 version 5

sFlow only?

Seems like my Juniper ex4550 does not support NetFlow.
I've successfully enabled sFlow and can see packets coming in via tcpdump on port 6343.

root@vm100:/opt/AS-Stats/rrd# tcpdump -i eth1 port 6343 -n tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth1, link-type EN10MB (Ethernet), capture size 262144 bytes 20:09:18.729260 IP 172.16.0.2.56580 > 172.16.0.1.6343: sFlowv5, IPv4 agent 172.16.0.2, agent-id 16, length 1260 20:09:18.800624 IP 172.16.0.2.56580 > 172.16.0.1.6343: sFlowv5, IPv4 agent 172.16.0.2, agent-id 16, length 1316 20:09:18.871397 IP 172.16.0.2.56580 > 172.16.0.1.6343: sFlowv5, IPv4 agent 172.16.0.2, agent-id 16, length 1372 20:09:18.952754 IP 172.16.0.2.56580 > 172.16.0.1.6343: sFlowv5, IPv4 agent 172.16.0.2, agent-id 16, length 1420 20:09:19.030568 IP 172.16.0.2.56580 > 172.16.0.1.6343: sFlowv5, IPv4 agent 172.16.0.2, agent-id 16, length 1372

The sFlow packets are coming from 172.16.0.2.
What do I need to put in knownlinks ?

I ran this
./asstatd.pl -r ../rrd/ -k ../conf/knownlinks -p 0 -a 62020

But it is not creating any rrd files and no debug to know if its receiving any sFlow packets or not

Centos Install not working

I used the script from the contrib directory, every thing works fine,
the webserver works
i can see tcpdump displaying the netflow packets on port 9000
the netstat shows all required post listening for data, the the PS -ef command also looks good.

however i get the below error in the httpd logs
[Mon Oct 29 23:58:31.984766 2018] [:error] [pid 1204] [client 192.168.5.95:6450] PHP Notice: Undefined variable: asstats in /data/as-stats/www/func.inc on line 139, referer: http://192.168.5.5/
[Mon Oct 29 23:58:31.985297 2018] [:error] [pid 1204] [client 192.168.5.95:6450] PHP Warning: Invalid argument supplied for foreach() in /data/as-stats/www/top.php on line 59, referer: http://192.168.5.5/
[Mon Oct 29 23:59:27.968855 2018] [:error] [pid 1206] [client 192.168.5.95:6634] PHP Notice: Undefined variable: asstats in /data/as-stats/www/func.inc on line 139, referer: http://192.168.5.5/as-stats/asset.php
[Mon Oct 29 23:59:27.969056 2018] [:error] [pid 1206] [client 192.168.5.95:6634] PHP Warning: Invalid argument supplied for foreach() in /data/as-stats/www/top.php on line 59, referer: http://192.168.5.5/as-stats/asset.php
[Tue Oct 30 01:23:05.290276 2018] [:error] [pid 1206] [client 192.168.5.95:25953] PHP Notice: Undefined variable: asstats in /data/as-stats/www/func.inc on line 139, referer: http://192.168.5.5/
[Tue Oct 30 01:23:05.290517 2018] [:error] [pid 1206] [client 192.168.5.95:25953] PHP Warning: Invalid argument supplied for foreach() in /data/as-stats/www/top.php on line 59, referer: http://192.168.5.5/
[Tue Oct 30 01:23:07.412953 2018] [:error] [pid 1206] [client 192.168.5.95:25953] PHP Notice: Undefined variable: asstats in /data/as-stats/www/func.inc on line 139, referer: http://192.168.5.5/as-stats/top.php
[Tue Oct 30 01:23:07.413152 2018] [:error] [pid 1206] [client 192.168.5.95:25953] PHP Warning: Invalid argument supplied for foreach() in /data/as-stats/www/top.php on line 59, referer: http://192.168.5.5/as-stats/top.php

need help here please

Regards

Clifford Dsouza

"inet_pton" is not exported by the Socket module

i'm trying to run as-stats, but have some errors below

"inet_pton" is not exported by the Socket module

"inet_ntop" is not exported by the Socket module
Can't continue after import errors at /data/as-stats/bin/asstatd.pl line 10
BEGIN failed--compilation aborted at /data/as-stats/bin/asstatd.pl line 10

i'm not sure whats wrong, since my last installed on old machine on december 2017 was fine.
today i'm installing on new machine have problem above

Do not create files in the rrd directory

Hi,

I installed and configured AS-STATS. I have it running. The rrd files are not created in the rrd folder. I configured a flow collector both nfprobe and pmacct. I checked with tcpdump and it is receiving the flows correctly.

Any help to solve this problem?

Thanks.

rrd-extractstats.pl needs sort on %knownlinks & requires statsfile to be deleted if knownlinks file has changed

  1. With the addition of skipifnotmodified, the stats table is no longer being re-created during every run. However, function read_knownlinks() loads all the links into a hash %knownlinks which has inconsistent sort order when it's filled into @links.

Quick fix for is to update line 41:

my @links = values %knownlinks;

to

my @links = sort values %knownlinks;

This will keep the list of links consistent across runs.

  1. Per above, since stats table is no longer recreated during every run, if there's a new link added (or removed) the statsfile needs to be deleted so that rrd-extractstats.pl will recreate. Ideally schema should be checked to identify if there's any new links added (or removed).

Sudden php errors !!

Hi,

We had setup as-stats 2 days back and everything was working perfectly until today. I just restarted as-stats after which i am no more able access web interface and web logs are showing following errors :

http://prntscr.com/hp0yhx

ERROR: No DS called...

Hello,

I'm using the last version of source and getting this error on httpd-error.log.

ERROR: No DS called '%DSNAME%'

Where %DSNAME% = tag from knownlinks file plus "_in" or "_v6_in"

This is runing on FreeBSD 11, I double check knownlinks file for spaces, wrong interface index, etc, and I can find anything wrong on my configuration.

Any ideas of what can cause this error?

Error when run rrd-extractstats.pl

Can't use bareword ("as_list") as a HASH ref while "strict refs" in use at ./rrd-extractstats.pl line 57.

My perl version:

This is perl 5, version 30, subversion 2 (v5.30.2) built for amd64-freebsd-thread-multi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.