NethServer / nethsecurity

NethSecurity image and build environment
https://www.nethsecurity.org/
Other
82 stars 6 forks source link

Inventory: basic usage statistics #537

Closed gsanchietti closed 1 month ago

gsanchietti commented 1 month ago

Gather anonymous statistics on system usage.

Analyze data to identify:

Data to collect:

github-actions[bot] commented 1 month ago

Testing image version: 8-23.05.3-ns.0.0.5-rc2-79-g739b6d1

Tbaile commented 1 month ago

On a fresh installation the phonehome script fails:

File "/usr/lib/python3.11/site-packages/nethsec/inventory/__init__.py", line 59, in fact_threat_shield

This is because the ban_feed field doesn't exists, possible solution below:

    try:
        for feed in uci.get_all("banip", "global", "ban_feed"):
            if feed.startswith("nethesis") or feed.startswith("yoroy"):
                ret['enterprise'] += 1
            else:
                ret['community'] += 1
    except:
        pass

Also, mwan.type is null when no multi wan is configured, I'd remove the field entirely

gsanchietti commented 1 month ago

I prefer to keep the mwan field even if empty, it's still a valid information.

I'm going to fix the banip fact.

gsanchietti commented 1 month ago

Testing image version: 8-23.05.3-ns.0.0.5-rc2-80-g3318916

Tbaile commented 1 month ago

mwan field

Not the whole mwan field, just the type one, but fine either way