Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add log messages to Chargeback #17874

Merged
merged 6 commits into from
Aug 27, 2018

Conversation

lpichler
Copy link
Contributor

@lpichler lpichler commented Aug 17, 2018

 MIQ(ChargebackVm.build_results_for_report_chargeback) Calculating chargeback costs...
MIQ(ChargebackVm.build_results_for_report_chargeback) With report options: #<struct Chargeback::ReportOptions interval="daily", interval_size=35, end_interval_offset=0, owner="seplag", tenant_id=nil, tag=nil, report_cols=["start_date", "display_range", "vm_name", "provider_name", "cpu_allocated_metric", "cpu_allocated_cost", "memory_allocated_metric", "storage_allocated_metric", "fixed_compute_1_cost", "fixed_compute_metric", "chargeback_rates"], provide_id=nil, entity_id=nil, service_id=nil, groupby="date", groupby_tag=nil, groupby_label=nil, userid="admin", ext_options={:tz=>"Brasilia", :time_profile=>nil}, include_metrics=true, method_for_allocated_metrics=:max, :group_by_tenant?=nil, cumulative_rate_calculation=true>
MIQ(ChargebackVm.build_results_for_report_chargeback) For region 1
MIQ(Chargeback::ConsumptionHistory.for_report) Found 24 records for time range [Fri, 20 Jul 2018 00:00:00 -03 -03:00, Sat, 21 Jul 2018 00:00:00 -03 -03:00]
MIQ(Chargeback::ConsumptionHistory.for_report) Count of Metric Rollups for consumption: 24
MIQ(ChargebackRate.get_assigned_for_target) Input for get_assigned_for_target id: 1000000000114 class: ManageIQ::Providers::Amazon::CloudManager::Vm
MIQ(ChargebackRate.get_assigned_for_target) Parents are passed from parameter
MIQ(ChargebackRate.get_assigned_for_target) parent id: 1000000000006 class: ManageIQ::Providers::Amazon::StorageManager::Ebs::CloudVolume
MIQ(ChargebackRate.get_assigned_for_target) parent id: 1000000000002 class: ManageIQ::Providers::Amazon::CloudManager
MIQ(ChargebackRate.get_assigned_for_target) parent id: 1000000000004 class: Tenant
MIQ(ChargebackRate.get_assigned_for_target) parent id: 1000000000001 class: MiqEnterprise
MIQ(ChargebackRate.get_assigned_for_target) Using tag list: vm/tag/managed/customer/seplag, vm/tag/managed/prov_scope/g_seplag, vm/tag/managed/aws_instance_flavor/t2_small
MIQ(ChargebackRate.get_assigned_for_target) Directly assigned to parents: cloud_volume/id/1000000000006, ext_management_system/id/1000000000002, tenant/id/1000000000004, miq_enterprise/id/1000000000001, vm/tag/managed/customer/seplag, vm/tag/managed/prov_scope/g_seplag, vm/tag/managed/aws_instance_flavor/t2_small
MIQ(ChargebackRate.get_assigned_for_target) Individually assigned resources: id:1000000000008 class:ChargebackRate, id:1000000000006 class:ChargebackRate, id:1000000000013 class:ChargebackRate
MIQ(ChargebackRate.get_assigned_for_target) Tags assigned to parents: tenant/tag/managed/customer/seplag, tenant/tag/managed/prov_scope/g_seplag, ext_management_system/tag/managed/prov_scope/g_etice_comercial, ext_management_system/tag/managed/prov_scope/g_pge, ext_management_system/tag/managed/prov_scope/g_redhat, ext_management_system/tag/managed/prov_scope/g_seplag, ext_management_system/tag/managed/prov_scope/g_sesa, ext_management_system/tag/managed/prov_scope/g_casacivil, ext_management_system/tag/managed/prov_scope/g_cge, ext_management_system/tag/managed/prov_scope/g_metrofor, storage/tag/managed/customer/seplag, storage/tag/managed/prov_scope/g_seplag
MIQ(ChargebackRate.get_assigned_for_target) Tagged resources: id:1000000000008 class:ChargebackRate, id:1000000000006 class:ChargebackRate, id:1000000000013 class:ChargebackRate
MIQ(ChargebackVm.build_results_for_report_chargeback) Report row key 1000000000114_2018-07-20 00:00:00 -0300
MIQ(ChargebackVm#calculate_costs) Calculation with rate: AWS(Compute)
MIQ(ChargebackVm#calculate_costs) Metric: derived_vm_numvcpus Group: cpu Source: allocated
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 2.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-20 00:00:00 -0300 -  2018-07-21 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_rate and with value: 0.0/2.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0/2.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_metric and with value: 1.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 1.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_cost and with value: 48.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 48.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_cost and with value: 48.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.0
MIQ(ChargebackVm#calculate_costs) Metric: fixed_compute_1 Group: fixed Source: compute_1
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.027 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-20 00:00:00 -0300 -  2018-07-21 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_compute_1_rate and with value: 0.027/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.027/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_compute_1_metric and with value: 1.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 1.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_compute_1_cost and with value: 0.648
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.648
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 0.648
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.648
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_cost and with value: 0.648
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.648
MIQ(ChargebackVm#calculate_costs) Metric: derived_memory_available Group: memory Source: allocated
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-20 00:00:00 -0300 -  2018-07-21 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_allocated_rate and with value: 0.0/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_allocated_metric and with value: 2048.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 2048.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_allocated_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.648
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0
MIQ(ChargebackVm#calculate_costs) Calculation with rate: Amazon - t2_small linux(Compute)
MIQ(ChargebackVm#calculate_costs) Metric: derived_vm_numvcpus Group: cpu Source: allocated
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.041 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-20 00:00:00 -0300 -  2018-07-21 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_rate and with value: 0.041/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.041/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_cost and with value: 0.984
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.984
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 0.984
MIQ(ChargebackVm#calculate_costs) Accumulated value: 49.632000000000005
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_cost and with value: 0.984
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.984
MIQ(ChargebackVm#calculate_costs) Metric: fixed_compute_1 Group: fixed Source: compute_1
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 1.0 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-20 00:00:00 -0300 -  2018-07-21 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_compute_1_rate and with value: 1.0/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 1.0/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_compute_1_cost and with value: 24.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 24.648
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 24.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 73.632
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_cost and with value: 24.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 24.648
MIQ(ChargebackVm#calculate_costs) Metric: derived_memory_available Group: memory Source: allocated
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-20 00:00:00 -0300 -  2018-07-21 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_allocated_rate and with value: 0.0/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_allocated_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 73.632
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0
MIQ(ChargebackVm#calculate_costs) Calculation with rate: Storage - Geral(Storage)
MIQ(ChargebackVm#calculate_costs) Metric: derived_vm_allocated_disk_storage Group: storage Source: allocated
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 1.5 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-20 00:00:00 -0300 -  2018-07-21 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: storage_allocated_rate and with value: 1.5/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 1.5/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: storage_allocated_metric and with value: 32212254720.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 32212254720.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: storage_allocated_cost and with value: 36.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 36.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 36.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 109.63200000000001
MIQ(ChargebackVm#calculate_costs) Calculation with field: storage_cost and with value: 36.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 36.0
MIQ(Chargeback::ConsumptionHistory.for_report) Found 24 records for time range [Sat, 21 Jul 2018 00:00:00 -03 -03:00, Sun, 22 Jul 2018 00:00:00 -03 -03:00]
MIQ(Chargeback::ConsumptionHistory.for_report) Count of Metric Rollups for consumption: 24
MIQ(ChargebackVm.build_results_for_report_chargeback) Report row key 1000000000114_2018-07-21 00:00:00 -0300
MIQ(ChargebackVm#calculate_costs) Calculation with rate: AWS(Compute)
MIQ(ChargebackVm#calculate_costs) Metric: derived_vm_numvcpus Group: cpu Source: allocated
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 2.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-21 00:00:00 -0300 -  2018-07-22 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_rate and with value: 0.0/2.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0/2.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_metric and with value: 1.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 1.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_cost and with value: 48.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 48.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_cost and with value: 48.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.0
MIQ(ChargebackVm#calculate_costs) Metric: fixed_compute_1 Group: fixed Source: compute_1
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.027 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-21 00:00:00 -0300 -  2018-07-22 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_compute_1_rate and with value: 0.027/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.027/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_compute_1_metric and with value: 1.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 1.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_compute_1_cost and with value: 0.648
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.648
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 0.648
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.648
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_cost and with value: 0.648
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.648
MIQ(ChargebackVm#calculate_costs) Metric: derived_memory_available Group: memory Source: allocated
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-21 00:00:00 -0300 -  2018-07-22 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_allocated_rate and with value: 0.0/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_allocated_metric and with value: 2048.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 2048.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_allocated_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.648
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0
MIQ(ChargebackVm#calculate_costs) Calculation with rate: Amazon - t2_small linux(Compute)
MIQ(ChargebackVm#calculate_costs) Metric: derived_vm_numvcpus Group: cpu Source: allocated
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.041 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-21 00:00:00 -0300 -  2018-07-22 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_rate and with value: 0.041/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.041/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_cost and with value: 0.984
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.984
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 0.984
MIQ(ChargebackVm#calculate_costs) Accumulated value: 49.632000000000005
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_cost and with value: 0.984
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.984
MIQ(ChargebackVm#calculate_costs) Metric: fixed_compute_1 Group: fixed Source: compute_1
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 1.0 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-21 00:00:00 -0300 -  2018-07-22 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_compute_1_rate and with value: 1.0/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 1.0/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_compute_1_cost and with value: 24.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 24.648
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 24.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 73.632
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_cost and with value: 24.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 24.648
MIQ(ChargebackVm#calculate_costs) Metric: derived_memory_available Group: memory Source: allocated
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-21 00:00:00 -0300 -  2018-07-22 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_allocated_rate and with value: 0.0/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_allocated_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 73.632
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0
MIQ(ChargebackVm#calculate_costs) Calculation with rate: Storage - Geral(Storage)
MIQ(ChargebackVm#calculate_costs) Metric: derived_vm_allocated_disk_storage Group: storage Source: allocated
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 1.5 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-21 00:00:00 -0300 -  2018-07-22 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: storage_allocated_rate and with value: 1.5/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 1.5/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: storage_allocated_metric and with value: 32212254720.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 32212254720.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: storage_allocated_cost and with value: 36.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 36.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 36.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 109.63200000000001
MIQ(ChargebackVm#calculate_costs) Calculation with field: storage_cost and with value: 36.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 36.0
MIQ(Chargeback::ConsumptionHistory.for_report) Found 24 records for time range [Sun, 22 Jul 2018 00:00:00 -03 -03:00, Mon, 23 Jul 2018 00:00:00 -03 -03:00]
MIQ(Chargeback::ConsumptionHistory.for_report) Count of Metric Rollups for consumption: 24
MIQ(ChargebackVm.build_results_for_report_chargeback) Report row key 1000000000114_2018-07-22 00:00:00 -0300
MIQ(ChargebackVm#calculate_costs) Calculation with rate: AWS(Compute)
MIQ(ChargebackVm#calculate_costs) Metric: derived_vm_numvcpus Group: cpu Source: allocated
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 2.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-22 00:00:00 -0300 -  2018-07-23 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_rate and with value: 0.0/2.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0/2.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_metric and with value: 1.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 1.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_cost and with value: 48.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 48.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_cost and with value: 48.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.0
MIQ(ChargebackVm#calculate_costs) Metric: fixed_compute_1 Group: fixed Source: compute_1
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.027 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-22 00:00:00 -0300 -  2018-07-23 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_compute_1_rate and with value: 0.027/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.027/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_compute_1_metric and with value: 1.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 1.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_compute_1_cost and with value: 0.648
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.648
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 0.648
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.648
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_cost and with value: 0.648
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.648
MIQ(ChargebackVm#calculate_costs) Metric: derived_memory_available Group: memory Source: allocated
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-22 00:00:00 -0300 -  2018-07-23 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_allocated_rate and with value: 0.0/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_allocated_metric and with value: 2048.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 2048.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_allocated_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.648
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0
MIQ(ChargebackVm#calculate_costs) Calculation with rate: Amazon - t2_small linux(Compute)
MIQ(ChargebackVm#calculate_costs) Metric: derived_vm_numvcpus Group: cpu Source: allocated
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.041 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-22 00:00:00 -0300 -  2018-07-23 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_rate and with value: 0.041/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.041/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_cost and with value: 0.984
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.984
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 0.984
MIQ(ChargebackVm#calculate_costs) Accumulated value: 49.632000000000005
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_cost and with value: 0.984
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.984
MIQ(ChargebackVm#calculate_costs) Metric: fixed_compute_1 Group: fixed Source: compute_1
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 1.0 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-22 00:00:00 -0300 -  2018-07-23 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_compute_1_rate and with value: 1.0/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 1.0/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_compute_1_cost and with value: 24.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 24.648
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 24.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 73.632
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_cost and with value: 24.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 24.648
MIQ(ChargebackVm#calculate_costs) Metric: derived_memory_available Group: memory Source: allocated
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-22 00:00:00 -0300 -  2018-07-23 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_allocated_rate and with value: 0.0/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_allocated_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 73.632
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0
MIQ(ChargebackVm#calculate_costs) Calculation with rate: Storage - Geral(Storage)
MIQ(ChargebackVm#calculate_costs) Metric: derived_vm_allocated_disk_storage Group: storage Source: allocated
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 1.5 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-22 00:00:00 -0300 -  2018-07-23 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: storage_allocated_rate and with value: 1.5/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 1.5/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: storage_allocated_metric and with value: 32212254720.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 32212254720.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: storage_allocated_cost and with value: 36.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 36.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 36.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 109.63200000000001
MIQ(ChargebackVm#calculate_costs) Calculation with field: storage_cost and with value: 36.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 36.0
MIQ(Chargeback::ConsumptionHistory.for_report) Found 24 records for time range [Mon, 23 Jul 2018 00:00:00 -03 -03:00, Tue, 24 Jul 2018 00:00:00 -03 -03:00]
MIQ(Chargeback::ConsumptionHistory.for_report) Count of Metric Rollups for consumption: 24
MIQ(ChargebackVm.build_results_for_report_chargeback) Report row key 1000000000114_2018-07-23 00:00:00 -0300
MIQ(ChargebackVm#calculate_costs) Calculation with rate: AWS(Compute)
MIQ(ChargebackVm#calculate_costs) Metric: derived_vm_numvcpus Group: cpu Source: allocated
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 2.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-23 00:00:00 -0300 -  2018-07-24 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_rate and with value: 0.0/2.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0/2.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_metric and with value: 1.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 1.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_cost and with value: 48.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 48.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_cost and with value: 48.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.0
MIQ(ChargebackVm#calculate_costs) Metric: fixed_compute_1 Group: fixed Source: compute_1
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.027 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-23 00:00:00 -0300 -  2018-07-24 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_compute_1_rate and with value: 0.027/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.027/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_compute_1_metric and with value: 1.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 1.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_compute_1_cost and with value: 0.648
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.648
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 0.648
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.648
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_cost and with value: 0.648
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.648
MIQ(ChargebackVm#calculate_costs) Metric: derived_memory_available Group: memory Source: allocated
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-23 00:00:00 -0300 -  2018-07-24 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_allocated_rate and with value: 0.0/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_allocated_metric and with value: 2048.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 2048.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_allocated_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.648
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0
MIQ(ChargebackVm#calculate_costs) Calculation with rate: Amazon - t2_small linux(Compute)
MIQ(ChargebackVm#calculate_costs) Metric: derived_vm_numvcpus Group: cpu Source: allocated
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.041 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-23 00:00:00 -0300 -  2018-07-24 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_rate and with value: 0.041/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.041/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_cost and with value: 0.984
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.984
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 0.984
MIQ(ChargebackVm#calculate_costs) Accumulated value: 49.632000000000005
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_cost and with value: 0.984
MIQ(ChargebackVm#calculate_costs) Accumulated value: 48.984
MIQ(ChargebackVm#calculate_costs) Metric: fixed_compute_1 Group: fixed Source: compute_1
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 1.0 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-23 00:00:00 -0300 -  2018-07-24 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_compute_1_rate and with value: 1.0/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 1.0/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_compute_1_cost and with value: 24.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 24.648
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 24.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 73.632
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_cost and with value: 24.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 24.648
MIQ(ChargebackVm#calculate_costs) Metric: derived_memory_available Group: memory Source: allocated
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-23 00:00:00 -0300 -  2018-07-24 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_allocated_rate and with value: 0.0/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_allocated_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 73.632
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 0.0
MIQ(ChargebackVm#calculate_costs) Calculation with rate: Storage - Geral(Storage)
MIQ(ChargebackVm#calculate_costs) Metric: derived_vm_allocated_disk_storage Group: storage Source: allocated
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 1.5 Variable Rate: 0.0
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-23 00:00:00 -0300 -  2018-07-24 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
MIQ(ChargebackVm#calculate_costs) Calculation with field: storage_allocated_rate and with value: 1.5/0.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 1.5/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: storage_allocated_metric and with value: 32212254720.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 32212254720.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: storage_allocated_cost and with value: 36.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 36.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 36.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 109.63200000000001
MIQ(ChargebackVm#calculate_costs) Calculation with field: storage_allocated_cost and with value: 36.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 36.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 36.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 109.63200000000001
MIQ(ChargebackVm#calculate_costs) Calculation with field: storage_cost and with value: 36.0
MIQ(ChargebackVm#calculate_costs) Accumulated value: 36.0
MIQ(ChargebackVm.build_results_for_report_chargeback) Calculating chargeback costs...Complete

@miq-bot miq-bot added the wip label Aug 17, 2018
@lpichler lpichler force-pushed the add_log_messages_to_chargeback branch from f74cbd6 to 6c69624 Compare August 17, 2018 12:12
@lpichler
Copy link
Contributor Author

@miq-bot assign @gtanzillo

@miq-bot add_label chargeback

@lpichler lpichler changed the title [WIP] Add log messages to Chargeback Add log messages to Chargeback Aug 17, 2018
@lpichler
Copy link
Contributor Author

@miq-bot assign @gtanzillo

@miq-bot miq-bot removed the wip label Aug 17, 2018
@lpichler lpichler changed the title Add log messages to Chargeback [WIP] Add log messages to Chargeback Aug 21, 2018
@lpichler
Copy link
Contributor Author

lpichler commented Aug 21, 2018

WIP:

  • rate id
  • log also assignment method
  • use log_rates (or log tiers)
  • log consumption type and inputs for consumptionWithoutRollup
  • create BZ for G-backport

I did not put any log messages to consumptionWithRollup because couple methods are logged on other places and if I would put other logging here it would end with copying MetricRollup table to logs - and I think this is too much for logging.

@miq-bot miq-bot added the wip label Aug 21, 2018
@lpichler lpichler force-pushed the add_log_messages_to_chargeback branch from 6c69624 to 15d8f4f Compare August 23, 2018 09:45
@lpichler lpichler changed the title [WIP] Add log messages to Chargeback Add log messages to Chargeback Aug 23, 2018
@miq-bot miq-bot removed the wip label Aug 23, 2018
@lpichler
Copy link
Contributor Author

lpichler commented Aug 23, 2018

Usage with grep: (we need to prefix MIQ(Chargeback also)

  1. We log which Chargeback Rates have been used:
cat tl.log | grep 'Calculation with rate'
MIQ(ChargebackVm#calculate_costs) Calculation with rate: AWS(Compute)
MIQ(ChargebackVm#calculate_costs) Calculation with rate: Amazon - t2_small linux(Compute)
MIQ(ChargebackVm#calculate_costs) Calculation with rate: Storage - Geral(Storage)
MIQ(ChargebackVm#calculate_costs) Calculation with rate: AWS(Compute)
MIQ(ChargebackVm#calculate_costs) Calculation with rate: Amazon - t2_small linux(Compute)
MIQ(ChargebackVm#calculate_costs) Calculation with rate: Storage - Geral(Storage)
MIQ(ChargebackVm#calculate_costs) Calculation with rate: AWS(Compute)
MIQ(ChargebackVm#calculate_costs) Calculation with rate: Amazon - t2_small linux(Compute)
MIQ(ChargebackVm#calculate_costs) Calculation with rate: Storage - Geral(Storage)
MIQ(ChargebackVm#calculate_costs) Calculation with rate: AWS(Compute)
MIQ(ChargebackVm#calculate_costs) Calculation with rate: Amazon - t2_small linux(Compute)
MIQ(ChargebackVm#calculate_costs) Calculation with rate: Storage - Geral(Storage)
  1. Consumed Intervals
cat tl.log | grep 'Consumption interval' | uniq
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-20 00:00:00 -0300 -  2018-07-21 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-21 00:00:00 -0300 -  2018-07-22 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-22 00:00:00 -0300 -  2018-07-23 00:00:00 -0300
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumption interval: 2018-07-23 00:00:00 -0300 -  2018-07-24 00:00:00 -0300
  1. Consumed hours
cat tl.log | grep 'Consumed hours' | uniq
MIQ(ChargebackRateDetail#metric_and_cost_by) Consumed hours: 24
  1. Detailed info about used chargeback tiers:
 cat tl.log | grep 'Start'
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 2.0
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.027 Variable Rate: 0.0
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 0.0
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.041 Variable Rate: 0.0
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 1.0 Variable Rate: 0.0
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 0.0
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 1.5 Variable Rate: 0.0
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 2.0
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.027 Variable Rate: 0.0
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 0.0
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.041 Variable Rate: 0.0
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 1.0 Variable Rate: 0.0
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 0.0
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 1.5 Variable Rate: 0.0
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 2.0
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.027 Variable Rate: 0.0
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 0.0
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.041 Variable Rate: 0.0
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 1.0 Variable Rate: 0.0
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 0.0
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 1.5 Variable Rate: 0.0
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 2.0
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.027 Variable Rate: 0.0

  1. Detailed info about calculation
cat tl.log | egrep 'Calculation|) Metric|Start'
MIQ(ChargebackVm#calculate_costs) Calculation with rate: AWS(Compute)
MIQ(ChargebackVm#calculate_costs) Metric: derived_vm_numvcpus Group: cpu Source: allocated
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 2.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_rate and with value: 0.0/2.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_metric and with value: 1.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_cost and with value: 48.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 48.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_cost and with value: 48.0
MIQ(ChargebackVm#calculate_costs) Metric: fixed_compute_1 Group: fixed Source: compute_1
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.027 Variable Rate: 0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_compute_1_rate and with value: 0.027/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_compute_1_metric and with value: 1.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_compute_1_cost and with value: 0.648
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 0.648
MIQ(ChargebackVm#calculate_costs) Calculation with field: fixed_cost and with value: 0.648
MIQ(ChargebackVm#calculate_costs) Metric: derived_memory_available Group: memory Source: allocated
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.0 Variable Rate: 0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_allocated_rate and with value: 0.0/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_allocated_metric and with value: 2048.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_allocated_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: memory_cost and with value: 0.0
MIQ(ChargebackVm#calculate_costs) Calculation with rate: Amazon - t2_small linux(Compute)
MIQ(ChargebackVm#calculate_costs) Metric: derived_vm_numvcpus Group: cpu Source: allocated
MIQ(ChargebackVm#calculate_costs) Start: 0.0 Finish: Infinity Fixed Rate: 0.041 Variable Rate: 0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_rate and with value: 0.041/0.0
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_allocated_cost and with value: 0.984
MIQ(ChargebackVm#calculate_costs) Calculation with field: total_cost and with value: 0.984
MIQ(ChargebackVm#calculate_costs) Calculation with field: cpu_cost and with value: 0.984

6. How chargeback rates have been selected ? code

cat tl.log | grep 'ChargebackRate.get_assigned_for_target'
MIQ(ChargebackRate.get_assigned_for_target) Input for get_assigned_for_target id: 1000000000114 class: ManageIQ::Providers::Amazon::CloudManager::Vm
MIQ(ChargebackRate.get_assigned_for_target) Parents are passed from parameter
MIQ(ChargebackRate.get_assigned_for_target) parent id: 1000000000006 class: ManageIQ::Providers::Amazon::StorageManager::Ebs::CloudVolume
MIQ(ChargebackRate.get_assigned_for_target) parent id: 1000000000002 class: ManageIQ::Providers::Amazon::CloudManager
MIQ(ChargebackRate.get_assigned_for_target) parent id: 1000000000004 class: Tenant
MIQ(ChargebackRate.get_assigned_for_target) parent id: 1000000000001 class: MiqEnterprise
MIQ(ChargebackRate.get_assigned_for_target) Using tag list: vm/tag/managed/customer/seplag, vm/tag/managed/prov_scope/g_seplag, vm/tag/managed/aws_instance_flavor/t2_small
MIQ(ChargebackRate.get_assigned_for_target) Directly assigned to parents: cloud_volume/id/1000000000006, ext_management_system/id/1000000000002, tenant/id/1000000000004, miq_enterprise/id/1000000000001, vm/tag/managed/customer/seplag, vm/tag/managed/prov_scope/g_seplag, vm/tag/managed/aws_instance_flavor/t2_small
MIQ(ChargebackRate.get_assigned_for_target) Individually assigned resources: id:1000000000008 class:ChargebackRate, id:1000000000006 class:ChargebackRate, id:1000000000013 class:ChargebackRate
MIQ(ChargebackRate.get_assigned_for_target) Tags assigned to parents: tenant/tag/managed/customer/seplag, tenant/tag/managed/prov_scope/g_seplag, ext_management_system/tag/managed/prov_scope/g_etice_comercial, ext_management_system/tag/managed/prov_scope/g_pge, ext_management_system/tag/managed/prov_scope/g_redhat, ext_management_system/tag/managed/prov_scope/g_seplag, ext_management_system/tag/managed/prov_scope/g_sesa, ext_management_system/tag/managed/prov_scope/g_casacivil, ext_management_system/tag/managed/prov_scope/g_cge, ext_management_system/tag/managed/prov_scope/g_metrofor, storage/tag/managed/customer/seplag, storage/tag/managed/prov_scope/g_seplag
MIQ(ChargebackRate.get_assigned_for_target) Tagged resources: id:1000000000008 class:ChargebackRate, id:1000000000006 class:ChargebackRate, id:1000000000013 class:ChargebackRate

@lpichler lpichler force-pushed the add_log_messages_to_chargeback branch from bef790d to bc42974 Compare August 23, 2018 10:43
@lpichler lpichler force-pushed the add_log_messages_to_chargeback branch from bc42974 to 3919965 Compare August 27, 2018 14:09
@miq-bot
Copy link
Member

miq-bot commented Aug 27, 2018

Checked commits lpichler/manageiq@f873238~...3919965 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
4 files checked, 0 offenses detected
Everything looks fine. 🍪

@lpichler lpichler closed this Aug 27, 2018
@lpichler lpichler reopened this Aug 27, 2018
@lpichler
Copy link
Contributor Author

@gtanzillo CI is now fixed.

Copy link
Member

@gtanzillo gtanzillo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍 Thanks @lpichler!

@gtanzillo gtanzillo added this to the Sprint 93 Ending Aug 27, 2018 milestone Aug 27, 2018
@gtanzillo gtanzillo merged commit de1bce0 into ManageIQ:master Aug 27, 2018
@lpichler lpichler deleted the add_log_messages_to_chargeback branch August 27, 2018 17:18
@lpichler
Copy link
Contributor Author

@simaishi
Copy link
Contributor

@lpichler 2 files are conflicting on backport to Gaprindashvili branch. Can you please create a separate PR?

@lpichler
Copy link
Contributor Author

sure @simaishi #17988

@simaishi
Copy link
Contributor

simaishi commented Oct 2, 2018

Backported to Gaprindashvili via #17988

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants