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

Restore manual naming of static leases using comments for MTSCAN #938

Closed
wants to merge 1 commit into from

Conversation

kpolszewski
Copy link

It was removed as part of #759 (exactly: https://github.com/jokob-sk/NetAlertX/pull/759/files#diff-3141c3ddff99ee9cccc877150d8bd75a6a5227c3f049d6fe7809ef27b77cbb71L91 ), however comments are used to provide custom device names for Mikrotik's static leases

for example:
image

@kpolszewski kpolszewski changed the title Restore manual naming of static leases using comments for MKSCAN Restore manual naming of static leases using comments for MTSCAN Jan 6, 2025
@jokob-sk
Copy link
Owner

jokob-sk commented Jan 7, 2025

Hi @kpolszewski ,

I'm not a fan of this approach because it's hidden functionality.

How about instead:

  1. Check if name in NAX is different from the name received from Mikrotik
  2. If different, update the name in Mikrotik's static leases

What do you think about this approach. Do you see any issues?

@jokob-sk
Copy link
Owner

jokob-sk commented Jan 7, 2025

We should also update the readme of this plugin to make this clear

@kpolszewski
Copy link
Author

kpolszewski commented Jan 7, 2025

@jokob-sk sorry, but could you rephrase your alternative?

Check if name in NAX is different from the name received from Mikrotik

The names in NAX are fetched via plugins. In this case, the MTScan plugin fetches data from the MikroTik API /ip/dhcp-server/lease/print such as: IP, MAC, hostname, and a user-defined comment in the MikroTik console, used to name the static lease.

At the moment, I have 35 devices named in the MikroTik console. After running the plugin, they are added to NAX but using only the hostname, which means I have to rename these 35 devices again because I cannot display helpVal1 directly in the device list.

Anyway, we can close this if you do not like it. I thought it was a regression because both I and the original author of the plugin rely on this convention.

@kpolszewski kpolszewski closed this Jan 7, 2025
@jokob-sk
Copy link
Owner

jokob-sk commented Jan 7, 2025

Ah sorry, I misunderstood the use case - please re-open the PR and I will approve - sorry for the confusion. By the way we can also populate the actual comment field in NAX if that's something we want to do. Happy to help setting that up

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

Successfully merging this pull request may close these issues.

2 participants