Skip to content

ASN Lookup expert: create missing database file #2682

@rvyhnal

Description

@rvyhnal

Hello all, during a recent update i got confused slightly by the behavior of the asn_lookup expert:

  • in a custom script we run before starting intelmq, we check whether the database file exists. If it doesnt we run intelmq.bots.experts.asn_lookup.expert --update-database as advised in the docs
  • but the command fails with:
... /intelmq/bots/experts/asn_lookup/expert.py", line 127, in update_database
    raise ValueError('Database file does not exist or is not a file.')
ValueError: Database file does not exist or is not a file.
Bot 'asn-lookup-expert': File given as parameter 'database' (/var/lib/intelmq/bots/asn_lookup/ipasn.dat) does not exist. You may need to trigger first downloading manually. See: https://docs.intelmq.org/latest/user/bots/#asn-lookup.

My question is why not make the bot download the fresh database if it's missing - everything seems to be ready for it in the bot's code. I can submit a PR if this is agreed upon.

Otherwise, the linked docs could be improved with an explanation on why we need to do the initial download manually.

Cheers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorfeatureIndicates new feature requests or new featuresgood first issueIndicates a good issue for first-time contributorshelp wantedIndicates that a maintainer wants help on an issue or pull requestusability

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions