Documentation
¶
Index ¶
- Constants
- Variables
- func AWSColumnToHiveColumnType(c aws.Column) string
- func GetReportQueryForReport(report *metering.Report, queryGetter reporting.ReportQueryGetter) (*metering.ReportQuery, error)
- func SanetizeAWSColumnForHive(col aws.Column) string
- type CollectPrometheusMetricsDataRequest
- type CollectPrometheusMetricsDataResponse
- type Config
- type DependencyResolver
- type GetReportResults
- type PrometheusConfig
- type RenderReportQueryRequest
- type ReportResultEntry
- type ReportResultValues
- type Reporting
- type StorePrometheusMetricsDataRequest
- type TLSConfig
Constants ¶
View Source
const ( APIV1ReportGetEndpoint = "/api/v1/reports/get" APIV2ReportEndpointPrefix = "/api/v2/reports" APIV2ReportQueryEndpointPrefix = "/api/v2/reportqueries" )
View Source
const ( DefaultPrometheusQueryInterval = time.Minute * 5 // Query Prometheus every 5 minutes DefaultPrometheusQueryStepSize = time.Minute // Query data from Prometheus at a 60 second resolution (one data point per minute max) DefaultPrometheusQueryChunkSize = 5 * time.Minute // the default value for how much data we will insert into Presto per Prometheus query. DefaultPrometheusDataSourceMaxQueryRangeDuration = 10 * time.Minute // how much data we will query from Prometheus at once DefaultPrometheusDataSourceMaxBackfillImportDuration = 2 * time.Hour // how far we will query for backlogged data. )
View Source
const ( // AWSUsageHiveRowFormat is the Hadoop serialization/deserialization implementation used with AWS billing data. AWSUsageHiveRowFormat = `` /* 291-byte string literal not displayed */ )
Variables ¶
View Source
var (
AWSUsageHivePartitions = []hive.Column{
{Name: billingPeriodStartPartitionColumnName, Type: "string"},
{Name: billingPeriodEndPartitionColumnName, Type: "string"},
}
)
View Source
var ErrReportIsRunning = errors.New("the report is still running")
Functions ¶
func AWSColumnToHiveColumnType ¶
AWSColumnToHiveColumnType is the data type a column is created as in Hive.
func GetReportQueryForReport ¶
func GetReportQueryForReport(report *metering.Report, queryGetter reporting.ReportQueryGetter) (*metering.ReportQuery, error)
GetReportQueryForReport returns the ReportQuery that was used in the Report parameter
func SanetizeAWSColumnForHive ¶
SanetizeAWSColumnForHive removes and replaces invalid characters in AWS billing columns with characters allowed in hive SQL
Types ¶
type CollectPrometheusMetricsDataResponse ¶
type CollectPrometheusMetricsDataResponse struct {
Results []*prometheusImportResults `json:"results"`
}
type Config ¶
type Config struct {
Hostname string
OwnNamespace string
AllNamespaces bool
TargetNamespaces []string
Kubeconfig string
APIListen string
MetricsListen string
PprofListen string
HiveHost string
HiveUseTLS bool
HiveCAFile string
HiveTLSInsecureSkipVerify bool
HiveUseClientCertAuth bool
HiveClientCertFile string
HiveClientKeyFile string
PrestoHost string
PrestoUseTLS bool
PrestoCAFile string
PrestoTLSInsecureSkipVerify bool
PrestoUseClientCertAuth bool
PrestoClientCertFile string
PrestoClientKeyFile string
PrestoMaxQueryLength int
DisablePrometheusMetricsImporter bool
EnableFinalizers bool
LogDMLQueries bool
LogDDLQueries bool
PrometheusQueryConfig metering.PrometheusQueryConfig
PrometheusDataSourceMaxQueryRangeDuration time.Duration
PrometheusDataSourceMaxBackfillImportDuration time.Duration
PrometheusDataSourceGlobalImportFromTime *time.Time
LeaderLeaseDuration time.Duration
APITLSConfig TLSConfig
MetricsTLSConfig TLSConfig
PrometheusConfig PrometheusConfig
}
type DependencyResolver ¶
type DependencyResolver interface {
ResolveDependencies(namespace string, inputDefs []metering.ReportQueryInputDefinition, inputVals []metering.ReportQueryInputValue) (*reporting.DependencyResolutionResult, error)
}
type GetReportResults ¶
type GetReportResults struct {
Results []ReportResultEntry `json:"results"`
}
type PrometheusConfig ¶
type ReportResultEntry ¶
type ReportResultEntry struct {
Values []ReportResultValues `json:"values"`
}
type ReportResultValues ¶
type StorePrometheusMetricsDataRequest ¶
type StorePrometheusMetricsDataRequest []*prestostore.PrometheusMetric
Source Files
¶
Click to show internal directories.
Click to hide internal directories.