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

empty result set for 2012-01-01 08:00:00 #43

Closed
chenrui333 opened this issue Apr 11, 2021 · 2 comments
Closed

empty result set for 2012-01-01 08:00:00 #43

chenrui333 opened this issue Apr 11, 2021 · 2 comments

Comments

@chenrui333
Copy link

I am following the tutorial_print.py and trying to run the script for 2012-01-01 08:00:00, but somehow I only got empty result, how can I troubleshoot it? Thanks!

related code

stream = pybgpstream.BGPStream(
    filter='collector rrc06 and type ribs',
    from_time="2011-01-01 08:00:00",
    until_time="2011-01-01 08:01:00",
)

for rec in stream.records():
    print(rec.status, rec.project +"."+ rec.collector, rec.time)
    for elem in rec:
        print("\t", elem.type, elem.peer_address, elem.peer_asn, \
            elem.type, elem.fields)
@chenrui333
Copy link
Author

add collectors solve my issue.

@albertodainotti
Copy link
Contributor

@chenrui333 The issue is not related to BGPStream or to how you add the collectors. The issue you're seeing is because that RIPE RIS collector had actually almost no data in its RIB dump:
http://data.ris.ripe.net/rrc06/2011.01/
Scroll to the bottom of that page and you see all those RIBS are only 161 bytes each, whereas starting from Jan 13th 2011 they are 3MB.

Also, as a general recommendation, when you go after a specific RIB dump, it's better to indicate time ranges 5 or 10 minutes before and after the top of the hour instead of the exact hour and 1 min later. The RIB dumps are not always dumped at the exact top of the hour, and they're available only every 8 hours (RIPE RIS) or 2 hours (Route Views), so there is no risk of getting unwanted data from another RIB if you extend the time range of few minutes before and after, i.e., you will still get just that single RIB but you're sure to get it.

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

2 participants