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

ICMP Plugin Typo line 81 #1025

Open
3 of 7 tasks
Ch-Philou opened this issue Mar 21, 2025 · 3 comments
Open
3 of 7 tasks

ICMP Plugin Typo line 81 #1025

Ch-Philou opened this issue Mar 21, 2025 · 3 comments
Labels
bug 🐛 Something isn't working next release/in dev image 🚀 This is coming in the next release or was already released if the issue is Closed.

Comments

@Ch-Philou
Copy link

Is there an existing issue for this?

The issue occurs in the following browsers. Select at least 2.

  • Firefox
  • Chrome
  • Edge
  • Safari (unsupported) - PRs welcome
  • N/A - This is an issue with the backend

Current Behavior

Hello,

there is a typo mistake on line 81 in front/plugins/icmp_scan/icmp.py
It create a '[Ad-hoc events] Events executed: run with param ICMP' and by checking log
mylog('verbose', [f'[{pluginName}] ip: "{device['devLastIP']}" is_online: "{is_online}"'])
this should be
mylog('verbose', [f'[{pluginName}] ip: "{device["devLastIP"]}" is_online: "{is_online}"'])

That not a lot of trouble :)

Expected Behavior

22:54:49 [2025-03-21 22:54:49+01:00] START Run: ICMP
22:54:49 [Plugins] Executing: python3 /app/front/plugins/icmp_scan/icmp.py
22:54:49 [ICMP] In script
22:54:49 [Database] Opening DB
22:54:49 [ICMP] Devices to PING: 64
22:54:50 [ICMP] DEBUG OUTPUT : PING A.B.C.D (A.B.C.D) 56(84) bytes of data.
64 bytes from A.B.C.D: icmp_seq=1 ttl=64 time=0.515 ms
64 bytes from A.B.C.D: icmp_seq=2 ttl=64 time=0.622 ms
64 bytes from A.B.C.D: icmp_seq=3 ttl=64 time=0.336 ms

Steps To Reproduce

Just run the plugin, and check error logs:

22:53:38 [Plugins] Executing: python3 /app/front/plugins/icmp_scan/icmp.py
22:53:38 File "/app/front/plugins/icmp_scan/icmp.py", line 81
mylog('verbose', [f'[{pluginName}] ip: "{device['devLastIP']}" is_online: "{is_online}"'])
^^^^^^^^^
SyntaxError: f-string: unmatched '['

app.conf

Not needed

docker-compose.yml

Not needed

What installation are you running?

Production (netalertx)

app.log

Not needed

Debug enabled

  • I have read and followed the steps in the wiki link above and provided the required debug logs and the log section covers the time when the issue occurs.
@Ch-Philou Ch-Philou added the bug 🐛 Something isn't working label Mar 21, 2025
jokob-sk pushed a commit that referenced this issue Mar 21, 2025
@jokob-sk jokob-sk added the next release/in dev image 🚀 This is coming in the next release or was already released if the issue is Closed. label Mar 21, 2025
@jokob-sk
Copy link
Owner

Thanks for the report!

This should be fixed in the next release. It would be great if you could test this. Can you please switch to the netalertx-dev docker image (backup everything at first or, ideally spin up a separate container with a separate db and config), in about 15 minutes (or after the last action finishes) from now?

Thanks in advance,
j

@Ch-Philou
Copy link
Author

ok I do the change on my local LXC code (docker equivalent on proxmox) and it's all good.

I'am not very used to complex github manipulation, should I change branch (next release seems a good candidate :D ) or is it a complete new repository?

By the way:

  • I can give you a .md for LXC install (with auto load on boot, relaod, and watchdog if you want) but in a few days :)
  • you do a great job :)

Best regards

@jokob-sk
Copy link
Owner

Hi @Ch-Philou ,

Thanks for testing.

The main branch is also used in the netalertx-dev image, so you shouldn't need to switch branches. next_release is for potential backward compatibility breaking changes.

I can give you a .md for LXC install (with auto load on boot, relaod, and watchdog if you want) but in a few days :)

This would be amazing if you don't mind sharing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working next release/in dev image 🚀 This is coming in the next release or was already released if the issue is Closed.
Projects
None yet
Development

No branches or pull requests

2 participants