Simply restart the Syslog-ng service to clear out the licenses used.
Upgrade to version 7.0.16 of Syslog-ng PE.
Starting in version 7.0.16 of Syslog-ng PE the inclusion of the global option
reset-license-counter(yes)
has been made, aimed specifically for those working in cloud environments where systems are spun up and down daily with unique hostnames, however, it can be applied for any situation in which a reset of the license is needed.
Create a script, similar to what is below using CRON, and run it every night at midnight replacing the n in threshold=n with the number of licenses that the Syslog-ng instance is licensed for.
#!/bin/sh
threshold=n
license_used=$(/opt/syslog-ng/sbin/syslog-ng-ctl show-license-info | egrep Currently-Used-Slots | sed "s/.*: //" )
license_total=$(/opt/syslog-ng/sbin/syslog-ng-ctl show-license-info | egrep Host-Limit | sed "s/.*: //" )
license_usage=$( /opt/syslog-ng/sbin/syslog-ng-ctl show-license-info | egrep Usage | sed "s/.*: //" )
license_percentage_above_threshold=$(awk 'BEGIN{ print "'$license_used'"/"'$license_total'" >= ("'$threshold'"/100.0) }')
license_completely_used=$(awk 'BEGIN{ print "'$license_used'"/"'$license_total'" >= 1.0 }')
if [ "$license_completely_used" -eq "1" ]; then
logger WARNING You are currently using $license_used of $license_total licenses. Syslog-ng will now restart to clear the license counter.
systemctl restart syslog-ng
elif [ "$license_percentage_above_threshold" -eq "1" ]; then
logger WARNING You are currently using $license_used licenses which is over $threshold% of your $license_total available licenses.
else
logger You are currently using $license_used licenses and are using $license_usage of your $license_total available licenses.
fi
© 2024 One Identity LLC. ALL RIGHTS RESERVED. Feedback Nutzungsbedingungen Datenschutz Cookie Preference Center