-
Notifications
You must be signed in to change notification settings - Fork 17
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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 license status of passive firewall in HA Cluster mode via API ? #33
Comments
Using the following example, you can get HA and license statuses from pprint import pprint
from fortigate_api import FortiGate
HOST = "host"
USERNAME = "username"
PASSWORD = "password"
fgt = FortiGate(host=HOST, username=USERNAME, password=PASSWORD)
# Get HA master/slave status
response = fgt.get(url="api/v2/monitor/system/ha-checksums")
print(f"GET {response}", ) # POST <Response [200]>
result = response.json()["results"]
pprint(result)
# GET <Response [200]>
# [{'checksum': {'all': 'd626cc36457249e24d66cc69003363a7',
# ...
# 'is_manage_master': 0,
# 'is_root_master': 0,
# ...
# 'is_manage_master': 1,
# 'is_root_master': 1,
# ...
# Get license status
response = fgt.get(url="api/v2/monitor/license/status")
print(f"GET {response}", ) # POST <Response [200]>
result = response.json()["results"]
pprint(result)
# GET <Response [200]>
# {'antispam': {'entitlement': 'SPAM',
# 'status': 'no_license',
# 'type': 'live_fortiguard_service'},
# 'antivirus': {'db_status': 'db_type_extended',
# ... |
The suggested script doesn't connect to passive firewall in cluster and get license details.. |
Repository owner
locked and limited conversation to collaborators
Aug 6, 2024
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
No description provided.
The text was updated successfully, but these errors were encountered: