Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
I wrote a new plugin that has similar features as arpwatch. I would like to share it with the community so that everyone can use it.
This is my first plugin and I still not fully understand how everything interacts with the OPNsense UI/API. Could you help me with a few questions?
How to troubleshoot API errors? When the GUI tries to call
https://192.168.133.1/api/opnarplog/service/stop
then it returns{"response":"Error (127)"}
. Before I renamed my plugin everything worked. Now I'm clueless where the error could be. Same forhttps://192.168.133.1/api/opnarplog/service/status
where I get{"status":"unknown","widget":{"caption_stop":"stop service","caption_start":"start service","caption_restart":"restart service"}}
.SOLVED: I made a call to
/usr/local/bin/bash
which does not exist on a plain installation. It was replaced with a service call.How does the logging work in OPNsense? Currently I'm writing to a logfile under
/var/log/opnarplog.log
and rotate it with my script. The logformat is not recognized, but somehow the logfile is recognized on the logpage.To test the plugin :
net-mgmt/opnarplog/src
to the firewall folder/usr/local