online-analytics
by
openshift

Description: An application for reporting OpenShift cluster usage analytics

View on GitHub ↗

Summary Information

Updated 32 minutes ago
Added to GitGenius on June 23rd, 2023
Created on September 8th, 2017
Open Issues & Pull Requests: 0 (+0)
Number of forks: 9
Total Stargazers: 5 (+0)
Total Subscribers: 226 (+0)

Issue Activity (beta)

Open issues: 0
New in 7 days: 0
Closed in 7 days: 0
Avg open age: N/A days
Stale 30+ days: 0
Stale 90+ days: 0

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

The openshift/online-analytics repository is a Go-based application designed to sync OpenShift user activity data with external analytics systems and report on cluster usage analytics. The application functions as a controller that observes various events occurring within an OpenShift cluster and forwards them to analytics providers for tracking and analysis.

The core functionality centers on event tracking across multiple OpenShift resource types. The application monitors user lifecycle events including user creation and deletion, pod events such as pod creation and pod failures, replication controller creation, persistent volume claim operations including creation and binding, deployment configuration failures, build failures, secrets, services, and namespace creation. Each event is captured with relevant metadata including user identifiers, resource names, namespaces, timestamps, and resource-specific details like replica counts or storage capacity information.

The application supports flexible user identification strategies through the USER_KEY_STRATEGY flag, allowing users to be keyed by their name, UID, or by a custom annotation specified via the USER_KEY_ANNOTATION flag. The CLUSTER_NAME parameter enables distinguishing between different environments such as INT, STG, or local test clusters, defaulting to "kubernetes" if not specified. Integration with Woopra is supported as the primary analytics backend, with events sent via Basic Authenticated GET requests with encoded URLs.

Prometheus metrics collection is a significant feature of the application. The METRICS_COLLECT_RUNTIME flag enables gathering of runtime, Go, and process metrics. The METRICS_COLLECT_WOOPRA flag exposes Woopra latency metrics at the analytics_woopra_latency_seconds endpoint. The METRICS_COLLECT_QUEUE flag provides insights into the controller's internal event processing queue, exposing both the current queue size and the total number of events processed since startup. All metrics are made available at the METRICS_PORT/metrics endpoint.

The repository includes comprehensive build and testing infrastructure. The make command runs vendor dependencies and installation, make build compiles the binary, make test runs unit tests, and make test-integration executes integration tests against an OpenShift master. Local development is supported through a local endpoint mode that logs at glog.V(5) level, with analytics generated by logging in and creating projects with basic applications.

The application's event schema is well-defined, with each event type capturing standardized parameters including a user identifier derived from annotations, an event type identifier, the resource name, namespace, and creation or transition timestamps in milliseconds. For storage-related events like persistent volume claims, additional parameters capture requested and actual capacity along with access modes. The detailed event specifications ensure consistent tracking of cluster activity across different resource types and operational states.

online-analytics
by
openshiftopenshift/online-analytics

Repository Details

Fetching additional details & charts...