|
11 | 11 | # For additional information please refer to CloudGuard Network Central License Tool Administration Guide. |
12 | 12 |
|
13 | 13 |
|
14 | | -# Licenses_Collector - version 5 |
| 14 | +# Licenses_Collector - version 6 |
15 | 15 |
|
16 | 16 | usage() |
17 | 17 | { |
@@ -106,9 +106,27 @@ cplic print -n -x >> $TMPPATH/management_licenses.txt |
106 | 106 | log_msg " Collecting licensepool_data DB into $TMPPATH" |
107 | 107 | psql_client cpm postgres -c "select * from licensePool_data;" >> $TMPPATH/licensePoolData.txt |
108 | 108 |
|
| 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 | + |
109 | 112 | log_msg " Collecting GatewayLicenses_data DB into $TMPPATH" |
110 | 113 | psql_client cpm postgres -c "select * from GatewayLicenses_data;" >> $TMPPATH/gatewayLicensesData.txt |
111 | 114 |
|
| 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 | + |
112 | 130 | log_msg " Compressing $TMPPATH into $OUTPUTFILE_NAME" |
113 | 131 | tar -cvf $OUTPUTFILE_NAME $TMPPATH > /dev/null 2>&1 |
114 | 132 |
|
|
0 commit comments