Usage Meter Appliance Resource Issues Emails are not sent immediately.
Usage Meter 9.0
This is expected behavior to avoid sending emails for resource spikes that only 15 or 30 minutes.
Workaround
1. Edit /opt/vmware/cloudusagemetering/platform/conf/notification_runners.json.
Change following cron expression "0 */15 * * * *" of all usage alert-related notification groups to "0 */5 * * * *" and save.
This adjustment will reduce the sample gathering rate from 15 minutes to 5 minutes, which should help to speed up the alert firing.
Example): Memory Usage Alert
{
"group": "Appliance Memory usage alert",
"about": "Appliance Memory usage alert",
"schedule": "0 */15 * * * *", <=========== change to "0 */5 * * * *"
"condition": "settings.notificationSettings.paused == false and settings.emailNotificationsSettings.sendResourceUsageAlerts == true",
"runners": [
{
"name": "Memory usage alert",
"target": "com.vmware.vcpp.usagemeter.settings.notification.runners.usage.ApplianceMemoryUsageRunner"
}
]
},
2. Edit /opt/vmware/cloudusagemetering/platform/bin/start-journal-service.sh
Add export JAVA_OPTS="${JAVA_OPTS} -Dserver.resource.usage.historical.records.cache.count=2" to the end of the export JAVA_OPTS= line and save it.
Example)
export APP_NAME="journal-service"
export JAVA_OPTS="${JAVA_OPTS} -Dserver.notification.conf=${app_root}/conf/notification_runners.json"
export JAVA_OPTS="${JAVA_OPTS} -Dserver.monitor.log.dir=${app_root}/log"
export JAVA_OPTS="${JAVA_OPTS} -Dserver.resource.usage.historical.records.cache.count=2" <=========== add this line
3. Restart the journal service.
# start.sh journal -r
If you set up this workaround, emails will be sent relatively quickly, but if the email firing frequency is set to every hour, emails will continue to be sent for a while even after the issue is resolved.
Therefore, if you apply this workaround, you might want to reduce the frequency of email firing.