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 for https://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 :
Copy the content of the repository folder net-mgmt/opnarplog/src to the firewall folder /usr/local
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