its okay to use a large window, say a month or two back for the start date
and end date as today.


On Wed, Feb 5, 2014 at 3:42 AM, Indra Pramana <in...@sg.or.id> wrote:

> Hi Ahmad,
>
> Thanks for your reply. I will try to use CloudMonkey to call the API. What
> should I put the startdate and enddate? Shall I just put today's date or is
> it OK for me to generate for say the last one week or one month?
>
> Looking forward to your reply, thank you.
>
> Cheers.
>
>
>
> On Wed, Feb 5, 2014 at 3:12 PM, Ahmad Emneina <aemne...@gmail.com> wrote:
>
>> I typically use the root admin api calls generateUsageRecords[0] and
>> listUsageRecords[1] to kickstart the process. When things refuse to
>> cooperate; I've found it useful to nuke the entries in the db table
>> cloud_usage.usage_job, restart the services (-management and -usage), and
>> make the genUsage/listUsage api calls to get things back on track. I
>> havent
>> had to go to that extreme in a very long time, so try hitting the server
>> with the api calls. hope that helps.
>>
>> [0]:
>>
>> https://cloudstack.apache.org/docs/api/apidocs-4.2/root_admin/generateUsageRecords.html
>> [1]:
>>
>> https://cloudstack.apache.org/docs/api/apidocs-4.2/root_admin/listUsageRecords.html
>>
>>
>> On Tue, Feb 4, 2014 at 8:17 PM, Indra Pramana <in...@sg.or.id> wrote:
>>
>> > Hi,
>> >
>> > When I installed CloudStack, I also installed the CloudStack usage
>> server
>> > and the service seems to be running fine, I can stop and start the
>> service
>> > and the status is running.
>> >
>> > ===
>> > # service cloudstack-usage restart
>> >  * Stopping CloudStack Usage Monitor cloudstack-usage
>>  [
>> > OK ]
>> >  * Starting CloudStack Usage Monitor cloudstack-usage
>>  [
>> > OK ]
>> > # service cloudstack-usage status
>> >  * cloudstack-usage is running
>> >
>> > I also have configured the usage server based on the documentation at
>> this
>> > URL:
>> >
>> >
>> >
>> https://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.2.0/html/Admin_Guide/configure-usage-server.html
>> >
>> > ===
>> > enable.usage.server = true
>> > usage.aggregation.timezone = GMT
>> > usage.execution.timezone = GMT
>> > usage.stats.job.aggregation.range = 1440
>> > usage.stats.job.exec.time = 00:15
>> > ===
>> >
>> > However, it seems that the usage server doesn't work as expected. I
>> don't
>> > see anything on the cloud_usage database, and the content of
>> > /var/log/cloudstack/usage is also empty, so I can't find any logs
>> > pertaining to the usage server.
>> >
>> > Anything I might have missed out?
>> >
>> > Thank you.
>> >
>>
>
>

Reply via email to