Hi
If I want to get info with json of my gateway interface I run this command:
mgmt_cli -r true show interface name "eth0" --context gaia_api --version 1.7 --format json
This command should run on mannagement server or gateway it self?
If i run it on management server I get this:
[Expert@SMS-TEST-API:0]# mgmt_cli -r true show interface name "eth0" --context gaia_api --version 1.7 --format json
{
"code" : "generic_error",
"message" : "Error 503. The Management API service is not available. Please check that the Management API server is up and running."
}
even if api status is this:
[Expert@SMS-TEST-API:0]# api status
------------
API Settings:oubleshooting data, please run 'api status -s <comment>'
---------------------
Accessibility: Require local
Automatic Start: Enabled
Processes:
Name State PID More Information
-------------------------------------------------
API Started 17939
CPM Started 17939 Check Point Security Management Server is running and ready
FWM Started 17559
APACHE Started 16609
Port Details:
-------------------
JETTY Internal Port: 54316
JETTY Documentation Internal Port: 56451
APACHE Gaia Port: 443
Profile:
-------------------
Machine profile: Small Medium env resources profile
CPM heap size: 1280m
Apache port retrieved from: httpd-ssl.conf
--------------------------------------------
Overall API Status: Started
--------------------------------------------
API readiness test SUCCESSFUL. The server is up and ready to receive connections
Notes:
------------
To collect troubleshooting data, please run 'api status -s <comment>'
and gaia api:
[Expert@SMS-TEST-API:0]# gaia_api status
API Status:
---------------------
Build: cp991255069
Uptime: 2 days, 0:36:33.266998
Current Sessions: Unknown
Latest Version: 1.6
Processes:
Name State PID
---------------------------------
GAIA_API Started 16712
GAIA_API_DOCS Started 16710
APACHE Started 16609
CONFD Started 16607
CLISHD Started 55921 16675
CELERY Started 16674
REDIS Started 16678
Port Details:
-------------------
APACHE Gaia Port: 443
--------------------------------------------
Overall API Status: Stopped
- Error: Apache server unreachable
- Warning: Documentation server is unreachable
--------------------------------------------
if irun the command directly on the gateway i get this:
[Expert@A-GW-TEST:0]# mgmt_cli -r true show interface name "eth0" --context gaia_api --version 1.7 --format json
Error: Failed to login to the management server
[Expert@A-GW-TEST:0]# gaia_api status
API Status:
---------------------
Build: cp991255069
Uptime: 0:03:47.452001
Current Sessions: 0
Latest Version: 1.6
Processes:
Name State PID
---------------------------------
GAIA_API Started 18650
GAIA_API_DOCS Started 18648
APACHE Started 18581
CONFD Started 18579
CLISHD Started 23264 22034 18643
CELERY Started 18642
REDIS Started 18646
Port Details:
-------------------
APACHE Gaia Port: 443
--------------------------------------------
Overall API Status: Started
--------------------------------------------
So, how and where can I run Gaia API commands?