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

SNMP Plugin #228

Open
agirdea opened this issue May 18, 2023 · 1 comment
Open

SNMP Plugin #228

agirdea opened this issue May 18, 2023 · 1 comment

Comments

@agirdea
Copy link

agirdea commented May 18, 2023

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
@leiweibau
Copy link

Plugins are supported only by @jokob-sk. So if you need help, open an issue in his fork (https://github.com/jokob-sk/Pi.Alert/issues)

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