Skip to content

SNMP Plugin #228

@agirdea

Description

@agirdea

Hi,
Having troubles with runing the SNMP plug in. Running the snmpwalk command by itself produces the expected result, but not the plugin. Below is the debug report, for trying to run it on the router 192.168.111.1.

 [Plugins] ---------------------------------------------
 [Plugins] display_name: SNMP discovery
 [Plugins] CMD: python3 /home/pi/pialert/front/plugins/snmp_discovery/script.py routers={s-quote}{routers}{s-quote}
 [Plugins] Timeout: 5

192.168.111.1: snmpwalk -v 2c -c public -OXsq 192.168.111.1 .1.3.6.1.2.1.3.1.1.2
[Plugins]: Pre-Resolved CMD: python3/home/pi/pialert/front/plugins/snmp_discovery/script.pyrouters={s-quote}{routers}{s-quote}
[Plugins] Executing: python3 /home/pi/pialert/front/plugins/snmp_discovery/script.py routers={s-quote}{routers}{s-quote}
[Plugins] Resolved : ['python3', '/home/pi/pialert/front/plugins/snmp_discovery/script.py', "routers='192.168.111.1: snmpwalk -v 2c -c public -OXsq 192.168.111.1 .1.3.6.1.2.1.3.1.1.2'"]
192.168.111.1: snmpwalk -v 2c -c public -OXsq 192.168.111.1 .1.3.6.1.2.1.3.1.1.2
Traceback (most recent call last):
File "/home/pi/pialert/front/plugins/snmp_discovery/script.py", line 169, in
main()
File "/home/pi/pialert/front/plugins/snmp_discovery/script.py", line 53, in main
newEntries = get_entries(newEntries)
File "/home/pi/pialert/front/plugins/snmp_discovery/script.py", line 85, in get_entries
output = subprocess.check_output (snmpwalkArgs, universal_newlines=True, stderr=subprocess.STDOUT, timeout=(timeoutSec ))
File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.9/subprocess.py", line 505, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.9/subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '192.168.111.1:'

    [Plugins] Error - enable LOG_LEVEL=debug and check logs
    [Plugins] No output received from the plugin SNMPDSC - enable LOG_LEVEL=debug and check logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions