Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HOW TO GET HIT COUNT #239

Closed
EdoardoMDP opened this issue Jun 30, 2020 · 3 comments · Fixed by #310
Closed

HOW TO GET HIT COUNT #239

EdoardoMDP opened this issue Jun 30, 2020 · 3 comments · Fixed by #310

Comments

@EdoardoMDP
Copy link

EdoardoMDP commented Jun 30, 2020

Hi all,

Is there a method to get hit count value?

Thanks

@ishuguru
Copy link

I have also looked around but cant find anything

@rebelfish
Copy link

You can get rule hit count using 'op'.
Build the base object:

pandev = base.PanDevice.create_from_device(<panorama/firewall>, api_username=, api_password=)
dg = 'My Device Group'
rule = 'My Rule Name'
cmd_rule-hit-count = ''.format(dg, rule)
resp_rule-hit-count = pandev.op(cmd=cmd_rule-hit-count, cmd_xml=False)
This will pull the rule hit count data for each firewall in the device group and the tree will look like:

yes yes

shinmog added a commit that referenced this issue Mar 9, 2021
Fixes #239 - Adds `rule_hit_count()` to firewall.
shinmog added a commit that referenced this issue Mar 12, 2021
Fixes #239 - Adds `opstate.get_rule_hit_count()` to both the rulebases and
to all supported rule types.
shinmog added a commit that referenced this issue Mar 31, 2021
Fixes #239 - Adds `opstate.get_rule_hit_count()` to both the rulebases and
to all supported rule types.
shinmog added a commit that referenced this issue Mar 31, 2021
Fixes #239 - Adds `opstate.get_rule_hit_count()` to both the rulebases and
to all supported rule types.
shinmog added a commit that referenced this issue May 6, 2021
Fixes #239 - Adds `opstate.get_rule_hit_count()` to both the rulebases and
to all supported rule types.
github-actions bot pushed a commit that referenced this issue May 6, 2021
## [1.1.0](v1.0.2...v1.1.0) (2021-05-06)

### Features

* Add `PanDevice.plugins()` ([fa1e4a6](fa1e4a6)), closes [#263](#263)
* Add audit comment support for rules ([#323](#323)) ([350840f](350840f)), closes [#272](#272) [#209](#209)
* Add Authentication profile/sequance ([#286](#286)) ([a66a01d](a66a01d))
* Add device group hierarchy support ([#321](#321)) ([ef90979](ef90979))
* Add DHCP relay support ([#319](#319)) ([fde1fe4](fde1fe4)), closes [#251](#251) [#259](#259)
* Add hit count support (opstate) ([#310](#310)) ([ba1f4d5](ba1f4d5)), closes [#239](#239)
* Add PanDevice.whoami() ([#318](#318)) ([f00d587](f00d587)), closes [#261](#261)
* Add static route path monitoring ([7662496](7662496)), closes [#296](#296)
* Add Zone 8.0+ support ([21f7026](21f7026)), closes [#158](#158)
* Content version by refresh_system_info() ([00f982f](00f982f))
* Save versions during device refresh ([7d7a7f9](7d7a7f9))

### Bug Fixes

* Add missing tag colors ([d021922](d021922)), closes [#267](#267)
* Anti-replay specified twice ([#274](#274)) ([aa30205](aa30205))
* AuthenticationSequence class name ([9632c93](9632c93))
* Correct `clock()` parsing ([48faab5](48faab5)), closes [#278](#278)
* correct user-id tag_user / untag_user ([#299](#299)) ([1de69f8](1de69f8)), closes [#287](#287)
* Correcting profile xpaths ([#333](#333)) ([c1ac9c4](c1ac9c4)), closes [#266](#266)
* Fix placement of default PAN-OS version const ([6fd6ae3](6fd6ae3))
* Fix show_system_resource parsing ([83ab35d](83ab35d)), closes [#280](#280)
@github-actions
Copy link

github-actions bot commented May 6, 2021

🎉 This issue has been resolved in version 1.1.0 🎉

The release is available on PyPI and GitHub release

Posted by semantic-release bot

btorresgil pushed a commit that referenced this issue May 10, 2021
## [1.1.0](v1.0.2...v1.1.0) (2021-05-06)

### Features

* Add `PanDevice.plugins()` ([fa1e4a6](fa1e4a6)), closes [#263](#263)
* Add audit comment support for rules ([#323](#323)) ([350840f](350840f)), closes [#272](#272) [#209](#209)
* Add Authentication profile/sequance ([#286](#286)) ([a66a01d](a66a01d))
* Add device group hierarchy support ([#321](#321)) ([ef90979](ef90979))
* Add DHCP relay support ([#319](#319)) ([fde1fe4](fde1fe4)), closes [#251](#251) [#259](#259)
* Add hit count support (opstate) ([#310](#310)) ([ba1f4d5](ba1f4d5)), closes [#239](#239)
* Add PanDevice.whoami() ([#318](#318)) ([f00d587](f00d587)), closes [#261](#261)
* Add static route path monitoring ([7662496](7662496)), closes [#296](#296)
* Add Zone 8.0+ support ([21f7026](21f7026)), closes [#158](#158)
* Content version by refresh_system_info() ([00f982f](00f982f))
* Save versions during device refresh ([7d7a7f9](7d7a7f9))

### Bug Fixes

* Add missing tag colors ([d021922](d021922)), closes [#267](#267)
* Anti-replay specified twice ([#274](#274)) ([aa30205](aa30205))
* AuthenticationSequence class name ([9632c93](9632c93))
* Correct `clock()` parsing ([48faab5](48faab5)), closes [#278](#278)
* correct user-id tag_user / untag_user ([#299](#299)) ([1de69f8](1de69f8)), closes [#287](#287)
* Correcting profile xpaths ([#333](#333)) ([c1ac9c4](c1ac9c4)), closes [#266](#266)
* Fix placement of default PAN-OS version const ([6fd6ae3](6fd6ae3))
* Fix show_system_resource parsing ([83ab35d](83ab35d)), closes [#280](#280)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants