fortianalyzer-ops

Query FortiAnalyzer traffic logs to verify whether firewall rules are actually matched.

650|182|Updated Feb 19, 2026
One-click install
npx skills add https://github.com/automateyournetwork/netclaw --skill fortianalyzer-ops
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fortianalyzer-ops
Source: https://github.com/automateyournetwork/netclaw/tree/main/workspace/skills/fortianalyzer-ops
Command: npx skills add https://github.com/automateyournetwork/netclaw --skill fortianalyzer-ops

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Determining whether a firewall rule is genuinely unused is easy to get wrong: an empty log result can mean the device never forwarded logs, logging is disabled on the rule, or the query window was too short. This Skill queries FortiAnalyzer traffic logs within explicit, bounded time windows and returns a distinct no_logs_in_window outcome so silence is never misreported as proof a rule is dead.

Core Features & Use Cases

  • Policy-filtered log queries: Search traffic logs by filter expression (e.g. policyid=12) within a mandatory, echoed time window, with offset-based pagination via faz_fetch_more.
  • Per-policy activity checks: Use faz_policy_activity to learn whether anything matched a given policy in a window, with sessions_matched counts.
  • Logging-device inventory: Run faz_list_devices first to confirm the device owning the rule actually forwards logs to this analyzer before trusting any empty result.
  • Use Case: Before decommissioning a firewall rule, confirm the device forwards logs, query a generous window for policy activity, and only treat the rule as a removal candidate after verifying log forwarding, retention coverage, and per-rule logging—then route the change through FortiManager with a ServiceNow CR.

Quick Start

Ask the agent to check whether any traffic has matched firewall policy 12 on FortiAnalyzer over the last 30 days.

Frequently Asked Questions about fortianalyzer-ops

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check if a firewall rule is unused in FortiAnalyzer?

First run faz_list_devices to confirm the device forwards logs, then call faz_policy_activity with the policy id and a generous time window. A result of no_logs_in_window means nothing matched in that window only—it is not proof the rule is unused until log forwarding, retention, and per-rule logging are verified.

How to query FortiAnalyzer traffic logs by policy ID?

Use faz_query_logs with a filter expression such as policyid=12 and an explicit time window. Page through results with faz_fetch_more using the returned next_offset while has_more is true, since search task IDs are single-use and cannot act as cursors.

Why does a FortiAnalyzer log query return no results?

Empty results can mean nothing matched in the queried window, the device never forwarded logs to the analyzer, or logging is disabled on the rule itself. The skill returns the explicit outcome no_logs_in_window rather than ok, and you should check faz_list_devices before trusting silence.

What FortiAnalyzer version and credentials are required?

The skill requires FortiAnalyzer 7.2.2 or later for token authentication. You must set the FORTIANALYZER_HOST and FORTIANALYZER_API_TOKEN environment variables, plus FORTINET_MCP_CMD to launch the fortinet-mcp server over stdio.

Can this skill modify or delete firewall rules?

No, all four tools are strictly read-only. Findings justify a change but never make one; actual rule removal must go through fortimanager-ops, which enforces write gates, and a ServiceNow change request for production modifications.