Yesterday I do mysql upgrade from 5.7 to 8.0 and mysql-connector-java from 1.5 
to mysql-connector-java 8.0.26.
There is no records type 4 and 5 yet, but now the usage service logs duplicate 
key error many times:

2021-11-10 00:37:50,654 DEBUG [db.Transaction.Transaction] (Usage-Job-1:null) 
(logid:) Rolling back the transaction: Time = 4513 Name =  
-UsageManagerImpl.parse:631-UsageManagerImpl.runInContextInternal:4
05-UsageManagerImpl$1.runInContext:347-ManagedContextRunnable$1.run:48-DefaultManagedContext$1.call:55-DefaultManagedContext.callWithContext:102-DefaultManagedContext.runWithContext:52-ManagedContextRunna
ble.run:45-UsageManagerImpl.run:349-Executors$RunnableAdapter.call:515-FutureTask.run:264-ScheduledThreadPoolExecutor$ScheduledFutureTask.run:304;
 called by -TransactionLegacy.rollback:888-UsageNetworkDao
Impl.saveUsageNetworks:128-ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept:122-UsageManagerImpl.parse:701-UsageManagerImpl.runInContextInternal:405-UsageManagerImpl$1.runInContext:347-
ManagedContextRunnable$1.run:48-DefaultManagedContext$1.call:55-DefaultManagedContext.callWithContext:102-DefaultManagedContext.runWithContext:52-ManagedContextRunnable.run:45-UsageManagerImpl.run:349
2021-11-10 00:37:50,656 ERROR [usage.dao.UsageVMInstanceDaoImpl] 
(Usage-Job-1:null) (logid:) error saving usage_network to cloud_usage db
java.sql.BatchUpdateException: Duplicate entry '387-1-2742-1636509599999' for 
key 'usage_network.PRIMARY'






> On 9 Nov 2021, at 12:00, Yordan Kostov <yord...@nsogroup.com> wrote:
> 
> I do enabled the configs some time ago and rebooted the server but from a 
> brief check now it seems none of those data types (4,5,21,22,23,24) are 
> collected.
> 
> Regards,
> Jordan
> 
> -----Original Message-----
> From: Matheus Fontes <math...@ghz.com.br> 
> Sent: Tuesday, November 9, 2021 4:44 PM
> To: users <users@cloudstack.apache.org>
> Subject: Re: usage server data collection
> 
> Hi,
> did you solve this?
> I have same issue here, all usage network bytes sent/receive (type 4 and 5) 
> are not reported by usage.
> All networks are "Isolated Network"
> 
> router.stats.interval=300
> 
> 
> 
> 
>> On 22 Oct 2021, at 09:07, Yordan Kostov <yord...@nsogroup.com> wrote:
>> 
>> Thank you Wei,
>> 
>>      Configurations are now enabled 😉.
>> 
>> Regards,
>> Jordan
>> 
>> -----Original Message-----
>> From: Wei ZHOU <ustcweiz...@gmail.com>
>> Sent: Friday, October 22, 2021 2:01 PM
>> To: users <users@cloudstack.apache.org>
>> Subject: Re: usage server data collection
>> 
>> 
>> [X] This message came from outside your organization
>> 
>> 
>> Hi Jordan,
>> 
>> Please check some global settings
>> 
>> router.stats.interval  (for isolated networks) 
>> vm.network.stats.interval  and vm.network.stats.interval.min (for 
>> shared
>> networks)
>> vm.disk.stats.interval and vm.disk.stats.interval.min (for disk I/O)
>> 
>> -Wei
>> 
>> 
>> On Fri, 22 Oct 2021 at 12:25, Yordan Kostov <yord...@nsogroup.com> wrote:
>> 
>>> Dear all,
>>> 
>>>               As I am poking around the usage server trying report 
>>> queries I noticed that for some usage types there is no data collected.
>>>               For example:
>>> 
>>> *   nothing is collected for VM disks I/O usage (21,22,23,24).
>>> *   Nothing is collected for network usage bytes sent/received (4,5)
>>> 
>>> I assume some data availability may be dependent on the hypervisor 
>>> that is used.
>>> Is there some paper describing which metrics can be collected and 
>>> which not?
>>> 
>>> Environment is ACS 4.15.2 + XCP-NG 8.2.
>>> 
>>>               No Errors or Warns in usage.log. All looks fine.
>>> 
>>> Regards,
>>> Jordan
>>> 
>>> 
>>> 
> 
> 
> <font size="2"><font color="#D8D8D8">11!</font>

Reply via email to