Skip to content

Commit 73e3a10

Browse files
authored
Additional debug logs collected as part of CloudGuard Central License logs collector (#508)
1 parent 82847c5 commit 73e3a10

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

common/central_license_debug_collector.sh

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# For additional information please refer to CloudGuard Network Central License Tool Administration Guide.
1212

1313

14-
# Licenses_Collector - version 5
14+
# Licenses_Collector - version 6
1515

1616
usage()
1717
{
@@ -106,9 +106,27 @@ cplic print -n -x >> $TMPPATH/management_licenses.txt
106106
log_msg " Collecting licensepool_data DB into $TMPPATH"
107107
psql_client cpm postgres -c "select * from licensePool_data;" >> $TMPPATH/licensePoolData.txt
108108

109+
log_msg " Collecting filtered licensepool_data DB into $TMPPATH"
110+
psql_client cpm postgres -c "select * from licensepool_data where not deleted and dlesession=0;" >> $TMPPATH/licensePoolData_filtered.txt
111+
109112
log_msg " Collecting GatewayLicenses_data DB into $TMPPATH"
110113
psql_client cpm postgres -c "select * from GatewayLicenses_data;" >> $TMPPATH/gatewayLicensesData.txt
111114

115+
log_msg " Collecting filtered GatewayLicenses_data DB into $TMPPATH"
116+
psql_client cpm postgres -c "select * from gatewaylicenses_data where not deleted and dlesession=0;" >> $TMPPATH/gatewayLicensesData_filtered.txt
117+
118+
log_msg " Collecting VsecLicense_data DB into $TMPPATH"
119+
psql_client cpm postgres -c "select * from vseclicense_data;" >> $TMPPATH/vsecLicenseData.txt
120+
121+
log_msg " Collecting filtered vseclicense_data DB into $TMPPATH"
122+
psql_client cpm postgres -c "select * from vseclicense_data where not deleted and dlesession=0;" >> $TMPPATH/vsecLicenseData_filtered.txt
123+
124+
log_msg " Collecting number of unattached licenses into $TMPPATH (Shloud be empty)"
125+
psql_client cpm postgres -c "select domb.name, dod.domainid, count(1) from domainbase_data as domb join dleobjectderef_data as dod on dod.domainid=domb.objid where (dod.fwset ilike '%not-installed%' or (dod.fwset ilike '%(installed)%' and dod.fwset ilike '%network_object ()%')) and dod.cpmitype='license' and not dod.deleted and dod.dlesession=0 group by domb.name, dod.domainid order by count(1) desc;" >> $TMPPATH/number_of_unattached_licenses.txt
126+
127+
log_msg " Collecting number of all licenses into $TMPPATH (for cprlic debug)"
128+
psql_client cpm postgres -c "select domb.name, dod.domainid, count(1) from domainbase_data as domb join dleobjectderef_data as dod on dod.domainid=domb.objid where dod.cpmitype='license' and not dod.deleted and dod.dlesession=0 group by domb.name, dod.domainid order by count(1) desc;" >> $TMPPATH/number_of_all_licenses.txt
129+
112130
log_msg " Compressing $TMPPATH into $OUTPUTFILE_NAME"
113131
tar -cvf $OUTPUTFILE_NAME $TMPPATH > /dev/null 2>&1
114132

0 commit comments

Comments
 (0)