jokob-sk / NetAlertX

🖧🔍 WIFI / LAN intruder detector. Scans for devices connected to your network and alerts you if new and unknown devices are found.
GNU General Public License v3.0
3.1k stars 187 forks source link

How to activate a plugin (SNMP) #446

Closed ouranos6 closed 1 year ago

ouranos6 commented 1 year ago

Describe the issue

When submitting an issue ❗enable debug❗ and have a look at the docs

I'am looking to activate the SNMP plugin to monitor some switchs from HP and Aruba Instant ON. I've found some informations about the SNMP plugin here but unfortunatly I didn't found where to activate this plugin.

anls -la /opt/pialert/front/ doesn't show any plugin folder.

I took the LXC installation script from this amazing repo for Proxmox if it can help.

Thank you in advance for your much apreciated help.

pialert.conf

#-------------------------------------------------------------------------------
#  Pi.Alert
#  Open Source Network Guard / WIFI & LAN intrusion detector 
#
#-------------------------------------------------------------------------------
#  Puche 2021        pi.alert.application@gmail.com        GNU GPLv3
#  leiweibau 2021                                          GNU GPLv3
#-------------------------------------------------------------------------------

# General Settings
# ----------------------
PIALERT_PATH           = '/opt/pialert'
DB_PATH                = PIALERT_PATH + '/db/pialert.db'
LOG_PATH               = PIALERT_PATH + '/log'
PRINT_LOG              = False
VENDORS_DB             = '/usr/share/arp-scan/ieee-oui.txt'
PIALERT_WEB_PROTECTION = False
PIALERT_WEB_PASSWORD   = 'PWD'

# Other Modules
# ----------------------
SCAN_WEBSERVICES = False
ICMPSCAN_ACTIVE = True

# Special Protocol Scanning
# ----------------------
SCAN_ROGUE_DHCP        = False
DHCP_SERVER_ADDRESS    = '0.0.0.0'

# Mail-Account Settings
# ----------------------
SMTP_SERVER       = 'smtp.gmail.com'
SMTP_PORT         = 587
SMTP_USER         = 'user@gmail.com'
SMTP_PASS         = 'password'
SMTP_SKIP_TLS     = False
SMTP_SKIP_LOGIN   = False

# WebGUI Reporting
# ----------------------
REPORT_WEBGUI         = True
REPORT_WEBGUI_WEBMON  = True

# Mail Reporting
# ----------------------
REPORT_MAIL          = False
REPORT_MAIL_WEBMON   = False
REPORT_FROM          = 'Pi.Alert <' + SMTP_USER +'>'
REPORT_TO            = 'user@gmail.com'
REPORT_DEVICE_URL    = 'http://pi.alert/deviceDetails.php?mac='
REPORT_DASHBOARD_URL = 'http://pi.alert/'

# Pushsafer
# ----------------------
REPORT_PUSHSAFER         = False
REPORT_PUSHSAFER_WEBMON  = False
PUSHSAFER_TOKEN          = 'ApiKey'
PUSHSAFER_DEVICE         = 'a'

# Pushover
# ----------------------
REPORT_PUSHOVER         = False
REPORT_PUSHOVER_WEBMON  = False
PUSHOVER_TOKEN          = '<Token>'
PUSHOVER_USER           = '<User>'

# ntfy
# ----------------------
REPORT_NTFY         = False
REPORT_NTFY_WEBMON  = False
NTFY_HOST           = 'https://ntfy.sh'
NTFY_TOPIC          = 'replace_my_secure_topicname_91h889f28'
NTFY_USER           = 'user'
NTFY_PASSWORD       = 'password'
NTFY_PRIORITY       = 'default'

# Shoutrrr
# ----------------------
SHOUTRRR_BINARY    = 'armhf'
# SHOUTRRR_BINARY    = 'arm64'
# SHOUTRRR_BINARY    = 'x86'

# Telegram via Shoutrrr
# ----------------------
REPORT_TELEGRAM         = False
REPORT_TELEGRAM_WEBMON  = False
TELEGRAM_BOT_TOKEN_URL  = '<Your generated servive URL for telegram - use ~/pialert/back/shoutrrr/<your Systemtyp>/shoutrrr generate telegram>'

# DynDNS
# ----------------------
QUERY_MYIP_SERVER = 'https://myipv4.p1.opendns.com/get_my_ip'
DDNS_ACTIVE       = False
DDNS_DOMAIN       = 'your_domain.freeddns.org'
DDNS_USER         = 'dynu_user'
DDNS_PASSWORD     = 'A0000000B0000000C0000000D0000000'
DDNS_UPDATE_URL   = 'https://api.dynu.com/nic/update?'

# Arp-scan Options & Samples
# ----------------------
ARPSCAN_ACTIVE  = True
# MAC_IGNORE_LIST = ['11:22:33:aa:bb:cc']
SCAN_SUBNETS    = '--localnet'
# SCAN_SUBNETS    = '--localnet --interface=eth0'
# SCAN_SUBNETS    = [ '192.168.1.0/24 --interface=eth0', '192.168.2.0/24 --interface=eth1' ]

# Pi-hole Configuration
# ----------------------
PIHOLE_ACTIVE     = False
PIHOLE_DB         = '/etc/pihole/pihole-FTL.db'
DHCP_ACTIVE       = False
DHCP_LEASES       = '/etc/pihole/dhcp.leases'

# Fritzbox Configuration
# ----------------------
FRITZBOX_ACTIVE   = False
FRITZBOX_IP       = '192.168.17.1'
FRITZBOX_USER     = 'user'
FRITZBOX_PASS     = 'password'

# Maintenance Tasks Cron
# ----------------------
DAYS_TO_KEEP_ONLINEHISTORY = 30
DAYS_TO_KEEP_EVENTS = 90

There is not docker file because it's running in an LXC container.

leiweibau commented 1 year ago

The fork (which you seem to be using) is maintained by me. My fork is incompatible with this fork, which supports plugins.

ouranos6 commented 1 year ago

Ok… that’s why thank you for your reply.

I ve tried to use the docker one.

Do you know how the snmp discovery works ?

I’ve setup the OID and IP but nothing happens


De : leiweibau @.> Envoyé : Friday, September 15, 2023 12:02:05 PM À : jokob-sk/Pi.Alert @.> Cc : ouranos6 @.>; Author @.> Objet : Re: [jokob-sk/Pi.Alert] How to activate a plugin (SNMP) (Issue #446)

The fork (which you seem to be using) is maintained by me. My fork is incompatible with this fork, which supports plugins.

— Reply to this email directly, view it on GitHubhttps://github.com/jokob-sk/Pi.Alert/issues/446#issuecomment-1721010908, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AE6CJKDQRD6HDPI5OHORJ2LX2QRR3ANCNFSM6AAAAAA4ZPZJJM. You are receiving this because you authored the thread.Message ID: @.***>

jokob-sk commented 1 year ago

Hey @ouranos6 !

If you switched to the docker fork, can you post your updated pialert.conf file (with personal details redacted)?

In short, here is a sample setup that works for me:

image

Please also check the associated plugin docs here:

https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins/snmp_discovery

Hope this helps, j

ps. Thanks @leiweibau for clarification 🙏

jokob-sk commented 1 year ago

closing due to no activity, will re-open if needed