NAME
WebService::OPNsense::Diagnostics - Diagnostics API controller
VERSION
version 0.001
SYNOPSIS
my $diag = $opn->diagnostics;
my $result = $diag->ping('192.168.1.1');
my $states = $diag->pf_states;
my $info = $diag->system_information;
DESCRIPTION
Network and system diagnostics.
NAME
WebService::OPNsense::Diagnostics - Diagnostics API controller
METHODS
search_service
my $results = $diag->search_service(%params);
Searches for system services.
syslog
my $logs = $diag->syslog(%params);
Searches syslog entries. Parameters: current, rowCount, searchPhrase.
ping
my $result = $diag->ping($host);
Pings a host. Returns ping statistics.
traceroute
my $result = $diag->traceroute($host);
Traces the route to a host.
dns_lookup
my $result = $diag->dns_lookup($host);
Performs a DNS lookup for a hostname.
activity
my $activity = $diag->activity;
Returns system activity information.
firewall_log
my $log = $diag->firewall_log;
Returns the firewall log.
firewall_log_filters
my $filters = $diag->firewall_log_filters;
Returns available firewall log filter options.
pf_states
my $states = $diag->pf_states;
Returns current pf state table.
pf_statistics
my $stats = $diag->pf_statistics;
my $stats = $diag->pf_statistics($section);
Returns pf statistics. Optionally specify a section.
firewall_stats
my $stats = $diag->firewall_stats;
Returns firewall statistics summary.
del_state
my $result = $diag->del_state($stateid, $creatorid);
Deletes a specific pf state entry.
flush_states
my $result = $diag->flush_states;
Flushes all pf state entries.
flush_sources
my $result = $diag->flush_sources;
Flushes all source tracking entries.
kill_states
my $result = $diag->kill_states;
Kills all pf state entries.
interface_statistics
my $stats = $diag->interface_statistics;
Returns network interface statistics.
interface_names
my $names = $diag->interface_names;
Returns a list of network interface names.
interface_config
my $config = $diag->interface_config;
Returns network interface configuration.
arp_table
my $arp = $diag->arp_table;
Returns the ARP table.
ndp_table
my $ndp = $diag->ndp_table;
Returns the NDP (IPv6 neighbor) table.
routes
my $routes = $diag->routes;
Returns the system routing table.
flush_arp
my $result = $diag->flush_arp;
Flushes the ARP cache.
memory
my $memory = $diag->memory;
Returns memory usage information.
system_information
my $info = $diag->system_information;
Returns general system information.
system_disk
my $disk = $diag->system_disk;
Returns disk usage information.
system_time
my $time = $diag->system_time;
Returns the current system time.
portprobe
my $result = $diag->portprobe($probe_data);
Probes a port on a remote host. $probe_data should contain host and port fields.
traffic
my $traffic = $diag->traffic;
Returns current traffic statistics per interface.
AUTHOR
Dean Hamstead <dean@fragfest.com.au>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2026 by Dean Hamstead.
This is free software, licensed under:
The MIT (X11) License