Skip to main content
mbenvenuti
Staff
Staff
September 30, 2024

Troubleshooting: How to fix the 'Failed to get data' in License Usage page

  • September 30, 2024
  • 0 replies
  • 513 views
Description This article describes how to fix the 'Failed to get data' on the License Usage page.
Scope FortiSIEM.
Solution

After some migration versions from v5.4 to 7.2 for example, it is possible that page Admin-> License -> Usage does not load and the web browser is showing an error 'Failed to get data':

 

Usage_Licence_issue.png

 

This is caused by new FortiSIEM groups that are missing in CMDB-> Devices.

 

  1. Check FortiSIEM groups in CMDB.

Go to CMDB -> Devices -> FortiSIEM, there are the 4 groups:

  • FortiSIEM SUPER.
  • FortiSIEM Worker.
  • FortiSIEM Collector.
  • FortiSIEM Manager.

 

It is also possible to check from the super CLI as root with the following commands:

 

psql -U phoenix phoenixdb -c "select * from ph_group where natural_id='PH_SYS_DEVICE_FSM'"

psql -U phoenix phoenixdb -c "select * from ph_group where parent_id in (select id from ph_group where natural_id='PH_SYS_DEVICE_FSM')"

 

  1. Create missing groups.

If unable to find it or the query result is empty, follow the following steps from super CLI as root to create it:

 

LAST_ID=`psql -U phoenix phoenixdb -tc "select id from ph_group order by id desc limit 1;"`

echo $LAST_ID
NEW_ID=$(( $LAST_ID + 1 ))
psql -U phoenix phoenixdb -c "insert into ph_group (id,creation_time,cust_org_id,entity_version,last_modified_time,natural_id,owner_id,description,display_name,display_order,name,type,value_type,parent_id,top_group,collector_id,group_config,creation_type,value_pattern) VALUES (${NEW_ID},1724835189529,0,0,1724835189529,'PH_SYS_DEVICE_FSM',0,NULL,'FortiSIEM',3,'PH_SYS_DEVICE_FSM',2,3,NULL,'f',NULL,NULL,0,0);"
PARENT_ID=$NEW_ID

NEW_ID=$(( $NEW_ID+ 1 ))
psql -U phoenix phoenixdb -c "insert into ph_group (id,creation_time,cust_org_id,entity_version,last_modified_time,natural_id,owner_id,description,display_name,display_order,name,type,value_type,parent_id,top_group,collector_id,group_config,creation_type,value_pattern) VALUES (${NEW_ID},1724835189683,0,0,1724835189683,'PH_SYS_DEVICE_FSM_SUPER',0,NULL,'FortiSIEMSuper',1,'PH_SYS_DEVICE_FSM_SUPER',2,3,${PARENT_ID},'f',NULL,NULL,0,0);"

NEW_ID=$(( $NEW_ID+ 1 ))
psql -U phoenix phoenixdb -c "insert into ph_group (id,creation_time,cust_org_id,entity_version,last_modified_time,natural_id,owner_id,description,display_name,display_order,name,type,value_type,parent_id,top_group,collector_id,group_config,creation_type,value_pattern) VALUES (${NEW_ID},1724835189689,0,0,1724835189689,'PH_SYS_DEVICE_FSM_WORKER',0,NULL,'FortiSIEMWorker',2,'PH_SYS_DEVICE_FSM_WORKER',2,3,${PARENT_ID},'f',NULL,NULL,0,0);"

NEW_ID=$(( $NEW_ID+ 1 ))
psql -U phoenix phoenixdb -c "insert into ph_group (id,creation_time,cust_org_id,entity_version,last_modified_time,natural_id,owner_id,description,display_name,display_order,name,type,value_type,parent_id,top_group,collector_id,group_config,creation_type,value_pattern) VALUES (${NEW_ID},1724835189693,0,0,1724835189693,'PH_SYS_DEVICE_FSM_COLLECTOR',0,NULL,'FortiSIEMCollector',3,'PH_SYS_DEVICE_FSM_COLLECTOR',2,3,${PARENT_ID},'f',NULL,NULL,0,0);"

NEW_ID=$(( $NEW_ID+ 1 ))
psql -U phoenix phoenixdb -c "insert into ph_group (id,creation_time,cust_org_id,entity_version,last_modified_time,natural_id,owner_id,description,display_name,display_order,name,type,value_type,parent_id,top_group,collector_id,group_config,creation_type,value_pattern) VALUES (${NEW_ID},1724835189698,0,0,1724835189698,'PH_SYS_DEVICE_FSM_MGR',0,NULL,'FortiSIEMManager',4,'PH_SYS_DEVICE_FSM_MGR',2,3,${PARENT_ID},'f',NULL,NULL,0,0);"

 

From now on, groups are created in the CMDB but need to be populated.

 

  1. Note IDs from FortiSIEM nodes.

Find the FortiSIEM devices and note the IDs of the Supernode, Worker node, and Collector node from the following command:

 

psql -U phoenix phoenixdb -c "select id,cust_org_id,owner_id,access_ip,name,description,collector_id from ph_device where device_type_id in (select id from ph_device_type where model = 'FortiSIEM');"

 

  1. Populate the device to the right group.
  • To populate the SUPER group with super device:

ITEM_ID=<type_id_of_super>

SUPER_GROUP_ID=`psql -U phoenix phoenixdb -tc "select id from ph_group where natural_id='PH_SYS_DEVICE_FSM_SUPER' order by id desc limit 1;"`
echo $SUPER_GROUP_ID

LAST_ID=`psql -U phoenix phoenixdb -tc "select id from ph_group_item order by id desc limit 1;"`
NEW_ID=$(( $LAST_ID + 1 ))
psql -U phoenix phoenixdb -c "insert into ph_group_item (id,creation_time,cust_org_id,last_modified_time,owner_id,item_id,group_id) VALUES (${NEW_ID},1724835189698,1,1724835189698,0,${ITEM_ID},${SUPER_GROUP_ID});"

 

  • To populate the WORKER group with worker device:

ITEM_ID=<type_id_of_worker>

WORKER_GROUP_ID=`psql -U phoenix phoenixdb -tc "select id from ph_group where natural_id='PH_SYS_DEVICE_FSM_WORKER' order by id desc limit 1;"`
echo $WORKER_GROUP_ID

LAST_ID=`psql -U phoenix phoenixdb -tc "select id from ph_group_item order by id desc limit 1;"`
NEW_ID=$(( $LAST_ID + 1 ))
psql -U phoenix phoenixdb -c "insert into ph_group_item (id,creation_time,cust_org_id,last_modified_time,owner_id,item_id,group_id) VALUES (${NEW_ID},1724835189698,1,1724835189698,0,${ITEM_ID},${WORKER_GROUP_ID});"

 

  • To populate the COLLECTOR group with a collector device:

ITEM_ID=<type_id_of_collector>

COLLECTOR_GROUP_ID=`psql -U phoenix phoenixdb -tc "select id from ph_group where natural_id='PH_SYS_DEVICE_FSM_COLLECTOR' order by id desc limit 1;"`
echo $COLLECTOR_GROUP_ID

LAST_ID=`psql -U phoenix phoenixdb -tc "select id from ph_group_item order by id desc limit 1;"`
NEW_ID=$(( $LAST_ID + 1 ))
psql -U phoenix phoenixdb -c "insert into ph_group_item (id,creation_time,cust_org_id,last_modified_time,owner_id,item_id,group_id) VALUES (${NEW_ID},1724835189698,1,1724835189698,0,${ITEM_ID},${COLLECTOR_GROUP_ID});"

 

Now the 'License usage' page should be displaying the EPS usage.