Closed bethatasitmay closed 2 months ago
Never mind - I made a mistake. I thought I tested a pipe separated list with action surrounded in single quotes but apparently I did not. I just tried that and it worked.
to answer for other people who are running into the same: The answer can be found by running this help:
pan-os-php type=rule help exporttoexcel
the additional arguments are pipeSeparatedList
-- additionalFields :
OPTIONAL
type=pipeSeparatedList
choices: ResolveAddressSummary, ResolveServiceSummary, ResolveServiceAppDefaultSummary, ResolveApplicationSummary, ResolveScheduleSummary, ApplicationSeen, HitCount
pipe(|) separated list of additional field to include in the report. The following is available:
- ResolveAddressSummary : fields with address objects will be resolved to IP addressed and summarized in a new column
- ResolveServiceSummary : fields with service objects will be resolved to their value and summarized in a new column
- ResolveServiceAppDefaultSummary : fields with application objects will be resolved to their service default value and summarized in a new column
- ResolveApplicationSummary : fields with application objects will be resolved to their category and risk
- ResolveScheduleSummary : fields with schedule objects will be resolved to their expire time
- ApplicationSeen : all App-ID seen on the Device SecurityRule will be listed
- HitCount : Rule - 'first-hit' - 'last-hit' - 'hit-count' - 'rule-creation will be listed
The correct command is:
pan-os-php type=rule in=api://panorama.domain.com location=any ruletype=security 'actions=display:HitCount|ApplicationSeen' shadow-json 'filter=(schedule.expire.in.days < -90)'
And as the standard CLI output for type=rule 'actions=display'
is already packed, this additional information is only available with the additional argument shadow-json
, where the output is in JSON format.
Thanks!
Describe the bug
When I use the parameters HitCount and ApplicationSeen with either exportToExcel or display, it doesn't work.
When I use the parameter HitCount or ApplicationSeen alone with either exportToExcel or display, the output appears as expected.
Expected behavior
My expectation is that using both parameters will include them in the results.
Current behavior
I receive the following errors (with or without the single quotes surrounding the action):
exportToExcel
display
Steps to reproduce
See commands above
Context
This is a nice to have - I can simply run them separately.
Your Environment