How to get license status of passive firewall in HA Cluster mode via API ? #36
Unanswered
FrancisPrakash
asked this question in
Q&A
Replies: 2 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',
# ... |
Beta Was this translation helpful? Give feedback.
0 replies
-
The suggested script doesn't connect to passive firewall in cluster and get license details.. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Beta Was this translation helpful? Give feedback.
All reactions