Error using server_start and server_stop plugin caller

Hello,

I tried to create simple plugin that send data to our log management but I get errors with server_start and server_error caller

[winter-meadow-7307][2024-12-12 14:39:21,816][ERROR] Server error occurred while running
Traceback (most recent call last):
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/server/instance.py", line 1772, in _run_thread
    plugins.caller(
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/plugins/plugins.py", line 88, in caller
    returns.append(handler(**kwargs))
TypeError: server_stop() missing 2 required positional arguments: 'ping_interval_wg' and 'ping_timeout_wg'
  server_id   = "67486a22306b5515416105e3"
  instance_id = "675ae74c1a4dd1fa71fdb8a5"

Here the plugin code:

def server_start(host_id, host_name, server_id, server_name, wg, port,
        port_wg, protocol, ipv6, ipv6_firewall, network, network6, network_wg,
        network6_wg, network_mode, network_start, network_stop,
        restrict_routes, bind_address, onc_hostname, dh_param_bits,
        multi_device, dns_servers, search_domain, otp_auth, cipher, hash,
        inter_client, ping_interval, ping_timeout, ping_interval_wg,
        ping_timeout_wg, link_ping_interval, link_ping_timeout, max_clients,
        replica_count, dns_mapping, debug, interface, interface_wg,
        bridge_interface, vxlan, **kwargs):
  json_record = {
    "event": "server_start"
  }
  splunk.send_data(json_record)
def server_stop(host_id, host_name, server_id, server_name, wg, port,
        port_wg, protocol, ipv6, ipv6_firewall, network, network6, network_wg,
        network6_wg, network_mode, network_start, network_stop,
        restrict_routes, bind_address, onc_hostname, dh_param_bits,
        multi_device, dns_servers, search_domain, otp_auth, cipher, hash,
        inter_client, ping_interval, ping_timeout, ping_interval_wg,
        ping_timeout_wg, link_ping_interval, link_ping_timeout, max_clients,
        replica_count, dns_mapping, debug, interface, interface_wg,
        bridge_interface, vxlan, **kwargs):
  json_record = {
    "event": "server_stop"
  }
  splunk.send_data(json_record)

Any idea what I’m doing wrong ?

Those 2 args need to be removed from the plugin functions. The example code is for the release currently in the unstable repository which added new args.

Oh ok, thanks for your help